Skip to content

Commit

Permalink
Enable accel/gyro, add alsps & magnetometer
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperion70 committed Jan 28, 2019
1 parent 92ef6f6 commit b8bd729
Show file tree
Hide file tree
Showing 14 changed files with 5,398 additions and 8 deletions.
12 changes: 7 additions & 5 deletions arch/arm64/configs/N1_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,10 @@ CONFIG_MTK_LCM_PHYSICAL_ROTATION="0"
CONFIG_MTK_AAL_SUPPORT=y
CONFIG_MTK_SENSOR_SUPPORT=y
# [yanlin start] Porting sensors
CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y
# CONFIG_MTK_LSM6DS3HG=y
# CONFIG_MTK_BMI160_ACC=y
# CONFIG_MTK_LSM6DS3_ACC=y
CONFIG_CUSTOM_KERNEL_ALSPS=y
#CONFIG_MTK_CM36558=y
# CONFIG_MTK_LTR579=y
CONFIG_CUSTOM_KERNEL_GYROSCOPE=y
# CONFIG_MTK_LSM6DS3HGY=y
# CONFIG_MTK_BMI160_GYRO=y
# CONFIG_MTK_LSM6DS3_GYRO=y
CONFIG_MTK_HWMON=y
Expand Down Expand Up @@ -552,8 +547,15 @@ CONFIG_MTK_FLASHLIGHT_PWM=y
#CONFIG_MTK_LENS_LC898212XDAF_SUPPORT=y
#CONFIG_MTK_LENS_DW9763AF_SUPPORT=y

CONFIG_CUSTOM_KERNEL_ACCELEROMETER=y
CONFIG_MTK_LSM6DS3HG=y
CONFIG_CUSTOM_KERNEL_ALSPS=y
CONFIG_MTK_STK3X1X_NEW=y
CONFIG_CUSTOM_KERNEL_GYROSCOPE=y
CONFIG_MTK_LSM6DS3HGY=y

CONFIG_MTK_QMCX983_NEW=y

CONFIG_MTK_WAPI_SUPPORT=y
CONFIG_ACCDET_EINT=y
CONFIG_MTK_MEMCFG=y
Expand Down
6 changes: 3 additions & 3 deletions drivers/misc/mediatek/accelerometer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ obj-y += accel.o accel_factory.o
ifeq ($(CONFIG_MTK_SCP_SENSORHUB_V1),y)
obj-$(CONFIG_MTK_ACCELHUB) += accelhub/
else
# obj-$(CONFIG_MTK_LSM6DS3HG) += lsm6ds3hg/
obj-$(CONFIG_MTK_LSM6DS3HG) += lsm6ds3hg/
# [yanlin start] Porting sensors
obj-$(CONFIG_MTK_BMI160_ACC) += bmi160_acc/
obj-$(CONFIG_MTK_LSM6DS3_ACC) += lsm6ds3-acc/
#obj-$(CONFIG_MTK_BMI160_ACC) += bmi160_acc/
#obj-$(CONFIG_MTK_LSM6DS3_ACC) += lsm6ds3-acc/
# [yanlin end]
endif
1 change: 1 addition & 0 deletions drivers/misc/mediatek/alsps/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ config MTK_AUTO_DETECT_ALSPS

source "drivers/misc/mediatek/alsps/cm36652-new/Kconfig"
source "drivers/misc/mediatek/alsps/cm36558/Kconfig"
source "drivers/misc/mediatek/alsps/stk3x1x-new/Kconfig"
source "drivers/misc/mediatek/alsps/alspshub/Kconfig"
# [yanlin start] Porting sensors
source "drivers/misc/mediatek/alsps/ltr579/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/mediatek/alsps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ccflags-y += -I$(srctree)/drivers/misc/mediatek/hwmon/include
obj-y += alsps.o
obj-y += alsps_factory.o
obj-y += aal_control.o
obj-y += stk3x1x-new/

ifeq ($(CONFIG_MTK_SCP_SENSORHUB_V1),y)
obj-$(CONFIG_MTK_ALSPSHUB) += alspshub/
Expand Down
9 changes: 9 additions & 0 deletions drivers/misc/mediatek/alsps/stk3x1x-new/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

config MTK_STK3X1X_NEW
bool "stk3x1x for MediaTek package"
default n
help
It support different type sensor
in this platform. If this option
is set, it will support ambient
and light sensor STK3X1X.
5 changes: 5 additions & 0 deletions drivers/misc/mediatek/alsps/stk3x1x-new/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ccflags-y += -I$(srctree)/drivers/misc/mediatek/alsps/inc
ccflags-y += -I$(srctree)/drivers/misc/mediatek/hwmon/include

obj-y := stk3x1x.o

Loading

0 comments on commit b8bd729

Please sign in to comment.