From 9860dc91ec985318d34047af83878062b6e26a00 Mon Sep 17 00:00:00 2001 From: electimon Date: Fri, 28 Jan 2022 11:22:30 +0800 Subject: [PATCH] treewide: Setup inline build for moto modules Co-authored-by: Erfan Abdi Co-authored-by: Beta Soft Co-authored-by: dianlujitao Co-authored-by: Sevenrock Co-authored-by: SGCMarkus Co-authored-by: Michael Bestas Change-Id: I5a7218c093f4cd42325860aeb8e281fe7be41a66 --- drivers/Kconfig | 14 ++ drivers/Makefile | 8 + drivers/backlight/Kconfig | 2 + drivers/backlight/Makefile | 2 + drivers/backlight/aw99703/Kbuild | 6 +- drivers/backlight/aw99703/Kconfig | 9 + drivers/backlight/lm3697/Kbuild | 7 +- drivers/backlight/lm3697/Kconfig | 9 + drivers/fm/Kbuild | 5 +- drivers/fm/Kconfig | 5 + drivers/gud/Kconfig | 1 + drivers/gud/Makefile | 1 + drivers/gud/MobiCoreDriver/Kbuild | 15 +- drivers/gud/MobiCoreDriver/Kconfig | 16 ++ drivers/input/misc/Kconfig | 6 + drivers/input/misc/Makefile | 5 + drivers/input/misc/focal_fps_mmi/Kbuild | 51 +----- drivers/input/misc/focal_fps_mmi/Kconfig | 20 +++ drivers/input/misc/fpc_fps_mmi/Kbuild | 20 +-- drivers/input/misc/fpc_fps_mmi/Kconfig | 23 +++ drivers/input/misc/goodix_fod_mmi/Kbuild | 21 +-- drivers/input/misc/goodix_fod_mmi/Kconfig | 20 +++ drivers/input/misc/rbs_fod_mmi/Kbuild | 19 +- drivers/input/misc/rbs_fod_mmi/Kconfig | 6 + drivers/input/misc/rbs_fps_mmi/Kbuild | 17 +- drivers/input/misc/rbs_fps_mmi/Kconfig | 14 ++ drivers/input/touchscreen/Kconfig | 12 ++ drivers/input/touchscreen/Makefile | 7 + .../touchscreen/chipone_tddi_v2_mmi/Kbuild | 60 +------ .../touchscreen/chipone_tddi_v2_mmi/Kconfig | 62 +++++++ .../touchscreen/focaltech_touch_v3/Kbuild | 74 +------- .../touchscreen/focaltech_touch_v3/Kconfig | 77 +++++++- .../touchscreen/goodix_berlin_mmi/Kbuild | 122 ++----------- .../touchscreen/goodix_berlin_mmi/Kconfig | 68 ++++++- .../input/touchscreen/ilitek_v3_mmi/Kbuild | 69 ++----- .../input/touchscreen/ilitek_v3_mmi/Kconfig | 89 +++++++++ .../input/touchscreen/nova_0flash_mmi/Kbuild | 125 +++---------- .../input/touchscreen/nova_0flash_mmi/Kconfig | 169 ++++++++++++++++++ .../input/touchscreen/touchscreen_mmi/Kbuild | 41 +---- .../input/touchscreen/touchscreen_mmi/Kconfig | 67 +++++++ drivers/leds/Kconfig | 7 + drivers/leds/Makefile | 1 + drivers/media/platform/msm/Kconfig | 1 + drivers/media/platform/msm/Makefile | 1 + .../camera/cam_sensor_module/cam_cci/Kbuild | 46 ++--- .../camera/cam_sensor_module/cam_cci/Kconfig | 6 + drivers/misc/Kconfig | 5 + drivers/misc/Makefile | 6 + drivers/misc/awinic/Kconfig | 1 + drivers/misc/awinic/Makefile | 1 + drivers/misc/awinic/sarsensor/Kbuild | 19 +- drivers/misc/awinic/sarsensor/Kconfig | 14 ++ drivers/misc/ldo_vibrator_mmi/Kconfig | 9 + drivers/misc/mmi_sys_temp/Kbuild | 6 +- drivers/misc/mmi_sys_temp/Kconfig | 10 ++ drivers/misc/sx937x/Kbuild | 43 +---- drivers/misc/sx937x/Kconfig | 39 ++++ drivers/misc/utag/Kbuild | 6 +- drivers/misc/utag/Kconfig | 14 ++ drivers/mmi_annotate/Kbuild | 6 +- drivers/mmi_annotate/Kconfig | 9 + drivers/mmi_info/Kbuild | 7 +- drivers/mmi_info/Kconfig | 10 ++ drivers/mmi_relay/Kbuild | 6 +- drivers/mmi_relay/Kconfig | 9 + drivers/nfc/Kconfig | 1 + drivers/nfc/Makefile | 1 + drivers/nfc/sn2xx/Kbuild | 7 +- drivers/nfc/sn2xx/Kconfig | 6 + drivers/power/Kconfig | 41 +++++ drivers/power/Makefile | 13 ++ drivers/power/bq2589x_chg_mmi/Kbuild | 21 +-- drivers/power/bq2589x_chg_mmi/Kconfig | 14 ++ drivers/power/bq2597x_mmi_iio/Kbuild | 8 +- drivers/power/bq2597x_mmi_iio/Kconfig | 9 + drivers/power/bq25980_mmi_iio/Kbuild | 11 +- drivers/power/bq25980_mmi_iio/Kconfig | 16 ++ drivers/power/cw2217b_fg_mmi/Kbuild | 11 +- drivers/power/cw2217b_fg_mmi/Kconfig | 20 +++ drivers/power/mmi-smbcharger-iio/Kbuild | 6 +- drivers/power/mmi-smbcharger-iio/Kconfig | 9 + drivers/power/mmi_charger/Kbuild | 17 +- drivers/power/mmi_charger/Kconfig | 21 +++ drivers/power/mmi_discrete_charger/Kbuild | 13 +- drivers/power/mmi_discrete_charger/Kconfig | 24 +++ .../power/mmi_discrete_turbo_charger/Kbuild | 16 +- .../power/mmi_discrete_turbo_charger/Kconfig | 12 ++ drivers/power/mmi_parallel_charger_iio/Kbuild | 10 +- .../power/mmi_parallel_charger_iio/Kconfig | 9 + drivers/power/qpnp_adaptive_charge/Kbuild | 15 +- drivers/power/qpnp_adaptive_charge/Kconfig | 27 +++ drivers/power/sgm4154x_chg_mmi/Kbuild | 28 +-- drivers/power/sgm4154x_chg_mmi/Kconfig | 23 +++ drivers/power/sm5602_fg_mmi/Kbuild | 7 +- drivers/power/sm5602_fg_mmi/Kconfig | 8 + drivers/regulator/Kconfig | 4 + drivers/regulator/Makefile | 3 + drivers/regulator/wl2864c/Kbuild | 5 +- drivers/regulator/wl2864c/Kconfig | 9 + drivers/regulator/wl2868c/Kbuild | 5 +- drivers/regulator/wl2868c/Kconfig | 9 + drivers/sensors/Kbuild | 6 +- drivers/sensors/Kconfig | 5 + drivers/usb/typec/Kconfig | 4 + drivers/usb/typec/Makefile | 3 + drivers/usb/typec/adapter_class/Kbuild | 6 +- drivers/usb/typec/adapter_class/Kconfig | 11 ++ drivers/usb/typec/mmi_tcpc/Kbuild | 20 +-- drivers/usb/typec/mmi_tcpc/Kconfig | 50 ++++++ 109 files changed, 1341 insertions(+), 869 deletions(-) create mode 100644 drivers/backlight/Kconfig create mode 100644 drivers/backlight/Makefile create mode 100644 drivers/backlight/aw99703/Kconfig create mode 100644 drivers/backlight/lm3697/Kconfig create mode 100644 drivers/fm/Kconfig create mode 100644 drivers/gud/Kconfig create mode 100644 drivers/gud/Makefile create mode 100644 drivers/gud/MobiCoreDriver/Kconfig create mode 100644 drivers/input/misc/focal_fps_mmi/Kconfig create mode 100644 drivers/input/misc/fpc_fps_mmi/Kconfig create mode 100644 drivers/input/misc/goodix_fod_mmi/Kconfig create mode 100644 drivers/input/misc/rbs_fod_mmi/Kconfig create mode 100644 drivers/input/misc/rbs_fps_mmi/Kconfig create mode 100644 drivers/input/touchscreen/chipone_tddi_v2_mmi/Kconfig create mode 100644 drivers/input/touchscreen/ilitek_v3_mmi/Kconfig create mode 100644 drivers/input/touchscreen/nova_0flash_mmi/Kconfig create mode 100644 drivers/input/touchscreen/touchscreen_mmi/Kconfig create mode 100644 drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kconfig create mode 100644 drivers/misc/awinic/Kconfig create mode 100644 drivers/misc/awinic/Makefile create mode 100644 drivers/misc/awinic/sarsensor/Kconfig create mode 100644 drivers/misc/ldo_vibrator_mmi/Kconfig create mode 100644 drivers/misc/mmi_sys_temp/Kconfig create mode 100644 drivers/misc/sx937x/Kconfig create mode 100644 drivers/misc/utag/Kconfig create mode 100644 drivers/mmi_annotate/Kconfig create mode 100644 drivers/mmi_info/Kconfig create mode 100644 drivers/mmi_relay/Kconfig create mode 100644 drivers/nfc/sn2xx/Kconfig create mode 100644 drivers/power/bq2589x_chg_mmi/Kconfig create mode 100644 drivers/power/bq2597x_mmi_iio/Kconfig create mode 100644 drivers/power/bq25980_mmi_iio/Kconfig create mode 100644 drivers/power/cw2217b_fg_mmi/Kconfig mode change 100755 => 100644 drivers/power/mmi-smbcharger-iio/Kbuild create mode 100644 drivers/power/mmi-smbcharger-iio/Kconfig mode change 100755 => 100644 drivers/power/mmi_charger/Kbuild create mode 100644 drivers/power/mmi_charger/Kconfig create mode 100644 drivers/power/mmi_discrete_charger/Kconfig create mode 100644 drivers/power/mmi_discrete_turbo_charger/Kconfig create mode 100644 drivers/power/mmi_parallel_charger_iio/Kconfig mode change 100755 => 100644 drivers/power/qpnp_adaptive_charge/Kbuild create mode 100644 drivers/power/qpnp_adaptive_charge/Kconfig create mode 100644 drivers/power/sgm4154x_chg_mmi/Kconfig create mode 100644 drivers/power/sm5602_fg_mmi/Kconfig create mode 100644 drivers/regulator/wl2864c/Kconfig create mode 100644 drivers/regulator/wl2868c/Kconfig create mode 100644 drivers/sensors/Kconfig mode change 100755 => 100644 drivers/usb/typec/adapter_class/Kbuild create mode 100644 drivers/usb/typec/adapter_class/Kconfig create mode 100644 drivers/usb/typec/mmi_tcpc/Kconfig diff --git a/drivers/Kconfig b/drivers/Kconfig index e0eda1a5c3f9..adcc62cb72d1 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -230,4 +230,18 @@ source "drivers/interconnect/Kconfig" source "drivers/counter/Kconfig" +source "drivers/backlight/Kconfig" + +source "drivers/fm/Kconfig" + +source "drivers/gud/Kconfig" + +source "drivers/mmi_annotate/Kconfig" + +source "drivers/mmi_info/Kconfig" + +source "drivers/mmi_relay/Kconfig" + +source "drivers/sensors/Kconfig" + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index aaef17cc6512..56f8bdc58920 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -186,3 +186,11 @@ obj-$(CONFIG_SIOX) += siox/ obj-$(CONFIG_GNSS) += gnss/ obj-$(CONFIG_INTERCONNECT) += interconnect/ obj-$(CONFIG_COUNTER) += counter/ + +obj-y += backlight/ +obj-$(CONFIG_RADIO_ELNA) += fm/ +obj-y += gud/ +obj-$(CONFIG_MMI_ANNOTATE) += mmi_annotate/ +obj-$(CONFIG_MMI_INFO) += mmi_info/ +obj-$(CONFIG_MMI_RELAY) += mmi_relay/ +obj-$(CONFIG_SENSORS_CLASS) += sensors/ diff --git a/drivers/backlight/Kconfig b/drivers/backlight/Kconfig new file mode 100644 index 000000000000..6e39e23b5f27 --- /dev/null +++ b/drivers/backlight/Kconfig @@ -0,0 +1,2 @@ +source "drivers/backlight/aw99703/Kconfig" +source "drivers/backlight/lm3697/Kconfig" diff --git a/drivers/backlight/Makefile b/drivers/backlight/Makefile new file mode 100644 index 000000000000..5d9cb3092d0f --- /dev/null +++ b/drivers/backlight/Makefile @@ -0,0 +1,2 @@ +obj-y += aw99703/ +obj-y += lm3697/ diff --git a/drivers/backlight/aw99703/Kbuild b/drivers/backlight/aw99703/Kbuild index 0772225e16dc..68f832c8d9d0 100644 --- a/drivers/backlight/aw99703/Kbuild +++ b/drivers/backlight/aw99703/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include - -obj-m += leds_aw99703.o +obj-$(CONFIG_LEDS_AW99703) += leds_aw99703.o diff --git a/drivers/backlight/aw99703/Kconfig b/drivers/backlight/aw99703/Kconfig new file mode 100644 index 000000000000..71697d6db4d1 --- /dev/null +++ b/drivers/backlight/aw99703/Kconfig @@ -0,0 +1,9 @@ +config LEDS_AW99703 + tristate "AW99703 LED driver" + default n + help + Say Y here if you have a aw99703 compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called leds_aw99703. diff --git a/drivers/backlight/lm3697/Kbuild b/drivers/backlight/lm3697/Kbuild index 3204c539185a..02e6c849d8ba 100644 --- a/drivers/backlight/lm3697/Kbuild +++ b/drivers/backlight/lm3697/Kbuild @@ -1,8 +1,5 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include - -obj-m := leds_lm3697.o leds_lm3697-objs += ti_lm3697.o leds_lm3697-objs += ti_lm3697_backlight.o leds_lm3697-objs += ti_lm3697_backlight_data.o + +obj-$(CONFIG_LEDS_LM3697_MMI) += leds_lm3697.o diff --git a/drivers/backlight/lm3697/Kconfig b/drivers/backlight/lm3697/Kconfig new file mode 100644 index 000000000000..f68fd7d00832 --- /dev/null +++ b/drivers/backlight/lm3697/Kconfig @@ -0,0 +1,9 @@ +config LEDS_LM3697_MMI + tristate "LM3697 LED driver" + default n + help + Say Y here if you have a lm3697 compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called leds_lm3697. diff --git a/drivers/fm/Kbuild b/drivers/fm/Kbuild index 3140ec437078..2a87f1669d32 100644 --- a/drivers/fm/Kbuild +++ b/drivers/fm/Kbuild @@ -1,4 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall - -obj-m += fm_ctrl.o +obj-$(CONFIG_RADIO_ELNA) += fm_ctrl.o diff --git a/drivers/fm/Kconfig b/drivers/fm/Kconfig new file mode 100644 index 000000000000..cce31e484ba6 --- /dev/null +++ b/drivers/fm/Kconfig @@ -0,0 +1,5 @@ +config RADIO_ELNA + tristate "ELNA FM Radio" + default n + help + Choose Y here if you have this FM radio chip. diff --git a/drivers/gud/Kconfig b/drivers/gud/Kconfig new file mode 100644 index 000000000000..ae5b49f6bcac --- /dev/null +++ b/drivers/gud/Kconfig @@ -0,0 +1 @@ +source "drivers/gud/MobiCoreDriver/Kconfig" diff --git a/drivers/gud/Makefile b/drivers/gud/Makefile new file mode 100644 index 000000000000..c4b9d58867ce --- /dev/null +++ b/drivers/gud/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_MOBICORE_SUPPORT) += MobiCoreDriver/ diff --git a/drivers/gud/MobiCoreDriver/Kbuild b/drivers/gud/MobiCoreDriver/Kbuild index 973e3a3eff68..9722f5144ccd 100644 --- a/drivers/gud/MobiCoreDriver/Kbuild +++ b/drivers/gud/MobiCoreDriver/Kbuild @@ -15,19 +15,12 @@ # Makefile for the Kinibi core driver # +ccflags-y += -DNDEBUG +ccflags-y += -Wno-declaration-after-statement -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -DNDEBUG -EXTRA_CFLAGS += -Wno-declaration-after-statement -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/drivers/gud/MobiCoreDriver - -ifneq ($(filter m y,$(RSU_INTERNAL_CLOCK)),) - EXTRA_CFLAGS += -DRSU_INTERNAL_CLOCK -endif - -obj-m += mcDrvModule.o +ccflags-$(CONFIG_MOBICORE_RSU_INTERNAL_CLOCK) += -DRSU_INTERNAL_CLOCK +obj-$(CONFIG_MOBICORE_SUPPORT) += mcDrvModule.o mcDrvModule-y := \ admin.o \ diff --git a/drivers/gud/MobiCoreDriver/Kconfig b/drivers/gud/MobiCoreDriver/Kconfig new file mode 100644 index 000000000000..2cf16393c057 --- /dev/null +++ b/drivers/gud/MobiCoreDriver/Kconfig @@ -0,0 +1,16 @@ +# +# MobiCore configuration +# + +config MOBICORE_SUPPORT + tristate "Linux MobiCore Support" + default n + help + Enable Linux Kernel MobiCore Support + +config MOBICORE_RSU_INTERNAL_CLOCK + bool "MobiCore RSU internal clock" + depends on MOBICORE_SUPPORT + default n + help + Enable RSU internal clock in the MobiCore Driver. diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7f39a7dece91..2576f2749fa8 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -914,4 +914,10 @@ config INPUT_STPMIC1_ONKEY To compile this driver as a module, choose M here: the module will be called stpmic1_onkey. +source "drivers/input/misc/focal_fps_mmi/Kconfig" +source "drivers/input/misc/fpc_fps_mmi/Kconfig" +source "drivers/input/misc/goodix_fod_mmi/Kconfig" +source "drivers/input/misc/rbs_fod_mmi/Kconfig" +source "drivers/input/misc/rbs_fps_mmi/Kconfig" + endif diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 1309fab92752..5fd590578c5f 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -88,3 +88,8 @@ obj-$(CONFIG_INPUT_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o obj-$(CONFIG_INPUT_YEALINK) += yealink.o obj-$(CONFIG_INPUT_IDEAPAD_SLIDEBAR) += ideapad_slidebar.o +obj-$(CONFIG_INPUT_FOCAL_FPS_MMI) += focal_fps_mmi/ +obj-$(CONFIG_INPUT_MISC_FPC1020) += fpc_fps_mmi/ +obj-$(CONFIG_INPUT_GOODIX_FOD_MMI) += goodix_fod_mmi/ +obj-$(CONFIG_INPUT_RBS_FOD_MMI) += rbs_fod_mmi/ +obj-$(CONFIG_INPUT_EGIS_FPS_MMI) += rbs_fps_mmi/ diff --git a/drivers/input/misc/focal_fps_mmi/Kbuild b/drivers/input/misc/focal_fps_mmi/Kbuild index 4f9cb1ae2a70..7e6ebc48bd0e 100644 --- a/drivers/input/misc/focal_fps_mmi/Kbuild +++ b/drivers/input/misc/focal_fps_mmi/Kbuild @@ -1,49 +1,6 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/misc/focal_fps_mmi - - - - - - - -# Early-logging level for ff_hal, ff_ta and driver as well. Note that this -# logging level only takes effect before ff_config module is loaded. -# -# Options: -# 0 - FF_LOG_LEVEL_ALL, All -# 1 - FF_LOG_LEVEL_VBS, Verbose -# 2 - FF_LOG_LEVEL_DBG, Debug -# 3 - FF_LOG_LEVEL_INF, Info -# 4 - FF_LOG_LEVEL_WRN, Warning -# 5 - FF_LOG_LEVEL_ERR, Error -EXTRA_CFLAGS += -D__FF_BUILD_DATE=\"$(shell date +%Y%m%d)\" -EXTRA_CFLAGS += -D__FF_EARLY_LOG_LEVEL=2 - - -focal_fps_mmi-y += ff_ctl.o plat-msm.o - -ifneq ($(filter m y,$(CONFIG_INPUT_EGISTEC_FPS_NAVI)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_EGISTEC_FPS_NAVI - ets_fps_mmi-y += ets_navi_input.o -endif -ifneq ($(filter m y,$(CONFIG_INPUT_EGISTEC_FPS_NAVI_VERTICAL)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_EGISTEC_FPS_NAVI_VERTICAL -endif -ifeq ($(TARGET_BUILD_VARIANT),userdebug) - EXTRA_CFLAGS += -DFP_SPI_DEBUG -endif - -ifneq ($(filter m y,$(CONFIG_FOCAL_SUPPORT_DRM_SCREEN)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter m y, $(CONFIG_FOCAL_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_PANEL_NOTIFICATIONS -endif - -obj-m += focal_fps_mmi.o +ccflags-$(CONFIG_INPUT_FOCAL_SUPPORT_DRM_SCREEN) += -DCONFIG_DRM_PANEL_NOTIFICATIONS +ccflags-$(CONFIG_INPUT_FOCAL_PANEL_NOTIFICATIONS) += -DCONFIG_PANEL_NOTIFICATIONS +focal_fps_mmi-y += ff_ctl.o plat-msm.o +obj-$(CONFIG_INPUT_FOCAL_FPS_MMI) += focal_fps_mmi.o diff --git a/drivers/input/misc/focal_fps_mmi/Kconfig b/drivers/input/misc/focal_fps_mmi/Kconfig new file mode 100644 index 000000000000..2abbe5a35c70 --- /dev/null +++ b/drivers/input/misc/focal_fps_mmi/Kconfig @@ -0,0 +1,20 @@ +config INPUT_FOCAL_FPS_MMI + tristate "MMI Focaltech fingerprint sensor" + default n + help + Say Y here if you wish to include support for MMI focaltech fingerprint sensor. + If unsure, say N. + +config INPUT_FOCAL_SUPPORT_DRM_SCREEN + bool "MMI Focaltech fingerprint sensor DRM panel notifications" + depends on INPUT_FOCAL_FPS_MMI + default n + help + Enable DRM panel notifications for MMI Focaltech fingerprint sensor. + +config INPUT_FOCAL_PANEL_NOTIFICATIONS + bool "MMI Focaltech fingerprint sensor panel notifications" + depends on INPUT_FOCAL_FPS_MMI + default n + help + Enable panel notifications for MMI Focaltech fingerprint sensor. diff --git a/drivers/input/misc/fpc_fps_mmi/Kbuild b/drivers/input/misc/fpc_fps_mmi/Kbuild index a130565a878d..98debb6a50be 100644 --- a/drivers/input/misc/fpc_fps_mmi/Kbuild +++ b/drivers/input/misc/fpc_fps_mmi/Kbuild @@ -1,21 +1,5 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include - -prod_list := devon -find_target := $(foreach find, $(prod_list), $(findstring $(find), $(TARGET_PRODUCT))) -find_target := $(strip $(find_target)) -$(warning find_target=$(find_target)) -ifneq ($(find_target),) -$(warning define SUPPORT_PIN_CTRL) -EXTRA_CFLAGS += -DSUPPORT_PIN_CTRL -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_MISC_FPC1020_SAVE_TO_CLASS_DEVICE)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_MISC_FPC1020_SAVE_TO_CLASS_DEVICE -endif +ccflags-$(CONFIG_INPUT_MISC_FPC1020_SUPPORT_PIN_CTRL) += -DSUPPORT_PIN_CTRL fpc1020_mmi-y += fpc1020_tee.o -obj-m += fpc1020_mmi.o - +obj-$(CONFIG_INPUT_MISC_FPC1020) += fpc1020_mmi.o diff --git a/drivers/input/misc/fpc_fps_mmi/Kconfig b/drivers/input/misc/fpc_fps_mmi/Kconfig new file mode 100644 index 000000000000..4feb4b0a8463 --- /dev/null +++ b/drivers/input/misc/fpc_fps_mmi/Kconfig @@ -0,0 +1,23 @@ +config INPUT_MISC_FPC1020 + tristate "MMI FPC fingerprint sensor" + default n + help + Say Y here if you wish to include support for MMI FPC fingerprint sensor. + If unsure, say N. + +config INPUT_MISC_FPC1020_SAVE_TO_CLASS_DEVICE + bool "MMI FPC fingerprint sensor sysfs support" + default n + depends on INPUT_MISC_FPC1020 + help + Say Y here if you wish to include support for MMI FPC fingerprint sensor + sysfs. + If unsure, say N. + +config INPUT_MISC_FPC1020_SUPPORT_PIN_CTRL + bool "MMI FPC fingerprint sensor pinctrl support" + default n + depends on INPUT_MISC_FPC1020 + help + Say Y here if you wish to include pinctrl support for MMI FPC fingerprint sensor. + If unsure, say N. diff --git a/drivers/input/misc/goodix_fod_mmi/Kbuild b/drivers/input/misc/goodix_fod_mmi/Kbuild index 2be732aa5a56..0b44ab5d7d6f 100644 --- a/drivers/input/misc/goodix_fod_mmi/Kbuild +++ b/drivers/input/misc/goodix_fod_mmi/Kbuild @@ -1,21 +1,6 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -ifneq ($(filter m y,$(CONFIG_MMI_RELAY)),) - EXTRA_CFLAGS += -DMMI_RELAY_MODULE -endif - -ifneq ($(filter m y,$(CONFIG_GOODIX_DRM_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_GOODIX_DRM_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter banks%, $(TARGET_PRODUCT)),) - EXTRA_CFLAGS += -DSOFTDEP_GPIO_PCAL6408 -endif +ccflags-$(CONFIG_MMI_RELAY) += -DMMI_RELAY_MODULE +ccflags-$(CONFIG_INPUT_MISC_GOODIX_FOD_SOFTDEP) += -DSOFTDEP_GPIO_PCAL6408 goodix_fod_mmi-y += gf_spi.o netlink.o platform.o -obj-m += goodix_fod_mmi.o - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_relay/$(GKI_OBJ_MODULE_DIR)/Module.symvers +obj-$(CONFIG_INPUT_GOODIX_FOD_MMI) += goodix_fod_mmi.o diff --git a/drivers/input/misc/goodix_fod_mmi/Kconfig b/drivers/input/misc/goodix_fod_mmi/Kconfig new file mode 100644 index 000000000000..a3b6809bcbda --- /dev/null +++ b/drivers/input/misc/goodix_fod_mmi/Kconfig @@ -0,0 +1,20 @@ +config INPUT_GOODIX_FOD_MMI + tristate "MMI Goodix FOD sensor" + default n + help + Say Y here if you wish to include support for MMI Goodix FOD sensor. + If unsure, say N. + +config GOODIX_DRM_PANEL_NOTIFICATIONS + bool "MMI Goodix FOD sensor DRM panel notifications" + depends on INPUT_GOODIX_FOD_MMI + default n + help + Enable DRM panel notifications for MMI Goodix FOD sensor. + +config INPUT_MISC_GOODIX_FOD_SOFTDEP + bool "MMI Goodix FOD sensor soft dependency on GPIO_PCAL6408" + depends on INPUT_GOODIX_FOD_MMI + default n + help + Enable soft dependency on GPIO_PCAL6408 for MMI Goodix FOD sensor. diff --git a/drivers/input/misc/rbs_fod_mmi/Kbuild b/drivers/input/misc/rbs_fod_mmi/Kbuild index 8ad751e0ec30..3968a3761810 100644 --- a/drivers/input/misc/rbs_fod_mmi/Kbuild +++ b/drivers/input/misc/rbs_fod_mmi/Kbuild @@ -1,20 +1,5 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/misc/rbs_fps_mmi - -ifneq ($(filter m y,$(CONFIG_EGIS_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_PANEL_NOTIFICATIONS -endif - - -ifneq ($(filter m y,$(CONFIG_MMI_RELAY)),) - EXTRA_CFLAGS += -DMMI_RELAY_MODULE -endif +ccflags-$(CONFIG_MMI_RELAY) += -DMMI_RELAY_MODULE rbs_fod_mmi-y += etxxx_fp.o -obj-m += rbs_fod_mmi.o - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_relay/$(GKI_OBJ_MODULE_DIR)/Module.symvers - +obj-$(CONFIG_INPUT_RBS_FOD_MMI) += rbs_fod_mmi.o diff --git a/drivers/input/misc/rbs_fod_mmi/Kconfig b/drivers/input/misc/rbs_fod_mmi/Kconfig new file mode 100644 index 000000000000..b7ba145a1fcb --- /dev/null +++ b/drivers/input/misc/rbs_fod_mmi/Kconfig @@ -0,0 +1,6 @@ +config INPUT_RBS_FOD_MMI + tristate "MMI RBS FOD sensor" + default n + help + Say Y here if you wish to include support for MMI RBS FOD sensor. + If unsure, say N. diff --git a/drivers/input/misc/rbs_fps_mmi/Kbuild b/drivers/input/misc/rbs_fps_mmi/Kbuild index b55d1b2190a6..cd8d27181815 100644 --- a/drivers/input/misc/rbs_fps_mmi/Kbuild +++ b/drivers/input/misc/rbs_fps_mmi/Kbuild @@ -1,18 +1,5 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/misc/rbs_fps_mmi - -ifneq ($(filter m y,$(CONFIG_EGIS_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter m y,$(CONFIG_ET721_FOD)),) - EXTRA_CFLAGS += -DET721_FOD -endif +ccflags-$(CONFIG_INPUT_EGIS_ET721_FOD) += -DET721_FOD rbs_fps_mmi-y += etxxx_fp.o - -obj-m += rbs_fps_mmi.o - +obj-$(CONFIG_INPUT_EGIS_FPS_MMI) += rbs_fps_mmi.o diff --git a/drivers/input/misc/rbs_fps_mmi/Kconfig b/drivers/input/misc/rbs_fps_mmi/Kconfig new file mode 100644 index 000000000000..d48463cd8f3e --- /dev/null +++ b/drivers/input/misc/rbs_fps_mmi/Kconfig @@ -0,0 +1,14 @@ +config INPUT_EGIS_FPS_MMI + tristate "MMI egistec fingerprint sensor" + default n + help + Say Y here if you wish to include support for MMI egistec fingerprint sensor. + If unsure, say N. + +config INPUT_EGIS_ET721_FOD + bool "FOD Support for MMI egistec fingerprint sensor" + default n + depends on INPUT_EGIS_FPS_MMI + help + Say Y here if you wish to include FOD support for MMI egistec fingerprint sensor. + If unsure, say N. diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 2c90661cc1ef..3be770e1927c 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -1333,4 +1333,16 @@ source "drivers/input/touchscreen/synaptics_dsx/Kconfig" source "drivers/input/touchscreen/nt36xxx/Kconfig" +source "drivers/input/touchscreen/chipone_tddi_v2_mmi/Kconfig" + +source "drivers/input/touchscreen/focaltech_touch_v3/Kconfig" + +source "drivers/input/touchscreen/goodix_berlin_mmi/Kconfig" + +source "drivers/input/touchscreen/ilitek_v3_mmi/Kconfig" + +source "drivers/input/touchscreen/nova_0flash_mmi/Kconfig" + +source "drivers/input/touchscreen/touchscreen_mmi/Kconfig" + endif diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index d29fcb32e572..f16b0afaf017 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -115,3 +115,10 @@ obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_touch/ obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_TCM) += synaptics_tcm/ obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX) += synaptics_dsx/ obj-$(CONFIG_TOUCHSCREEN_NT36XXX) += nt36xxx/ + +obj-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI) += chipone_tddi_v2_mmi/ +obj-$(CONFIG_TOUCHSCREEN_FTS_V3) += focaltech_touch_v3/ +obj-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI) += goodix_berlin_mmi/ +obj-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI) += ilitek_v3_mmi/ +obj-$(CONFIG_TOUCHSCREEN_NT36xxx_HOSTDL_SPI_MMI) += nova_0flash_mmi/ +obj-$(CONFIG_INPUT_TOUCHSCREEN_MMI) += touchscreen_mmi/ diff --git a/drivers/input/touchscreen/chipone_tddi_v2_mmi/Kbuild b/drivers/input/touchscreen/chipone_tddi_v2_mmi/Kbuild index d2defc3198e9..89f493a5fbaa 100644 --- a/drivers/input/touchscreen/chipone_tddi_v2_mmi/Kbuild +++ b/drivers/input/touchscreen/chipone_tddi_v2_mmi/Kbuild @@ -1,56 +1,14 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/chipone_tddi_fhd_mmi -ifneq ($(filter m y,$(CONFIG_CHIPONE_ESD)),) -EXTRA_CFLAGS += -DCONFIG_CTS_ESD_PROTECTION -endif - -#EXTRA_CFLAGS += -DCONFIG_CTS_I2C_HOST - -ifneq ($(filter m y,$(CONFIG_INPUT_CHIPONE_0FLASH_MMI_ENABLE_DOUBLE_TAP)),) - EXTRA_CFLAGS += -DCHIPONE_SENSOR_EN - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../sensors/$(GKI_OBJ_MODULE_DIR)/Module.symvers -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_CHIPONE_0FLASH_MMI_NOTIFY_TOUCH_STATE)),) - EXTRA_CFLAGS += -DCHIPONE_SET_TOUCH_STATE -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_CHIPONE_PANEL_NOTIFICATIONS)),) -EXTRA_CFLAGS += -DCHIPONE_CONFIG_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter m y,$(CONFIG_GTP_LAST_TIME)),) - EXTRA_CFLAGS += -DCONFIG_GTP_LAST_TIME -endif - -ifneq ($(filter m y, $(CONFIG_BOARD_USES_DOUBLE_TAP_CTRL)),) - EXTRA_CFLAGS += -DCONFIG_BOARD_USES_DOUBLE_TAP_CTRL -endif - +ccflags-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI_ESD) += -DCONFIG_CTS_ESD_PROTECTION +ccflags-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI_ENABLE_DOUBLE_TAP) += -DCHIPONE_SENSOR_EN +ccflags-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI_GTP_LAST_TIME) += -DCONFIG_GTP_LAST_TIME ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_TOUCHSCREEN_MMI + ccflags-y += -DCONFIG_INPUT_TOUCHSCREEN_MMI endif +ccflags-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI_STOWED_MODE_EN) += -DCTS_STOWED_MODE_EN +ccflags-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI_PM_BRL_SPI) += -DTOUCHSCREEN_PM_BRL_SPI +ccflags-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI_CHECK_DEVICE_BOOTMODE) += -DCTS_CHECK_DEVICE_BOOTMODE -ifeq ($(TARGET_BUILD_VARIANT),user) - EXTRA_CFLAGS += -DCFG_CTS_FOR_GKI -endif - -ifneq ($(filter m y, $(CONFIG_STOWED_MODE_EN)),) - EXTRA_CFLAGS += -DCTS_STOWED_MODE_EN -endif - -ifneq ($(filter m y,$(TOUCHSCREEN_PM_BRL_SPI)),) - EXTRA_CFLAGS += -DTOUCHSCREEN_PM_BRL_SPI -endif - -ifneq ($(filter m y,$(CONFIG_CHIPONE_CHECK_DEVICE_BOOTMODE)),) - EXTRA_CFLAGS += -DCTS_CHECK_DEVICE_BOOTMODE -endif - -#obj-$(CONFIG_TOUCHSCREEN_CHIPONE) += chipone-tddi.o -obj-m += chipone_tddi_v2_mmi.o +obj-$(CONFIG_TOUCHSCREEN_CHIPONE_V2_MMI) += chipone_tddi_v2_mmi.o chipone_tddi_v2_mmi-objs := cts_driver.o chipone_tddi_v2_mmi-objs += cts_core.o @@ -66,5 +24,3 @@ chipone_tddi_v2_mmi-objs += cts_tool.o chipone_tddi_v2_mmi-objs += cts_sysfs.o chipone_tddi_v2_mmi-objs += cts_strerror.o chipone_tddi_v2_mmi-objs += cts_oem.o -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers diff --git a/drivers/input/touchscreen/chipone_tddi_v2_mmi/Kconfig b/drivers/input/touchscreen/chipone_tddi_v2_mmi/Kconfig new file mode 100644 index 000000000000..c181a31b1df3 --- /dev/null +++ b/drivers/input/touchscreen/chipone_tddi_v2_mmi/Kconfig @@ -0,0 +1,62 @@ +config TOUCHSCREEN_CHIPONE_V2_MMI + tristate "CHIPONE TDDI V2 Touchscreen" + default n + help + Say Y here if you have a Chipone flash touchscreen connected + to your system by SPI bus. + + If unsure, say N. + +config TOUCHSCREEN_CHIPONE_V2_MMI_ESD + bool "ESD detection" + depends on TOUCHSCREEN_CHIPONE_V2_MMI + default n + help + Say Y here if you want to have ESD detection support. + + If unsure, say N. + +config TOUCHSCREEN_CHIPONE_V2_MMI_ENABLE_DOUBLE_TAP + bool "Enable double tap" + depends on TOUCHSCREEN_CHIPONE_V2_MMI + default n + help + Say Y here if you want to have double tap support. + + If unsure, say N. + +config TOUCHSCREEN_CHIPONE_V2_MMI_GTP_LAST_TIME + bool "GTP last time" + depends on TOUCHSCREEN_CHIPONE_V2_MMI + default n + help + Say Y here if you want to have GTP last time support. + + If unsure, say N. + +config TOUCHSCREEN_CHIPONE_V2_MMI_STOWED_MODE_EN + bool "Enable stowed mode" + depends on TOUCHSCREEN_CHIPONE_V2_MMI + default n + help + Say Y here if you want to have stowed mode support. + + If unsure, say N. + +config TOUCHSCREEN_CHIPONE_V2_MMI_PM_BRL_SPI + bool "SPI interface for touchscreen" + depends on TOUCHSCREEN_CHIPONE_V2_MMI + default n + help + Say Y here if you want to have SPI interface support. + + If unsure, say N. + +config TOUCHSCREEN_CHIPONE_V2_MMI_CHECK_DEVICE_BOOTMODE + bool "Check device boot mode" + depends on TOUCHSCREEN_CHIPONE_V2_MMI + default n + help + Say Y here if you want to have device boot mode check support. + + If unsure, say N. diff --git a/drivers/input/touchscreen/focaltech_touch_v3/Kbuild b/drivers/input/touchscreen/focaltech_touch_v3/Kbuild index c03284477988..22eaee74d858 100644 --- a/drivers/input/touchscreen/focaltech_touch_v3/Kbuild +++ b/drivers/input/touchscreen/focaltech_touch_v3/Kbuild @@ -1,11 +1,5 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_touch_v3 \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_touch_v3/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_touch_v3/focaltech_test +obj-$(CONFIG_TOUCHSCREEN_FTS_V3) := focaltech_v3.o -obj-m := focaltech_v3.o focaltech_v3-objs += focaltech_core.o focaltech_v3-objs += focaltech_ex_fun.o focaltech_v3-objs += focaltech_ex_mode.o @@ -20,67 +14,11 @@ focaltech_v3-objs += focaltech_test/focaltech_test_ini.o focaltech_v3-objs += focaltech_test/supported_ic/focaltech_test_ft3681.o focaltech_v3-objs += focaltech_ts_config.o -ifneq ($(filter ft3681,$(CONFIG_INPUT_FOCALTECH_V3_MMI_IC_NAME)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_FOCALTECH_V3_MMI_IC_NAME_FT3681 -endif - ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI)),) - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers - EXTRA_CFLAGS += -DCONFIG_INPUT_TOUCHSCREEN_MMI - focaltech_v3-objs += focaltech_ts_mmi.o -endif -ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_V3_MMI_ENABLE_DOUBLE_TAP)),) - EXTRA_CFLAGS += -DFOCALTECH_SENSOR_EN -endif -ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_V3_MMI_ENABLE_PALM)),) - EXTRA_CFLAGS += -DFOCALTECH_PALM_SENSOR_EN -endif -ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_V3_MMI_PEN_NOTIFIER)),) - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../misc/pen/Module.symvers - EXTRA_CFLAGS += -DFOCALTECH_PEN_NOTIFIER + ccflags-y += -DCONFIG_INPUT_TOUCHSCREEN_MMI + focaltech_v3-objs += focaltech_ts_mmi.o endif +ccflags-$(CONFIG_TOUCHSCREEN_FTS_V3_ENABLE_DOUBLE_TAP) += -DFOCALTECH_SENSOR_EN +ccflags-$(CONFIG_TOUCHSCREEN_FTS_V3_ENABLE_PALM) += -DFOCALTECH_PALM_SENSOR_EN -ifneq ($(filter m y, $(CONFIG_DRM_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter m y, $(CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_EVENT_NOTIFICATIONS -endif - -ifneq ($(filter m y, $(CONFIG_FTS_NOISE_TEST_P2P)),) - EXTRA_CFLAGS += -DCONFIG_FTS_NOISE_TEST_P2P -endif - -ifneq ($(filter m y, $(CONFIG_FTS_COMPATIBLE_WITH_GKI)),) - EXTRA_CFLAGS += -DCONFIG_FTS_COMPATIBLE_WITH_GKI -endif - -ifneq ($(filter m y, $(CONFIG_FTS_DOUBLE_TAP_CONTROL)),) - EXTRA_CFLAGS += -DCONFIG_FTS_DOUBLE_TAP_CONTROL -endif - -ifneq ($(filter m y, $(CONFIG_FTS_SUPPORT_HIGH_RESOLUTION)),) - EXTRA_CFLAGS += -DCONFIG_FTS_SUPPORT_HIGH_RESOLUTION -endif - -ifneq ($(filter m y, $(CONFIG_FTS_VDD_GPIO_CONTROL)),) - EXTRA_CFLAGS += -DCONFIG_FTS_VDD_GPIO_CONTROL -endif - -ifneq ($(filter m y,$(CONFIG_FTS_LAST_TIME)),) - EXTRA_CFLAGS += -DCONFIG_FTS_LAST_TIME -endif - -ifneq ($(findstring _factory,$(TARGET_PRODUCT)),) -USE_TARGET_PRODUCT := $(strip $(subst _factory,, $(TARGET_PRODUCT))) -else -USE_TARGET_PRODUCT := $(TARGET_PRODUCT) -endif - -ifneq ($(filter bangkk%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_BANGKK -endif - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/../../kernel/msm-$(MODULE_KERNEL_VERSION)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers +ccflags-$(CONFIG_BANGKK_DTB) += -DPRODUCT_BANGKK diff --git a/drivers/input/touchscreen/focaltech_touch_v3/Kconfig b/drivers/input/touchscreen/focaltech_touch_v3/Kconfig index 919ad060a770..4b3d4c1a4af8 100644 --- a/drivers/input/touchscreen/focaltech_touch_v3/Kconfig +++ b/drivers/input/touchscreen/focaltech_touch_v3/Kconfig @@ -3,13 +3,72 @@ # config TOUCHSCREEN_FTS_V3 - bool "Focaltech Touchscreen v3" - default n - help - Say Y here if you have Focaltech touch panel. - If unsure, say N. + tristate "Focaltech Touchscreen V3" + default n + help + Say Y here if you have Focaltech V3 touch panel. + If unsure, say N. -config TOUCHSCREEN_FTS_DIRECTORY_V3 - string "Focaltech ts v3 directory name" - default "focaltech_touch_v3" - depends on TOUCHSCREEN_FTS_V3 +config TOUCHSCREEN_FTS_V3_ENABLE_DOUBLE_TAP + bool "Enable double tap" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable double tap functionality on Focaltech V3 touch panel. + If unsure, say N. + +config TOUCHSCREEN_FTS_V3_ENABLE_PALM + bool "Enable palm sensing" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable palm sensing functionality on Focaltech V3 touch panel. + If unsure, say N. + +config FTS_NOISE_TEST_P2P + bool "Enable P2P noise test" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable P2P noise test functionality on Focaltech V3 touch panel. + If unsure, say N. + +config FTS_COMPATIBLE_WITH_GKI + bool "Enable GKI compatibility" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable GKI compatibility on Focaltech V3 touch panel. + If unsure, say N. + +config FTS_DOUBLE_TAP_CONTROL + bool "Enable double tap control" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable double tap control functionality on Focaltech V3 touch panel. + If unsure, say N. + +config FTS_SUPPORT_HIGH_RESOLUTION + bool "Enable high resolution" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable high resolution functionality on Focaltech V3 touch panel. + If unsure, say N. + +config FTS_VDD_GPIO_CONTROL + bool "Enable VDD GPIO control" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable VDD GPIO control functionality on Focaltech V3 touch panel. + If unsure, say N. + +config FTS_LAST_TIME + bool "Enable last time" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable last time functionality on Focaltech V3 touch panel. + If unsure, say N. diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/Kbuild b/drivers/input/touchscreen/goodix_berlin_mmi/Kbuild index 65bf4824597e..8f5d5971e40e 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/Kbuild +++ b/drivers/input/touchscreen/goodix_berlin_mmi/Kbuild @@ -1,9 +1,5 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include +obj-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI) := goodix_brl_mmi.o -obj-m := goodix_brl_mmi.o goodix_brl_mmi-objs := \ goodix_brl_i2c.o \ goodix_brl_spi.o \ @@ -16,118 +12,36 @@ goodix_brl_mmi-objs := \ goodix_ts_tools.o \ goodix_ts_config.o -ifneq ($(filter m y, $(CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_EVENT_NOTIFICATIONS -endif +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_SPI) += -DCONFIG_TOUCHSCREEN_GOODIX_BRL_SPI -ifneq ($(filter m y,$(CONFIG_DRM_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter m y,$(CONFIG_TOUCHSCREEN_GOODIX_BRL_SPI)),) - EXTRA_CFLAGS += -DCONFIG_TOUCHSCREEN_GOODIX_BRL_SPI -endif - -ifneq ($(filter m y,$(CONFIG_GTP_FOD)),) - EXTRA_CFLAGS += -DCONFIG_GTP_FOD +ifneq ($(filter m y,$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_FOD)),) + ccflags-y += -DCONFIG_GTP_FOD goodix_brl_mmi-objs += goodix_ts_gesture_fod.o else goodix_brl_mmi-objs += goodix_ts_gesture.o endif -ifneq ($(filter m y,$(CONFIG_GTP_LIMIT_USE_SUPPLIER)),) - EXTRA_CFLAGS += -DCONFIG_GTP_LIMIT_USE_SUPPLIER -endif +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_LIMIT_USE_SUPPLIER) += -DCONFIG_GTP_LIMIT_USE_SUPPLIER +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_ENABLE_PM_QOS) += -DCONFIG_GTP_ENABLE_PM_QOS +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_ESD_ENABLE) += -DCONFIG_GOODIX_ESD_ENABLE +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_SAVE_IN_CSV) += -DGTP_SAVE_IN_CSV +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_LAST_TIME) += -DCONFIG_GTP_LAST_TIME -ifneq ($(filter m y,$(CONFIG_GTP_ENABLE_PM_QOS)),) - EXTRA_CFLAGS += -DCONFIG_GTP_ENABLE_PM_QOS -endif - -ifneq ($(filter m y,$(CONFIG_GOODIX_ESD_ENABLE)),) - EXTRA_CFLAGS += -DCONFIG_GOODIX_ESD_ENABLE -endif - -ifneq ($(filter m y,$(CONFIG_TARGET_BUILD_FACROTY)),) - EXTRA_CFLAGS += -DGTP_SAVE_IN_CSV -endif - -ifneq ($(filter m y,$(CONFIG_GTP_LAST_TIME)),) - EXTRA_CFLAGS += -DCONFIG_GTP_LAST_TIME -endif - -ifneq ($(filter m y,$(CONFIG_GTP_DDA_STYLUS)),) - EXTRA_CFLAGS += -DCONFIG_GTP_DDA_STYLUS +ifneq ($(filter m y,$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_DDA_STYLUS)),) + ccflags-y += -DCONFIG_GTP_DDA_STYLUS goodix_brl_mmi-objs += goodix_ts_dda.o endif -ifneq ($(filter m y,$(CONFIG_MOTO_DDA_PASSIVE_STYLUS)),) - EXTRA_CFLAGS += -DCONFIG_MOTO_DDA_PASSIVESTYLUS -endif +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_DDA_PASSIVE_STYLUS) += -DCONFIG_MOTO_DDA_PASSIVESTYLUS ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_TOUCHSCREEN_MMI + ccflags-y += -DCONFIG_INPUT_TOUCHSCREEN_MMI goodix_brl_mmi-objs += goodix_ts_mmi.o endif -ifneq ($(filter m y, $(CONFIG_BOARD_USES_DOUBLE_TAP_CTRL)),) - EXTRA_CFLAGS += -DCONFIG_BOARD_USES_DOUBLE_TAP_CTRL -endif +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_ENABLE_PALM) += -DGOODIX_PALM_SENSOR_EN +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_PALM_CANCEL) += -DCONFIG_ENABLE_GTP_PALM_CANCEL +ccflags-$(CONFIG_TOUCHSCREEN_GOODIX_BRL_MMI_PASSIVE_PEN_NOTIFIER) += -DGTP_PEN_NOTIFIER -ifneq ($(filter m y,$(CONFIG_INPUT_GOODIX_MMI_ENABLE_PALM)),) - EXTRA_CFLAGS += -DGOODIX_PALM_SENSOR_EN -endif - -ifeq ($(TARGET_BUILD_VARIANT), userdebug) -ifneq ($(filter m y, $(CONFIG_GTP_GHOST_LOG_CAPTURE)),) - EXTRA_CFLAGS += -DCONFIG_GTP_GHOST_LOG_CAPTURE - goodix_brl_mmi-objs += goodix_ts_log_capture.o -endif -endif - -ifneq ($(filter m y,$(CONFIG_ENABLE_GTP_PALM_CANCEL)),) - EXTRA_CFLAGS += -DCONFIG_ENABLE_GTP_PALM_CANCEL -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_GTP_PASSIVE_PEN_NOTIFIER)),) - EXTRA_CFLAGS += -DGTP_PEN_NOTIFIER -endif - -ifneq ($(findstring _factory,$(TARGET_PRODUCT)),) -USE_TARGET_PRODUCT := $(strip $(subst _factory,, $(TARGET_PRODUCT))) -else -USE_TARGET_PRODUCT := $(TARGET_PRODUCT) -endif - -ifneq ($(filter oneli, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_ONELI -else ifneq ($(filter hiphi, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_HIPHI -else ifneq ($(filter hiphic, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_HIPHIC -else ifneq ($(filter li, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_LI -else ifneq ($(filter eqs, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_EQS -else ifneq ($(filter tundra%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_TUNDRA -else ifneq ($(filter miami%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_MIAMI -else ifneq ($(filter rtwo%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_RTWO -else ifneq ($(filter ctwo%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_CTWO -else ifneq ($(filter bronco, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_BRONCO -else ifneq ($(filter felix, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DCONFIG_GTP_DISP_MODE -else ifneq ($(filter zeekr%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_ZEEKR -else ifneq ($(filter lynkco%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_LYNKCO -else ifneq ($(filter bangkk%, $(USE_TARGET_PRODUCT)), ) - EXTRA_CFLAGS += -DPRODUCT_BANGKK -endif -$(warning "william EXTRA_CFLAGS = $(EXTRA_CFLAGS)") - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers +ccflags-$(CONFIG_MIAMI_DTB) += -DPRODUCT_MIAMI +ccflags-$(CONFIG_BANGKK_DTB) += -DPRODUCT_BANGKK diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/Kconfig b/drivers/input/touchscreen/goodix_berlin_mmi/Kconfig index 223d5aea824e..8130bb0ff2c6 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/Kconfig +++ b/drivers/input/touchscreen/goodix_berlin_mmi/Kconfig @@ -1,20 +1,76 @@ # # Goodix touchscreen driver configuration # -menuconfig TOUCHSCREEN_GOODIX_BRL - tristate "Goodix berlin touchscreen" +menuconfig TOUCHSCREEN_GOODIX_BRL_MMI + tristate "MMI Goodix berlin touchscreen" + default n help - Say Y here if you have a Goodix berlin series touch controller + Say Y here if you have a MMI Goodix berlin series touch controller to your system. If build module, say M. If unsure, say N. -if TOUCHSCREEN_GOODIX_BRL +if TOUCHSCREEN_GOODIX_BRL_MMI -config TOUCHSCREEN_GOODIX_BRL_SPI +config TOUCHSCREEN_GOODIX_BRL_MMI_SPI bool "support SPI bus connection" help - Say Y here if the touchscreen is connected via SPI bus. + Say Y here if the touchscreen is connected via SPI bus. + +config TOUCHSCREEN_GOODIX_BRL_MMI_FOD + bool "Enable FOD" + help + Say Y here to support FOD. + +config TOUCHSCREEN_GOODIX_BRL_MMI_LIMIT_USE_SUPPLIER + bool "Support using supplier" + help + Say Y here to support using supplier. + +config TOUCHSCREEN_GOODIX_BRL_MMI_ENABLE_PM_QOS + bool "Enable PM QoS" + help + Say Y here to support PM QoS. + +config TOUCHSCREEN_GOODIX_BRL_MMI_ESD_ENABLE + bool "Support ESD" + help + Say Y here to support ESD. + +config TOUCHSCREEN_GOODIX_BRL_MMI_SAVE_IN_CSV + bool "Factory calibration" + help + Say Y here to support factory calibration. + +config TOUCHSCREEN_GOODIX_BRL_MMI_LAST_TIME + bool "Support last time" + help + Say Y here to support last time. + +config TOUCHSCREEN_GOODIX_BRL_MMI_DDA_STYLUS + bool "Support stylus" + help + Say Y here to support stylus. + +config TOUCHSCREEN_GOODIX_BRL_MMI_DDA_PASSIVE_STYLUS + bool "Support passive stylus" + help + Say Y here to support passive stylus. + +config TOUCHSCREEN_GOODIX_BRL_MMI_ENABLE_PALM + bool "Support palm detection" + help + Say Y here to support palm detection. + +config TOUCHSCREEN_GOODIX_BRL_MMI_PALM_CANCEL + bool "Support palm cancel" + help + Say Y here to support palm cancel. + +config TOUCHSCREEN_GOODIX_BRL_MMI_PASSIVE_PEN_NOTIFIER + bool "Support pen notifier" + help + Say Y here to support pen notifier. endif diff --git a/drivers/input/touchscreen/ilitek_v3_mmi/Kbuild b/drivers/input/touchscreen/ilitek_v3_mmi/Kbuild index 8b681f25514f..8bb7b97968f0 100644 --- a/drivers/input/touchscreen/ilitek_v3_mmi/Kbuild +++ b/drivers/input/touchscreen/ilitek_v3_mmi/Kbuild @@ -1,63 +1,22 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/ilitek_v3_mmi \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/ilitek_v3_mmi/firmware +obj-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI) += ilitek_v3_mmi.o -ifeq ($(filter m y, $(CONFIG_TOUCHSCREEN_ILITEK_CHIPSET)),) - obj-m += ilitek_v3_mmi.o -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_ILI_ENABLE_DOUBLE_TAP)),) - EXTRA_CFLAGS += -DILI_SENSOR_EN - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../sensors/$(GKI_OBJ_MODULE_DIR)/Module.symvers -endif - -ifneq ($(filter m y, $(CONFIG_BOARD_USES_DOUBLE_TAP_CTRL)),) - EXTRA_CFLAGS += -DILI_DOUBLE_TAP_CTRL - EXTRA_CFLAGS += -DILI_PRIMARY_NODE -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_ILI_SET_TOUCH_STATE)),) - EXTRA_CFLAGS += -DILI_SET_TOUCH_STATE -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_ILI_PANEL_NOTIFICATIONS)),) -EXTRA_CFLAGS += -DILI_CONFIG_PANEL_NOTIFICATIONS -endif -ifneq ($(filter m y,$(CONFIG_ILITEK_RESUME_BY_DDI)),) -EXTRA_CFLAGS += -DILI_CONFIG_RESUME_BY_DDI -endif -ifneq ($(filter m y,$(CONFIG_ILITEK_CHARGER)),) -EXTRA_CFLAGS += -DILI_CONFIG_MTK_CHARGER -endif -ifneq ($(filter m y,$(CONFIG_ILITEK_ESD)),) -EXTRA_CFLAGS += -DILI_CONFIG_ESD -endif - -ifneq ($(filter m y,$(CONFIG_ILITEK_MTK_CHECK_PANEL)),) - EXTRA_CFLAGS += -DILI_MTK_CHECK_PANEL -endif - -ifneq ($(filter m y,$(CONFIG_ILITEK_MULTI_TP_MODULE)),) - EXTRA_CFLAGS += -DILI_TP_MODULE_EN -endif - -ifneq ($(filter m y,$(CONFIG_ILI_TOUCH_LAST_TIME)),) - EXTRA_CFLAGS += -DILI_TOUCH_LAST_TIME -endif +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_ENABLE_DOUBLE_TAP) += -DILI_SENSOR_EN +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_USES_DOUBLE_TAP_CTRL) += -DILI_DOUBLE_TAP_CTRL +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_USES_DOUBLE_TAP_CTRL) += -DILI_PRIMARY_NODE +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_SET_TOUCH_STATE) += -DILI_SET_TOUCH_STATE +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_RESUME_BY_DDI) += -DILI_CONFIG_RESUME_BY_DDI +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_CHARGER) += -DILI_CONFIG_MTK_CHARGER +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_MTK_CHECK_PANEL) += -DILI_MTK_CHECK_PANEL +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_MULTI_TP_MODULE) += -DILI_TP_MODULE_EN +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_LAST_TIME) += -DILI_TOUCH_LAST_TIME ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_TOUCHSCREEN_MMI + ccflags-y += -DCONFIG_INPUT_TOUCHSCREEN_MMI endif -ifeq ($(TARGET_BUILD_VARIANT),user) - EXTRA_CFLAGS += -DGKI_EN_FLAG -endif +ccflags-y += -DGKI_EN_FLAG +ccflags-$(CONFIG_TOUCHSCREEN_ILITEK_V3_MMI_STOWED_MODE_EN) += -DILI_STOWED_MODE_EN -ifneq ($(filter m y, $(CONFIG_STOWED_MODE_EN)),) - EXTRA_CFLAGS += -DILI_STOWED_MODE_EN -endif ilitek_v3_mmi-objs += ilitek_v3.o ilitek_v3_mmi-objs += ilitek_v3_spi.o ilitek_v3_mmi-objs += ilitek_v3_qcom.o @@ -66,5 +25,3 @@ ilitek_v3_mmi-objs += ilitek_v3_touch.o ilitek_v3_mmi-objs += ilitek_v3_mp.o ilitek_v3_mmi-objs += ilitek_v3_hostdl.o ilitek_v3_mmi-objs += ilitek_v3_node.o -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers diff --git a/drivers/input/touchscreen/ilitek_v3_mmi/Kconfig b/drivers/input/touchscreen/ilitek_v3_mmi/Kconfig new file mode 100644 index 000000000000..cd81d4cbb3c1 --- /dev/null +++ b/drivers/input/touchscreen/ilitek_v3_mmi/Kconfig @@ -0,0 +1,89 @@ +config TOUCHSCREEN_ILITEK_V3_MMI + tristate "MMI Ilitek V3 Touchscreen" + default n + help + Say Y here if you have an MMI Ilitek V3 touchscreen connected + to your system by SPI bus. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_ENABLE_DOUBLE_TAP + bool "Enable double tap" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable double tap for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_USES_DOUBLE_TAP_CTRL + bool "Double tap control" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable double tap control for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_SET_TOUCH_STATE + bool "Set touch state" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable touch state for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_RESUME_BY_DDI + bool "Resume by DDI" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable resume by DDI for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_CHARGER + bool "Charger support" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable charger support for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_MTK_CHECK_PANEL + bool "MTK panel check" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable MTK panel check for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_MULTI_TP_MODULE + bool "Multi TP module" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable multi TP module for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_LAST_TIME + bool "Touch last time" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable touch last time for MMI Ilitek V3 touchscreen. + + If unsure, say N. + +config TOUCHSCREEN_ILITEK_V3_MMI_STOWED_MODE_EN + bool "Enable stowed mode" + depends on TOUCHSCREEN_ILITEK_V3_MMI + default n + help + Say Y here to enable stowed mode for MMI Ilitek V3 touchscreen. + + If unsure, say N. diff --git a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild index 5aac7d2ba3b2..09d74b7479bb 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild +++ b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild @@ -1,110 +1,33 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/nova_0flash_mmi +obj-$(CONFIG_TOUCHSCREEN_NT36xxx_HOSTDL_SPI_MMI) += nova_0flash_mmi.o -ifeq ($(filter m y, $(CONFIG_TOUCHSCREEN_NT36xxx_HOSTDL_SPI)),) - obj-m := nova_0flash_mmi.o -endif -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_ENABLE_DOUBLE_TAP)),) - EXTRA_CFLAGS += -DNVT_SENSOR_EN - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../sensors/$(GKI_OBJ_MODULE_DIR)/Module.symvers -endif -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_NOTIFY_TOUCH_STATE)),) - EXTRA_CFLAGS += -DNVT_SET_TOUCH_STATE -endif - -ifneq ($(filter m y,$(CONFIG_NOVA_TOUCH_LAST_TIME)),) - EXTRA_CFLAGS += -DNVT_TOUCH_LAST_TIME -endif - -ifneq ($(filter m y, $(CONFIG_INPUT_HIGH_RESOLUTION_N)),) - EXTRA_CFLAGS += -DCONFIG_INPUT_HIGH_RESOLUTION_N -endif - -ifneq ($(filter m y, $(CONFIG_STOWED_MODE_EN)),) - EXTRA_CFLAGS += -DNOVA_STOWED_MODE_EN -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_PANEL_NOTIFICATIONS)),) -EXTRA_CFLAGS += -DNVT_CONFIG_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_DRM_PANEL)),) - EXTRA_CFLAGS += -DNVT_CONFIG_DRM_PANEL -endif - -ifeq ($(TARGET_BUILD_VARIANT),user) - EXTRA_CFLAGS += -DCFG_CTS_FOR_GKI -endif - -ifneq ($(filter m y,$(CONFIG_TOUCH_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_PANEL_NOTIFICATIONS -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_CHIP_VER_1)),) - EXTRA_CFLAGS += -DNVT_CONFIG_CHIP_VER_1 -endif - -ifneq ($(filter m y,$(CONFIG_NOVA_ESD_ENABLE)),) - EXTRA_CFLAGS += -DNVT_CONFIG_ESD_ENABLE -endif - -ifneq ($(filter m y,$(CONFIG_NOVA_LCM_FAST_LIGHTUP)),) - EXTRA_CFLAGS += -DLCM_FAST_LIGHTUP -endif - -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_STYLUS_PALM)),) - EXTRA_CFLAGS += -DPALM_GESTURE -endif -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_STYLUS_PALM_RANGE)),) - EXTRA_CFLAGS += -DPALM_GESTURE_RANGE -endif -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_PEN_NOTIFIER)),) - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../misc/pen/$(GKI_OBJ_MODULE_DIR)/Module.symvers - EXTRA_CFLAGS += -DNOVATECH_PEN_NOTIFIER -endif -ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_EDGE_SUPPRESSION)),) - EXTRA_CFLAGS += -DEDGE_SUPPRESSION -endif - -ifneq ($(filter m y, $(CONFIG_BOARD_USES_DOUBLE_TAP_CTRL)),) - EXTRA_CFLAGS += -DCONFIG_BOARD_USES_DOUBLE_TAP_CTRL -endif - -ifneq ($(filter m y, $(CONFIG_NVT_WAKEUP_GESTURE_CTRL)),) - EXTRA_CFLAGS += -DNVT_WAKEUP_GESTURE_CTRL -endif - -ifneq ($(filter m y, $(CONFIG_SPI_SM8450)),) - EXTRA_CFLAGS += -DCONFIG_SPI_SM8450 -endif +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_ENABLE_DOUBLE_TAP) += -DNVT_SENSOR_EN +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_NOTIFY_TOUCH_STATE) += -DNVT_SET_TOUCH_STATE +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_LAST_TIME) += -DNVT_TOUCH_LAST_TIME +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_HIGH_RESOLUTION_N) += -DCONFIG_INPUT_HIGH_RESOLUTION_N +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_STOWED_MODE_EN) += -DNOVA_STOWED_MODE_EN +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_PANEL_NOTIFICATIONS) += -DNVT_CONFIG_PANEL_NOTIFICATIONS +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_DRM_PANEL) += -DNVT_CONFIG_DRM_PANEL +ccflags-y += -DCFG_CTS_FOR_GKI +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_CHIP_VER_1) += -DNVT_CONFIG_CHIP_VER_1 +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_ESD_ENABLE) += -DNVT_CONFIG_ESD_ENABLE +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_LCM_FAST_LIGHTUP) += -DLCM_FAST_LIGHTUP +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_STYLUS_PALM) += -DPALM_GESTURE +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_STYLUS_PALM_RANGE) += -DPALM_GESTURE_RANGE +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_PEN_NOTIFIER) += -DNOVATECH_PEN_NOTIFIER +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_EDGE_SUPPRESSION) += -DEDGE_SUPPRESSION +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_WAKEUP_GESTURE_CTRL) += -DNVT_WAKEUP_GESTURE_CTRL +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_SPI_SM8450) += -DCONFIG_SPI_SM8450 nova_0flash_mmi-objs += nt36xxx.o nova_0flash_mmi-objs += nt36xxx_ext_proc.o nova_0flash_mmi-objs += nt36xxx_fw_update.o nova_0flash_mmi-objs += nt36xxx_mp_ctrlram.o -ifneq ($(filter m y,$(CONFIG_DRM_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_NOTIFICATIONS -endif -ifneq ($(filter m y,$(CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_EVENT_NOTIFICATIONS -endif -ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI_NVT)),) - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers - EXTRA_CFLAGS += -DCONFIG_INPUT_TOUCHSCREEN_MMI + +ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI)),) + ccflags-y += -DCONFIG_INPUT_TOUCHSCREEN_MMI nova_0flash_mmi-objs += nt36xxx_mmi_class.o - - ifneq ($(filter m y, $(CONFIG_TOUCHCLASS_MMI_MULTIWAY_UPDATE_FW)),) - EXTRA_CFLAGS += -DTS_MMI_TOUCH_MULTIWAY_UPDATE_FW - endif -endif -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/../../kernel/msm-$(MODULE_KERNEL_VERSION)/Module.symvers - -ifneq ($(filter m y,$(CONFIG_GTP_DDA_STYLUS)),) - EXTRA_CFLAGS += -DCONFIG_MOTO_DDA_PASSIVESTYLUS - nova_0flash_mmi-objs += moto_ts_dda.o endif -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers - +ccflags-$(CONFIG_TOUCHCLASS_MMI_MULTIWAY_UPDATE_FW) += -DTS_MMI_TOUCH_MULTIWAY_UPDATE_FW +ccflags-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_DDA_STYLUS) += -DCONFIG_MOTO_DDA_PASSIVESTYLUS +nova_0flash_mmi-$(CONFIG_TOUCHSCREEN_NOVA_0FLASH_MMI_DDA_STYLUS) += moto_ts_dda.o diff --git a/drivers/input/touchscreen/nova_0flash_mmi/Kconfig b/drivers/input/touchscreen/nova_0flash_mmi/Kconfig new file mode 100644 index 000000000000..adfba32b6c4b --- /dev/null +++ b/drivers/input/touchscreen/nova_0flash_mmi/Kconfig @@ -0,0 +1,169 @@ +# +# Novatek NT36xxx touchscreen driver configuration +# +menuconfig TOUCHSCREEN_NT36xxx_HOSTDL_SPI_MMI + tristate "Moto Novatek NT36xxx host download SPI driver" + default n + help + Say Y here if you have a Moto Novatek NT36xxx no flash touchscreen + connected to your system by SPI bus. + + If unsure, say N. + +if TOUCHSCREEN_NT36xxx_HOSTDL_SPI_MMI + +config TOUCHSCREEN_NOVA_0FLASH_MMI_ENABLE_DOUBLE_TAP + bool "Moto Novatek NT36xxx double tap" + depends on SENSORS_CLASS + default n + help + Say Y here if you want to have double tap support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_NOTIFY_TOUCH_STATE + bool "Moto Novatek NT36xxx notify touch state" + default n + help + Say Y here if you want to have touch state notification support on + Moto Novatek NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_LAST_TIME + bool "Moto Novatek NT36xxx touch last time" + default n + help + Say Y here if you want to have touch last time support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_HIGH_RESOLUTION_N + bool "Moto Novatek NT36xxx high resolution" + default n + help + Say Y here if you want to have high resolution support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_STOWED_MODE_EN + bool "Moto Novatek NT36xxx stowed mode" + default n + help + Say Y here if you want to have stowed mode support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_PANEL_NOTIFICATIONS + bool "Moto Novatek NT36xxx panel notifications" + default n + help + Say Y here if you want to have panel notifications support on Moto + Novatek NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_DRM_PANEL + bool "Moto Novatek NT36xxx DRM panel" + default n + help + Say Y here if you want to have DRM panel support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_CHIP_VER_1 + bool "Moto Novatek NT36xxx touch chip ver 1" + default n + help + Say Y here if you want to have touch chip ver 1 support on Moto + Novatek NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_ESD_ENABLE + bool "Moto Novatek NT36xxx ESD detection" + default n + help + Say Y here if you want to have ESD detection support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_LCM_FAST_LIGHTUP + bool "Moto Novatek NT36xxx lcm fast lightup" + default n + help + Say Y here if you want to have lcm fast lightup support on Moto + Novatek NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_STYLUS_PALM + bool "Moto Novatek NT36xxx stylus palm" + default n + help + Say Y here if you want to have stylus palm support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_STYLUS_PALM_RANGE + bool "Moto Novatek NT36xxx stylus palm range" + default n + help + Say Y here if you want to have stylus palm range support on Moto + Novatek NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_PEN_NOTIFIER + bool "Moto Novatek NT36xxx pen notifier" + default n + help + Say Y here if you want to have pen notifier support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_EDGE_SUPPRESSION + bool "Moto Novatek NT36xxx edge touch suppression" + default n + help + Say Y here if you want to have edge touch suppression support on Moto + Novatek NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_WAKEUP_GESTURE_CTRL + bool "Moto Novatek NT36xxx wakeup gesture control" + default n + help + Say Y here if you want to have wakeup gesture control support on Moto + Novatek NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_SPI_SM8450 + bool "Moto Novatek NT36xxx SPI sm8450" + default n + help + Say Y here if you want to have SPI sm8450 support on Moto Novatek + NT36xxx. + + If unsure, say N. + +config TOUCHSCREEN_NOVA_0FLASH_MMI_DDA_STYLUS + bool "Moto Novatek NT36xxx DDA stylus" + default n + help + Say Y here if you want to have DDA stylus support on Moto Novatek + NT36xxx. + + If unsure, say N. + +endif diff --git a/drivers/input/touchscreen/touchscreen_mmi/Kbuild b/drivers/input/touchscreen/touchscreen_mmi/Kbuild index f937be291cf6..2034c92a9ec4 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/Kbuild +++ b/drivers/input/touchscreen/touchscreen_mmi/Kbuild @@ -1,41 +1,6 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include +ccflags-$(CONFIG_TOUCHCLASS_MMI_GESTURE_POISON_EVENT) += -DTS_MMI_TOUCH_GESTURE_POISON_EVENT +ccflags-$(CONFIG_TOUCHCLASS_MMI_MULTIWAY_UPDATE_FW) += -DTS_MMI_TOUCH_MULTIWAY_UPDATE_FW -ifneq ($(filter m y, $(CONFIG_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_PANEL_NOTIFICATIONS -endif -ifneq ($(filter m y, $(CONFIG_DRM_DYNAMIC_REFRESH_RATE)),) - EXTRA_CFLAGS += -DCONFIG_DRM_DYNAMIC_REFRESH_RATE -endif -ifneq ($(filter m y, $(CONFIG_TOUCHCLASS_MMI_DEBUG_INFO)),) - EXTRA_CFLAGS += -DCONFIG_TOUCHCLASS_MMI_DEBUG_INFO -endif -ifneq ($(filter m y, $(CONFIG_TOUCHCLASS_MMI_GESTURE_POISON_EVENT)),) - EXTRA_CFLAGS += -DTS_MMI_TOUCH_GESTURE_POISON_EVENT -endif -ifneq ($(filter m y, $(CONFIG_TOUCHCLASS_MMI_MULTIWAY_UPDATE_FW)),) - EXTRA_CFLAGS += -DTS_MMI_TOUCH_MULTIWAY_UPDATE_FW -endif -ifneq ($(filter m y, $(CONFIG_DRM_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_NOTIFICATIONS -endif -ifneq ($(filter m y, $(CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_EVENT_NOTIFICATIONS -endif -ifneq ($(filter m y, $(CONFIG_TOUCH_PANEL_NOTIFICATIONS)),) - EXTRA_CFLAGS += -DCONFIG_PANEL_NOTIFICATIONS -endif -ifneq ($(filter m y, $(CONFIG_TS_KERNEL_USE_GKI)),) - EXTRA_CFLAGS += -DCONFIG_TS_KERNEL_USE_GKI -endif -ifneq ($(filter m y, $(CONFIG_BOARD_USES_DOUBLE_TAP_CTRL)),) - EXTRA_CFLAGS += -DCONFIG_BOARD_USES_DOUBLE_TAP_CTRL -endif - -obj-m := touchscreen_mmi.o touchscreen_mmi-objs := touchscreen_mmi_class.o touchscreen_mmi_panel.o touchscreen_mmi_notif.o touchscreen_mmi_gesture.o -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../sensors/$(GKI_OBJ_MODULE_DIR)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_relay/$(GKI_OBJ_MODULE_DIR)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/../../kernel/msm-$(MODULE_KERNEL_VERSION)/Module.symvers +obj-$(CONFIG_INPUT_TOUCHSCREEN_MMI) := touchscreen_mmi.o diff --git a/drivers/input/touchscreen/touchscreen_mmi/Kconfig b/drivers/input/touchscreen/touchscreen_mmi/Kconfig new file mode 100644 index 000000000000..a22dcf154527 --- /dev/null +++ b/drivers/input/touchscreen/touchscreen_mmi/Kconfig @@ -0,0 +1,67 @@ +config INPUT_TOUCHSCREEN_MMI + tristate "Moto touchscreen gestures" + depends on SENSORS_CLASS && MMI_RELAY + default n + help + Say Y here if you wish to include support for Moto touchscreen gestures. + If unsure, say N. + +if INPUT_TOUCHSCREEN_MMI + +config DRM_DYNAMIC_REFRESH_RATE + bool "Moto panel DRM dynamic refresh rate" + default n + help + Say Y here if your panel includes support for DRM dynamic refresh rate. + If unsure, say N. + +config TOUCHCLASS_MMI_DEBUG_INFO + bool "Moto touchscreen gestures debug info" + default n + help + Say Y here if you wish to include support for Moto touchscreen gestures debugging info. + If unsure, say N. + +config TOUCHCLASS_MMI_GESTURE_POISON_EVENT + bool "Moto gestures event poison" + default n + help + Say Y here if you wish to include support for Moto gestures event poison. + If unsure, say N. + +endif + +config PANEL_NOTIFICATIONS + bool "Moto panel notifications" + default n + help + Say Y here if your panel includes support for notifications. + If unsure, say N. + +config DRM_PANEL_NOTIFICATIONS + bool "Moto DRM panel notifications" + default n + help + Say Y here if your panel includes support for drm notifications. + If unsure, say N. + +config DRM_PANEL_EVENT_NOTIFICATIONS + bool "Moto DRM panel event notifications" + default n + help + Say Y here if your panel includes support for drm panel event notifications. + If unsure, say N. + +config BOARD_USES_DOUBLE_TAP_CTRL + bool "Moto double tap control" + default n + help + Say Y here if your panel includes support for double tap control. + If unsure, say N. + +config TOUCHCLASS_MMI_MULTIWAY_UPDATE_FW + bool "Moto TP firmware through the Parameter APK" + default n + help + Say Y here if you want to have TP firmware through the Parameter APK. + If unsure, say N. diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 928a67f4e9bf..1ed222147cd7 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -896,6 +896,13 @@ config LEDS_QPNP_VIBRATOR_LDO peripheral found on Qualcomm Technologies, Inc. QPNP PMICs. The vibrator-ldo peripheral is capable of driving ERM vibrators. +config LEDS_INDICATOR_PWM + tristate "Indicator LED-PWM support for QPNP PMIC" + depends on LEDS_CLASS && MFD_SPMI_PMIC + help + This option enables device driver support for the indicator-led + peripheral found on Qualcomm Technologies, Inc. QPNP PMICs. + comment "LED Triggers" source "drivers/leds/trigger/Kconfig" diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index 6eaf51b2fcfe..fe4892d4ef49 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_LEDS_LM36274) += leds-lm36274.o obj-$(CONFIG_LEDS_QTI_TRI_LED) += leds-qti-tri-led.o obj-$(CONFIG_LEDS_QPNP_FLASH_V2) += leds-qpnp-flash-v2.o obj-$(CONFIG_LEDS_QPNP_VIBRATOR_LDO) += leds-qpnp-vibrator-ldo.o +obj-$(CONFIG_LEDS_INDICATOR_PWM) += leds-indicator-pwm.o # LED SPI Drivers obj-$(CONFIG_LEDS_CR0014114) += leds-cr0014114.o diff --git a/drivers/media/platform/msm/Kconfig b/drivers/media/platform/msm/Kconfig index 009955e83490..5044e5cad8a3 100644 --- a/drivers/media/platform/msm/Kconfig +++ b/drivers/media/platform/msm/Kconfig @@ -3,3 +3,4 @@ source "drivers/media/platform/msm/synx/Kconfig" source "drivers/media/platform/msm/cvp/Kconfig" source "drivers/media/platform/msm/npu/Kconfig" +source "drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kconfig" diff --git a/drivers/media/platform/msm/Makefile b/drivers/media/platform/msm/Makefile index b31237b525f1..581d2b2a480f 100644 --- a/drivers/media/platform/msm/Makefile +++ b/drivers/media/platform/msm/Makefile @@ -2,3 +2,4 @@ obj-$(CONFIG_MSM_NPU) += npu/ obj-$(CONFIG_MSM_GLOBAL_SYNX) += synx/ obj-$(CONFIG_MSM_CVP) += cvp/ +obj-$(CONFIG_CAMERA_CCI_INTF) += camera/cam_sensor_module/cam_cci/ diff --git a/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kbuild b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kbuild index 0be27cdfd1af..31b754fecf69 100644 --- a/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kbuild +++ b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kbuild @@ -1,35 +1,15 @@ -HAVE_KERNEL_4_19 = $(shell test -d $(ANDROID_BUILD_TOP)/kernel/msm-4.19 && echo 1) +KERNEL_CAMERA_DRIVER_PATH ?= $(srctree)/$(src)/../../../../../../../techpack/camera/drivers -HAVE_KERNEL_5_4 = $(shell test -d $(ANDROID_BUILD_TOP)/kernel/msm-5.4 && echo 1) +ccflags-y += -DCONFIG_SPECTRA_CAMERA=1 +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/../include +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/../include/uapi +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/../include/uapi/camera +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_utils +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_cpas/include +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_sensor_module/cam_sensor_io +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_sensor_module/cam_sensor_utils +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_sensor_module/cam_cci +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_req_mgr +ccflags-y += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_smmu -ifeq ($(HAVE_KERNEL_4_19),1) - KERNEL_SOURCE_PATH ?= kernel/msm-4.19 -else ifeq ($(HAVE_KERNEL_5_4),1) - KERNEL_SOURCE_PATH ?= kernel/msm-5.4 -else - KERNEL_SOURCE_PATH ?= kernel/msm-4.9 -endif - -HAVE_TECHPACK_CAMERA = $(shell test -d $(ANDROID_BUILD_TOP)/$(KERNEL_SOURCE_PATH)/techpack/camera && echo 1) - -ifeq ($(HAVE_TECHPACK_CAMERA),1) - KERNEL_CAMERA_DRIVER_PATH ?= $(ANDROID_BUILD_TOP)/$(KERNEL_SOURCE_PATH)/techpack/camera/drivers - EXTRA_CFLAGS += -DCONFIG_SPECTRA_CAMERA=1 - EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/../include - EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/../include/uapi - EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/../include/uapi/camera -else - KERNEL_CAMERA_DRIVER_PATH ?= $(ANDROID_BUILD_TOP)/$(KERNEL_SOURCE_PATH)/drivers/media/platform/msm/camera -endif - -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include -EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_utils -EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_cpas/include -EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_sensor_module/cam_sensor_io -EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_sensor_module/cam_sensor_utils -EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_sensor_module/cam_cci -EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_req_mgr -EXTRA_CFLAGS += -I$(KERNEL_CAMERA_DRIVER_PATH)/cam_smmu - -obj-m += cci_intf.o +obj-$(CONFIG_CAMERA_CCI_INTF) += cci_intf.o diff --git a/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kconfig b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kconfig new file mode 100644 index 000000000000..f9c2b744aeb6 --- /dev/null +++ b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/Kconfig @@ -0,0 +1,6 @@ +config CAMERA_CCI_INTF + tristate "Moto camera CCI interface" + default n + help + Say Y here if you wish to include support for Moto camera CCI interface. + If unsure, say N. diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 4ffeae16c408..b33311b15236 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -539,4 +539,9 @@ source "drivers/misc/cxl/Kconfig" source "drivers/misc/ocxl/Kconfig" source "drivers/misc/cardreader/Kconfig" source "drivers/misc/habanalabs/Kconfig" +source "drivers/misc/awinic/Kconfig" +source "drivers/misc/ldo_vibrator_mmi/Kconfig" +source "drivers/misc/mmi_sys_temp/Kconfig" +source "drivers/misc/sx937x/Kconfig" +source "drivers/misc/utag/Kconfig" endmenu diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 66777718f9dd..604b738085cb 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -65,3 +65,9 @@ qseecom-mod-$(CONFIG_COMPAT) += compat_qseecom.o obj-$(CONFIG_PROFILER) += profiler.o obj-$(CONFIG_WIGIG_SENSING_SPI) += wigig_sensing.o obj-$(CONFIG_HISI_HIKEY_USB) += hisi_hikey_usb.o + +obj-y += awinic/ +obj-$(CONFIG_LDO_VIBRATOR_MMI) += ldo_vibrator_mmi/ +obj-$(CONFIG_MMI_SYS_TEMP) += mmi_sys_temp/ +obj-$(CONFIG_SARSENSOR_SX937X) += sx937x/ +obj-$(CONFIG_MOTO_UTAGS) += utag/ diff --git a/drivers/misc/awinic/Kconfig b/drivers/misc/awinic/Kconfig new file mode 100644 index 000000000000..c9fbf1c5adfa --- /dev/null +++ b/drivers/misc/awinic/Kconfig @@ -0,0 +1 @@ +source "drivers/misc/awinic/sarsensor/Kconfig" diff --git a/drivers/misc/awinic/Makefile b/drivers/misc/awinic/Makefile new file mode 100644 index 000000000000..40a207b68ba8 --- /dev/null +++ b/drivers/misc/awinic/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_AW96XX_SAR) += sarsensor/ diff --git a/drivers/misc/awinic/sarsensor/Kbuild b/drivers/misc/awinic/sarsensor/Kbuild index 47ffcf8ba15b..9ec73081b251 100644 --- a/drivers/misc/awinic/sarsensor/Kbuild +++ b/drivers/misc/awinic/sarsensor/Kbuild @@ -1,18 +1,7 @@ -# add -Wall to try to catch everything we can. -#MTK have kernel-4.14 and kernel-4.19 and kernel-5.10 in the same dir,so we can't use below method -#KERNEL_DIR_PATH = $(shell find $(TOP)/kernel* -type d -name "kernel-*" | head -1) -KERNEL_VERSION_NAME = $(shell basename $(KERNEL_DIR_PATH)) -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include/linux/input/awinic -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/$(KERNEL_VERSION_NAME)/drivers/base +ccflags-y += -I$(srctree)/include/linux/input/awinic -ifneq ($(filter m y,$(CONFIG_AW96XX_POWER_SUPPLY_ONLINE)),) - EXTRA_CFLAGS += -DCONFIG_USE_POWER_SUPPLY_ONLINE -endif +ccflags-$(CONFIG_AW96XX_POWER_SUPPLY_ONLINE) += -DCONFIG_USE_POWER_SUPPLY_ONLINE -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../sensors/$(GKI_OBJ_MODULE_DIR)/Module.symvers - -obj-m := awinic_sar.o -awinic_sar-objs := ./comm/aw_sar_comm_interface.o aw_sar.o ./aw9610x/aw9610x.o ./aw9620x/aw9620x.o ./aw9620x/aw_update_fw.o ./aw963xx/aw963xx.o +awinic_sar-objs := comm/aw_sar_comm_interface.o aw_sar.o aw9610x/aw9610x.o aw9620x/aw9620x.o aw9620x/aw_update_fw.o aw963xx/aw963xx.o +obj-$(CONFIG_AW96XX_SAR) := awinic_sar.o diff --git a/drivers/misc/awinic/sarsensor/Kconfig b/drivers/misc/awinic/sarsensor/Kconfig new file mode 100644 index 000000000000..c0f216c09667 --- /dev/null +++ b/drivers/misc/awinic/sarsensor/Kconfig @@ -0,0 +1,14 @@ +config AW96XX_SAR + tristate "AW96XX SAR Driver" + depends on INPUT + default n + help + Say Y here to build the AW96XX SAR driver as a module. + If unsure, say N. + +config AW96XX_POWER_SUPPLY_ONLINE + bool "AW96XX Power Supply Online" + default n + help + Say Y here to enable the AW96XX power supply online feature. + If unsure, say N. diff --git a/drivers/misc/ldo_vibrator_mmi/Kconfig b/drivers/misc/ldo_vibrator_mmi/Kconfig new file mode 100644 index 000000000000..e22e869ade6f --- /dev/null +++ b/drivers/misc/ldo_vibrator_mmi/Kconfig @@ -0,0 +1,9 @@ +config LDO_VIBRATOR_MMI + tristate "ldo vibrator driver" + default n + help + Say Y here if you have a ldo vibrator mmi compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called ldo_vibrator_mmi. diff --git a/drivers/misc/mmi_sys_temp/Kbuild b/drivers/misc/mmi_sys_temp/Kbuild index d676833a3d63..6b5fa1cb4a93 100644 --- a/drivers/misc/mmi_sys_temp/Kbuild +++ b/drivers/misc/mmi_sys_temp/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -obj-m += mmi_sys_temp.o +obj-$(CONFIG_MMI_SYS_TEMP) += mmi_sys_temp.o diff --git a/drivers/misc/mmi_sys_temp/Kconfig b/drivers/misc/mmi_sys_temp/Kconfig new file mode 100644 index 000000000000..fe7a4e81519b --- /dev/null +++ b/drivers/misc/mmi_sys_temp/Kconfig @@ -0,0 +1,10 @@ +config MMI_SYS_TEMP + tristate "MMI sys temp driver" + help + Say Y here if you have mmi_sys_temp + support in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called mmi_sys_temp. diff --git a/drivers/misc/sx937x/Kbuild b/drivers/misc/sx937x/Kbuild index 70d7682d7029..3ca086e8dd7f 100644 --- a/drivers/misc/sx937x/Kbuild +++ b/drivers/misc/sx937x/Kbuild @@ -1,40 +1,7 @@ -KERNEL_DIR_PATH = $(shell find $(ANDROID_BUILD_TOP)/kernel/ -name "msm-*" -type d | head -1 | grep -i "kernel/msm-*") +ccflags-y += -I$(srctree)/$(src)/../../../drivers/base -KERNEL_VERSION_NAME = $(shell basename $(KERNEL_DIR_PATH)) - -KERNEL_PLATFORM_PATH = $(shell find $(ANDROID_BUILD_TOP) -maxdepth 1 -name "kernel_platform" -type d) - -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -ifneq ($(filter m y,$(CONFIG_SX937X_USB_CAL)),) - EXTRA_CFLAGS += -DCONFIG_CAPSENSE_USB_CAL -endif - -ifneq ($(filter m y,$(CONFIG_SX937X_POWER_SUPPLY_ONLINE)),) - EXTRA_CFLAGS += -DCONFIG_USE_POWER_SUPPLY_ONLINE -endif - -ifneq ($(filter m y,$(CONFIG_SX937X_FLIP_CAL)),) - EXTRA_CFLAGS += -DCONFIG_CAPSENSE_FLIP_CAL -endif - -ifneq (,$(filter river%,$(TARGET_PRODUCT))) -EXTRA_CFLAGS += -DCONFIG_CAPSENSE_USB_CAL -endif - -ifneq (,$(KERNEL_DIR_PATH)) - EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/kernel/$(KERNEL_VERSION_NAME)/drivers/base -else ifneq (,$(KERNEL_PLATFORM_PATH)) - EXTRA_CFLAGS += -I$(KERNEL_PLATFORM_PATH)/common/drivers/base -else - EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/kernel/drivers/base -endif - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../sensors/$(GKI_OBJ_MODULE_DIR)/Module.symvers - -#sx937x_sar-y := sx937x_sar.o - -obj-m += sx937x_sar.o +ccflags-$(CONFIG_SX937X_USB_CAL) += -DCONFIG_CAPSENSE_USB_CAL +ccflags-$(CONFIG_SX937X_POWER_SUPPLY_ONLINE) += -DCONFIG_USE_POWER_SUPPLY_ONLINE +ccflags-$(CONFIG_SX937X_FLIP_CAL) += -DCONFIG_CAPSENSE_FLIP_CAL +obj-$(CONFIG_SARSENSOR_SX937X) += sx937x_sar.o diff --git a/drivers/misc/sx937x/Kconfig b/drivers/misc/sx937x/Kconfig new file mode 100644 index 000000000000..c50ec7bbf85d --- /dev/null +++ b/drivers/misc/sx937x/Kconfig @@ -0,0 +1,39 @@ +# +# CapSense(TM) devices +# + +config SARSENSOR_SX937X + tristate "sx937x Programming Driver" + help + CapSense devices is the analog system contains the capacitive sensing + hardware. Several hardware algorithms are supported. This hardware + performs capacitive sensing and scanning without requiring external + components. It contains internal flash memory, which have to be programmed + with firmware using HSSP interface. Host Sourced Serial Programming (HSSP) + refers to the programming of the target device on the board by using a host + microcontroller. The PSoC 4 target is programmed through the SWD interface - + ARM Serial Ware Debug. This option enables firmware programming driver and + allows automatically identify device and matching firmware. See file + Documentation/devicetree/bindings/misc/capsense_hssp.txt for details. + +config SX937X_USB_CAL + bool "Enable sx937x usb calibration" + depends on SARSENSOR_SX937X + help + Enable Cap-sensor calibration when usb plug. + + To use SX937X_USB_CAL open the feature that it can enable cap-sensor calibration + when usb plug. + +config SX937X_FLIP_CAL + bool "Enable sx937x flip calibration" + depends on SARSENSOR_SX937X + help + Enable Cap-sensor calibration when flipping. + + To use SX937X_FLIP_CAL open the feature that it can enable cap-sensor calibration + when flipping. + +config SX937X_POWER_SUPPLY_ONLINE + bool "Enable sx937x power supply online" + depends on SARSENSOR_SX937X diff --git a/drivers/misc/utag/Kbuild b/drivers/misc/utag/Kbuild index 89c6baff5215..c32d1eff6f4a 100644 --- a/drivers/misc/utag/Kbuild +++ b/drivers/misc/utag/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include - -obj-m = utags.o +obj-$(CONFIG_MOTO_UTAGS) = utags.o diff --git a/drivers/misc/utag/Kconfig b/drivers/misc/utag/Kconfig new file mode 100644 index 000000000000..f8eeb9330ee7 --- /dev/null +++ b/drivers/misc/utag/Kconfig @@ -0,0 +1,14 @@ +# +# UTAGS Driver +# + +config MOTO_UTAGS + tristate "Moto UTAGS driver" + help + Say Y here if you have UTAGS + defined in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called utags. diff --git a/drivers/mmi_annotate/Kbuild b/drivers/mmi_annotate/Kbuild index f554a4e253b2..76a40f6d5ecc 100644 --- a/drivers/mmi_annotate/Kbuild +++ b/drivers/mmi_annotate/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -obj-m += mmi_annotate.o \ No newline at end of file +obj-$(CONFIG_MMI_ANNOTATE) += mmi_annotate.o diff --git a/drivers/mmi_annotate/Kconfig b/drivers/mmi_annotate/Kconfig new file mode 100644 index 000000000000..7fb291a1c230 --- /dev/null +++ b/drivers/mmi_annotate/Kconfig @@ -0,0 +1,9 @@ +config MMI_ANNOTATE + tristate "MMI ANNOTATE" + default n + help + Say Y here if you have a mmi annotate compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called mmi_annotate. diff --git a/drivers/mmi_info/Kbuild b/drivers/mmi_info/Kbuild index 4a3f1a0f3fac..e57594394cad 100644 --- a/drivers/mmi_info/Kbuild +++ b/drivers/mmi_info/Kbuild @@ -1,12 +1,7 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - mmi_info-objs += mmi_storage_info.o mmi_info-objs += mmi_ram_info.o mmi_info-objs += mmi_unit_info.o mmi_info-objs += mmi_boot_info.o mmi_info-objs += mmi_info_main.o -obj-m += mmi_info.o -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../mmi_annotate/$(GKI_OBJ_MODULE_DIR)/Module.symvers +obj-$(CONFIG_MMI_INFO) += mmi_info.o diff --git a/drivers/mmi_info/Kconfig b/drivers/mmi_info/Kconfig new file mode 100644 index 000000000000..8cc943d9aa7e --- /dev/null +++ b/drivers/mmi_info/Kconfig @@ -0,0 +1,10 @@ +config MMI_INFO + tristate "MMI INFO" + default n + depends on MMI_ANNOTATE + help + Say Y here if you have a mmi info compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called mmi_info. diff --git a/drivers/mmi_relay/Kbuild b/drivers/mmi_relay/Kbuild index 12e00ae16d00..aaa4e173f7fb 100644 --- a/drivers/mmi_relay/Kbuild +++ b/drivers/mmi_relay/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -obj-m += mmi_relay.o +obj-$(CONFIG_MMI_RELAY) += mmi_relay.o diff --git a/drivers/mmi_relay/Kconfig b/drivers/mmi_relay/Kconfig new file mode 100644 index 000000000000..9e6907d22185 --- /dev/null +++ b/drivers/mmi_relay/Kconfig @@ -0,0 +1,9 @@ +config MMI_RELAY + tristate "MMI RELAY" + default n + help + Say Y here if you have a mmi relay compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called mmi_relay. diff --git a/drivers/nfc/Kconfig b/drivers/nfc/Kconfig index 2ab2e795295e..7187d0e131ac 100644 --- a/drivers/nfc/Kconfig +++ b/drivers/nfc/Kconfig @@ -60,6 +60,7 @@ source "drivers/nfc/nxp-nci/Kconfig" source "drivers/nfc/s3fwrn5/Kconfig" source "drivers/nfc/st95hf/Kconfig" source "drivers/nfc/samsung/Kconfig" +source "drivers/nfc/sn2xx/Kconfig" endmenu config NFC_QTI_I2C diff --git a/drivers/nfc/Makefile b/drivers/nfc/Makefile index 9c5c77308bc5..775cf0d48325 100644 --- a/drivers/nfc/Makefile +++ b/drivers/nfc/Makefile @@ -18,4 +18,5 @@ obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci/ obj-$(CONFIG_NFC_S3FWRN5) += s3fwrn5/ obj-$(CONFIG_NFC_ST95HF) += st95hf/ obj-$(CONFIG_SEC_NFC) += samsung/ +obj-$(CONFIG_NFC_SN2XX) += sn2xx/ obj-y += qti/ diff --git a/drivers/nfc/sn2xx/Kbuild b/drivers/nfc/sn2xx/Kbuild index 645e1e8da222..e294e2ac3562 100644 --- a/drivers/nfc/sn2xx/Kbuild +++ b/drivers/nfc/sn2xx/Kbuild @@ -1,8 +1,3 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -obj-m += nfc_nci.o nfc_nci-objs:= nfc_common.o nfc_i2c_drv.o ese_cold_reset.o -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../mmi_info/Module.symvers +obj-$(CONFIG_NFC_SN2XX) += nfc_nci.o diff --git a/drivers/nfc/sn2xx/Kconfig b/drivers/nfc/sn2xx/Kconfig new file mode 100644 index 000000000000..9807f4d9da60 --- /dev/null +++ b/drivers/nfc/sn2xx/Kconfig @@ -0,0 +1,6 @@ +config NFC_SN2XX + tristate "QTI NFC for SN2xx" + help + This enables the QTI NFC driver for SN2xx based devices. + + If unsure, say N. diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index ff0350ca3b74..85a55b158843 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -2,3 +2,44 @@ source "drivers/power/avs/Kconfig" source "drivers/power/reset/Kconfig" source "drivers/power/supply/Kconfig" + +config MMI_QC3P_TURBO_CHARGER + bool "Enable MMI QC3P Turbo Charger" + default n + help + Say Y here if you have a MMI QC3P turbo charger compatible device connected. + If unsure, say N. + +config MMI_QC3P_WT6670_DETECTED + bool "Enable MMI QC3P WT6670 detection" + default n + help + Say Y here to enable MMI QC3P WT6670 detection. + If unsure, say N. + +config MMI_QC3P_Z350_DETECTED + bool "Enable MMI QC3P Z350 detection" + default n + help + Say Y here to enable MMI QC3P Z350 detection. + If unsure, say N. + +config MMI_EXT_CHG_LED + bool "Enable MMI external charger LED" + default n + help + Say Y here if you have a MMI external charger LED. + If unsure, say N. + +source "drivers/power/bq2589x_chg_mmi/Kconfig" +source "drivers/power/bq2597x_mmi_iio/Kconfig" +source "drivers/power/bq25980_mmi_iio/Kconfig" +source "drivers/power/cw2217b_fg_mmi/Kconfig" +source "drivers/power/mmi_charger/Kconfig" +source "drivers/power/mmi_discrete_charger/Kconfig" +source "drivers/power/mmi_discrete_turbo_charger/Kconfig" +source "drivers/power/mmi_parallel_charger_iio/Kconfig" +source "drivers/power/mmi-smbcharger-iio/Kconfig" +source "drivers/power/qpnp_adaptive_charge/Kconfig" +source "drivers/power/sgm4154x_chg_mmi/Kconfig" +source "drivers/power/sm5602_fg_mmi/Kconfig" diff --git a/drivers/power/Makefile b/drivers/power/Makefile index b7c2e372186b..f828f436d54c 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -2,3 +2,16 @@ obj-$(CONFIG_POWER_AVS) += avs/ obj-$(CONFIG_POWER_RESET) += reset/ obj-$(CONFIG_POWER_SUPPLY) += supply/ + +obj-$(CONFIG_BQ2589X_CHARGER) += bq2589x_chg_mmi/ +obj-$(CONFIG_BQ2597X_MMI_IIO) += bq2597x_mmi_iio/ +obj-$(CONFIG_BQ25980_MMI_IIO_CHARGER) += bq25980_mmi_iio/ +obj-$(CONFIG_CW2217B_FG_MMI) += cw2217b_fg_mmi/ +obj-$(CONFIG_MMI_CHARGER) += mmi_charger/ +obj-$(CONFIG_MMI_DISCRETE_CHARGER) += mmi_discrete_charger/ +obj-$(CONFIG_MMI_DISCRETE_TURBO_CHARGER) += mmi_discrete_turbo_charger/ +obj-$(CONFIG_MMI_PARALLEL_CHARGER_IIO) += mmi_parallel_charger_iio/ +obj-$(CONFIG_MMI_SMBCHARGER_IIO) += mmi-smbcharger-iio/ +obj-$(CONFIG_QPNP_ADAPTIVE_CHARGE) += qpnp_adaptive_charge/ +obj-$(CONFIG_SGM4154X_CHARGER) += sgm4154x_chg_mmi/ +obj-$(CONFIG_MMI_SM5602_FG) += sm5602_fg_mmi/ diff --git a/drivers/power/bq2589x_chg_mmi/Kbuild b/drivers/power/bq2589x_chg_mmi/Kbuild index d40823873eee..e0e0802affc1 100644 --- a/drivers/power/bq2589x_chg_mmi/Kbuild +++ b/drivers/power/bq2589x_chg_mmi/Kbuild @@ -1,20 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/bq2589x_chg_mmi - -obj-m += bq2589x_charger.o - -ifneq ($(filter m y,$(CONFIG_MMI_QC3P_TURBO_CHARGER)),) - EXTRA_CFLAGS += -DCONFIG_MMI_QC3P_TURBO_CHARGER -endif - -ifneq ($(filter m y,$(CONFIG_MMI_QC3P_WT6670_DETECTED)),) - EXTRA_CFLAGS += -DCONFIG_MMI_QC3P_WT6670_DETECTED -endif - -ifneq ($(filter m y,$(CONFIG_MMI_EXT_CHG_LED)),) - EXTRA_CFLAGS += -DCONFIG_MMI_EXT_CHG_LED -endif - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../mmi_discrete_charger/$(GKI_OBJ_MODULE_DIR)/Module.symvers +obj-$(CONFIG_BQ2589X_CHARGER) += bq2589x_charger.o diff --git a/drivers/power/bq2589x_chg_mmi/Kconfig b/drivers/power/bq2589x_chg_mmi/Kconfig new file mode 100644 index 000000000000..1ae7ea243e29 --- /dev/null +++ b/drivers/power/bq2589x_chg_mmi/Kconfig @@ -0,0 +1,14 @@ +# +# BQ2589X Charger Driver +# + +config BQ2589X_CHARGER + tristate "TI BQ2589x Charger Driver" + depends on MMI_DISCRETE_CHARGER_CLASS + default n + help + Say Y here if you have a bq2589x charging device in + your system. + + To compile this driver as a module, choose M here: the + module will be called bq2589x_charger. diff --git a/drivers/power/bq2597x_mmi_iio/Kbuild b/drivers/power/bq2597x_mmi_iio/Kbuild index 4a5406b5538b..eaab1e1ea98c 100644 --- a/drivers/power/bq2597x_mmi_iio/Kbuild +++ b/drivers/power/bq2597x_mmi_iio/Kbuild @@ -1,7 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/bq2597x_mmi_iio - -obj-m += bq2597x_mmi_iio.o - +obj-$(CONFIG_BQ2597X_MMI_IIO) += bq2597x_mmi_iio.o diff --git a/drivers/power/bq2597x_mmi_iio/Kconfig b/drivers/power/bq2597x_mmi_iio/Kconfig new file mode 100644 index 000000000000..f27a0b63702d --- /dev/null +++ b/drivers/power/bq2597x_mmi_iio/Kconfig @@ -0,0 +1,9 @@ +config BQ2597X_MMI_IIO + tristate "BQ2597X MMI IIO" + default n + help + Say Y here if you have a bq2597x iio compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called bq2597x_mmi_iio. diff --git a/drivers/power/bq25980_mmi_iio/Kbuild b/drivers/power/bq25980_mmi_iio/Kbuild index ab15aa923577..d79f307e084e 100644 --- a/drivers/power/bq25980_mmi_iio/Kbuild +++ b/drivers/power/bq25980_mmi_iio/Kbuild @@ -1,10 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/bq25980_mmi_iio - -ifneq ($(filter m y,$(CONFIG_MMI_BQ25980_BULK_READ)),) - EXTRA_CFLAGS += -DCONFIG_MMI_BQ25980_BULK_READ -endif - -obj-m += bq25980_mmi_iio.o +obj-$(CONFIG_BQ25980_MMI_IIO_CHARGER) += bq25980_mmi_iio.o diff --git a/drivers/power/bq25980_mmi_iio/Kconfig b/drivers/power/bq25980_mmi_iio/Kconfig new file mode 100644 index 000000000000..8a269c76b0df --- /dev/null +++ b/drivers/power/bq25980_mmi_iio/Kconfig @@ -0,0 +1,16 @@ +config BQ25980_MMI_IIO_CHARGER + tristate "BQ25980 MMI IIO Charger" + default n + help + Say Y here if you have a bq25980 compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called bq25980_mmi_iio. + +config MMI_BQ25980_BULK_READ + bool "MMI BQ25980 Bulk Read" + default n + help + Say Y here to enable the MMI BQ25980 bulk read feature. + If unsure, say N. diff --git a/drivers/power/cw2217b_fg_mmi/Kbuild b/drivers/power/cw2217b_fg_mmi/Kbuild index a84af03167d3..dbbafe2bf15a 100644 --- a/drivers/power/cw2217b_fg_mmi/Kbuild +++ b/drivers/power/cw2217b_fg_mmi/Kbuild @@ -1,11 +1,4 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/drivers/power/cw2217b_fg_mmi - -ifneq ($(filter m y,$(CONFIG_DYNAMIC_UPDATE_UI_FULL)),) - EXTRA_CFLAGS += -DDYNAMIC_UPDATE_UI_FULL -endif +ccflags-$(CONFIG_DYNAMIC_UPDATE_UI_FULL) += -DDYNAMIC_UPDATE_UI_FULL cw2217b_fg_mmi-objs += cw2217B_fuel_gauge_base.o -obj-m += cw2217b_fg_mmi.o +obj-$(CONFIG_CW2217B_FG_MMI) += cw2217b_fg_mmi.o diff --git a/drivers/power/cw2217b_fg_mmi/Kconfig b/drivers/power/cw2217b_fg_mmi/Kconfig new file mode 100644 index 000000000000..78afaaa9b508 --- /dev/null +++ b/drivers/power/cw2217b_fg_mmi/Kconfig @@ -0,0 +1,20 @@ +config CW2217B_FG_MMI + tristate "CW2217 FGADC Device Driver V1.2" + default n + help + Say Y here if you have CW2217 FGADC Device support + in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called cw2217b_fg_mmi. + +config DYNAMIC_UPDATE_UI_FULL + bool "Save the value of CW2217 ui_full to the 0xA2 register" + depends on CW2217B_FG_MMI + default n + help + Say Y here to save the value of ui_full to the 0xA2 register. + + If unsure, say N. diff --git a/drivers/power/mmi-smbcharger-iio/Kbuild b/drivers/power/mmi-smbcharger-iio/Kbuild old mode 100755 new mode 100644 index 2ae7e9a8fe0e..a68eba1199b7 --- a/drivers/power/mmi-smbcharger-iio/Kbuild +++ b/drivers/power/mmi-smbcharger-iio/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -obj-m += mmi-smbcharger-iio.o +obj-$(CONFIG_MMI_SMBCHARGER_IIO) += mmi-smbcharger-iio.o diff --git a/drivers/power/mmi-smbcharger-iio/Kconfig b/drivers/power/mmi-smbcharger-iio/Kconfig new file mode 100644 index 000000000000..55a12c49055e --- /dev/null +++ b/drivers/power/mmi-smbcharger-iio/Kconfig @@ -0,0 +1,9 @@ +config MMI_SMBCHARGER_IIO + tristate "MMI SMBCHARGER IIO" + default n + help + Say Y here if you have a mmi smbcharger iio compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called mmi-smbcharger-iio. diff --git a/drivers/power/mmi_charger/Kbuild b/drivers/power/mmi_charger/Kbuild old mode 100755 new mode 100644 index 4740d681513b..c372e5471463 --- a/drivers/power/mmi_charger/Kbuild +++ b/drivers/power/mmi_charger/Kbuild @@ -1,16 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/mmi_charger -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -ifeq ($(TARGET_BUILD_VARIANT),userdebug) - EXTRA_CFLAGS += -DMMI_GKI_API_ALLOWANCE -endif - -ifneq ($(filter m y,$(CONFIG_MMI_RECHARGER_HAWAO_MODE)),) - EXTRA_CFLAGS += -DCONFIG_MMI_RECHARGER_HAWAO_MODE -endif - -obj-m += mmi_charger.o - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers +obj-$(CONFIG_MMI_CHARGER) += mmi_charger.o diff --git a/drivers/power/mmi_charger/Kconfig b/drivers/power/mmi_charger/Kconfig new file mode 100644 index 000000000000..4c8a7758174c --- /dev/null +++ b/drivers/power/mmi_charger/Kconfig @@ -0,0 +1,21 @@ +config MMI_CHARGER + tristate "MMI Charger Driver" + depends on MMI_INFO + default n + help + Say Y here if you have mmi charger support + in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called mmi_charger. + +config MMI_RECHARGER_HAWAO_MODE + bool "Enable MMI Recharger Hawao Mode" + depends on MMI_CHARGER + default n + help + Say Y here if you have a mmi recharger hawao mode compatible device connected. + + If unsure, say N. diff --git a/drivers/power/mmi_discrete_charger/Kbuild b/drivers/power/mmi_discrete_charger/Kbuild index 7c149225341f..2991195f1577 100644 --- a/drivers/power/mmi_discrete_charger/Kbuild +++ b/drivers/power/mmi_discrete_charger/Kbuild @@ -1,16 +1,9 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/mmi_charger -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/mmi_discrete_charger +ccflags-y += -I$(srctree)/drivers/power/mmi_charger -obj-m += mmi_discrete_charger.o +obj-$(CONFIG_MMI_DISCRETE_CHARGER) += mmi_discrete_charger.o mmi_discrete_charger-objs += mmi_discrete_charger_core.o mmi_discrete_charger-objs += mmi_discrete_charger_iio.o mmi_discrete_charger-objs += mmi_discrete_voter.o mmi_discrete_charger-objs += mmi_discrete_factory_tcmd.o -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../usb/typec/adapter_class/$(GKI_OBJ_MODULE_DIR)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../mmi_charger/$(GKI_OBJ_MODULE_DIR)/Module.symvers - -obj-m += mmi_discrete_charger_class.o +obj-$(CONFIG_MMI_DISCRETE_CHARGER_CLASS) += mmi_discrete_charger_class.o diff --git a/drivers/power/mmi_discrete_charger/Kconfig b/drivers/power/mmi_discrete_charger/Kconfig new file mode 100644 index 000000000000..5daeff50f804 --- /dev/null +++ b/drivers/power/mmi_discrete_charger/Kconfig @@ -0,0 +1,24 @@ +config MMI_DISCRETE_CHARGER + tristate "MMI Discrete Charger Driver" + depends on TYPEC_ADAPTER_CLASS && MMI_CHARGER + default n + help + Say Y here if you have mmi discrete charger support + in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called mmi_discrete_charger. + +config MMI_DISCRETE_CHARGER_CLASS + tristate "MMI Discrete Charger Class Device" + default n + help + Say Y here if you have mmi discrete charger class support + in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called mmi_discrete_charger_class. diff --git a/drivers/power/mmi_discrete_turbo_charger/Kbuild b/drivers/power/mmi_discrete_turbo_charger/Kbuild index b6d3765de57c..415f13d845d3 100644 --- a/drivers/power/mmi_discrete_turbo_charger/Kbuild +++ b/drivers/power/mmi_discrete_turbo_charger/Kbuild @@ -1,13 +1,4 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/mmi_discrete_turbo_charger - -ifneq ($(filter m y,$(CONFIG_MMI_QC3P_WT6670_DETECTED)),) - EXTRA_CFLAGS += -DCONFIG_MMI_QC3P_WT6670_DETECTED -endif - -obj-m += mmi_discrete_turbo_charger.o +obj-$(CONFIG_MMI_DISCRETE_TURBO_CHARGER) += mmi_discrete_turbo_charger.o mmi_discrete_turbo_charger-objs += mmi_charger_class.o mmi_discrete_turbo_charger-objs += mmi_charger_core.o mmi_discrete_turbo_charger-objs += mmi_charger_pump_policy.o @@ -15,8 +6,3 @@ mmi_discrete_turbo_charger-objs += mmi_cp_charger.o mmi_discrete_turbo_charger-objs += qpnp_pmic_charger.o mmi_discrete_turbo_charger-objs += mmi_qc3p.o mmi_discrete_turbo_charger-objs += mmi_qc3p_cp_policy.o - -#ifeq ($(CONFIG_MMI_PL_CP_POLICY), y) -#endif - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../usb/typec/adapter_class/$(GKI_OBJ_MODULE_DIR)/Module.symvers diff --git a/drivers/power/mmi_discrete_turbo_charger/Kconfig b/drivers/power/mmi_discrete_turbo_charger/Kconfig new file mode 100644 index 000000000000..d36c2160426d --- /dev/null +++ b/drivers/power/mmi_discrete_turbo_charger/Kconfig @@ -0,0 +1,12 @@ +config MMI_DISCRETE_TURBO_CHARGER + tristate "MMI Discrete Turbo Charger Driver" + depends on TYPEC_ADAPTER_CLASS && MMI_CHARGER + default n + help + Say Y here if you have mmi discrete turbo charger support + in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called mmi_discrete_turbo_charger. diff --git a/drivers/power/mmi_parallel_charger_iio/Kbuild b/drivers/power/mmi_parallel_charger_iio/Kbuild index 6e171daa0029..c09c87970ed3 100644 --- a/drivers/power/mmi_parallel_charger_iio/Kbuild +++ b/drivers/power/mmi_parallel_charger_iio/Kbuild @@ -1,9 +1,4 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include \ - -I$(TOP)/motorola/kernel/modules/drivers/power/mmi_parallel_charger_iio - -obj-m += mmi_parallel_charger_iio.o +obj-$(CONFIG_MMI_PARALLEL_CHARGER_IIO) += mmi_parallel_charger_iio.o mmi_parallel_charger_iio-objs += mmi_charger_class.o mmi_parallel_charger_iio-objs += mmi_charger_core.o mmi_parallel_charger_iio-objs += mmi_charger_pump_policy.o @@ -11,6 +6,3 @@ mmi_parallel_charger_iio-objs += mmi_cp_charger.o mmi_parallel_charger_iio-objs += qpnp_pmic_charger.o mmi_parallel_charger_iio-objs += mmi_qc3p.o mmi_parallel_charger_iio-objs += mmi_qc3p_cp_policy.o - -#ifeq ($(CONFIG_MMI_PL_CP_POLICY), y) -#endif diff --git a/drivers/power/mmi_parallel_charger_iio/Kconfig b/drivers/power/mmi_parallel_charger_iio/Kconfig new file mode 100644 index 000000000000..6aa40c21197c --- /dev/null +++ b/drivers/power/mmi_parallel_charger_iio/Kconfig @@ -0,0 +1,9 @@ +config MMI_PARALLEL_CHARGER_IIO + tristate "MMI Parallel Charger IIO" + default n + help + Say Y here if you have a mmi parallel charger iio compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called mmi_parallel_charger_iio. diff --git a/drivers/power/qpnp_adaptive_charge/Kbuild b/drivers/power/qpnp_adaptive_charge/Kbuild old mode 100755 new mode 100644 index 8471c67a4891..724316afb4cd --- a/drivers/power/qpnp_adaptive_charge/Kbuild +++ b/drivers/power/qpnp_adaptive_charge/Kbuild @@ -1,15 +1,8 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include - ifneq ($(filter m y,$(CONFIG_USE_MMI_CHARGER)),) - EXTRA_CFLAGS += -DUSE_MMI_CHARGER - EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/mmi_charger - KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../mmi_charger/$(GKI_OBJ_MODULE_DIR)/Module.symvers + ccflags-y += -DUSE_MMI_CHARGER + ccflags-y += -I$(srctree)/$(src)/../mmi_charger endif -ifneq ($(filter m y, $(ADAPTIVE_TOLERANCE_OPTIMIZATION)),) - EXTRA_CFLAGS += -DADAPTIVE_TOLERANCE_OPTIMIZATION -endif +ccflags-$(CONFIG_ADAPTIVE_TOLERANCE_OPTIMIZATION) += -DADAPTIVE_TOLERANCE_OPTIMIZATION -obj-m += qpnp_adaptive_charge.o +obj-$(CONFIG_QPNP_ADAPTIVE_CHARGE) += qpnp_adaptive_charge.o diff --git a/drivers/power/qpnp_adaptive_charge/Kconfig b/drivers/power/qpnp_adaptive_charge/Kconfig new file mode 100644 index 000000000000..ad136eb21d3c --- /dev/null +++ b/drivers/power/qpnp_adaptive_charge/Kconfig @@ -0,0 +1,27 @@ +config QPNP_ADAPTIVE_CHARGE + tristate "QPNP ADAPTIVE CHARGE" + default n + help + Say Y here if you have a qpnp adaptive charge compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called qpnp_adaptive_charge. + +config USE_MMI_CHARGER + bool "Use MMI charger" + depends on QPNP_ADAPTIVE_CHARGE + default n + help + Say Y here to use MMI charger. + + If unsure, say N. + +config ADAPTIVE_TOLERANCE_OPTIMIZATION + bool "Enable adaptive tolerance optimization" + depends on QPNP_ADAPTIVE_CHARGE + default n + help + Say Y here to enable adaptive tolerance optimization. + + If unsure, say N. diff --git a/drivers/power/sgm4154x_chg_mmi/Kbuild b/drivers/power/sgm4154x_chg_mmi/Kbuild index b9fd084d799a..8ffa9791728b 100644 --- a/drivers/power/sgm4154x_chg_mmi/Kbuild +++ b/drivers/power/sgm4154x_chg_mmi/Kbuild @@ -1,27 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/power/sgm4154x_chg_mmi - -ifneq ($(filter m y,$(CONFIG_MMI_QC3P_TURBO_CHARGER)),) - EXTRA_CFLAGS += -DCONFIG_MMI_QC3P_TURBO_CHARGER -endif - -ifneq ($(filter m y,$(CONFIG_MMI_QC3P_WT6670_DETECTED)),) - EXTRA_CFLAGS += -DCONFIG_MMI_QC3P_WT6670_DETECTED -endif - -ifneq ($(filter m y,$(CONFIG_MMI_SGM41513_CHARGER)),) - EXTRA_CFLAGS += -DCONFIG_MMI_SGM41513_CHARGER -endif - -ifneq ($(filter m y,$(CONFIG_MMI_QC3P_Z350_DETECTED)),) - EXTRA_CFLAGS += -DCONFIG_MMI_QC3P_Z350_DETECTED -endif - -ifneq ($(filter m y,$(CONFIG_MMI_EXT_CHG_LED)),) - EXTRA_CFLAGS += -DCONFIG_MMI_EXT_CHG_LED -endif - -obj-m += sgm4154x_charger.o -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../mmi_discrete_charger/$(GKI_OBJ_MODULE_DIR)/Module.symvers +obj-$(CONFIG_SGM4154X_CHARGER) += sgm4154x_charger.o diff --git a/drivers/power/sgm4154x_chg_mmi/Kconfig b/drivers/power/sgm4154x_chg_mmi/Kconfig new file mode 100644 index 000000000000..4db5b03bed18 --- /dev/null +++ b/drivers/power/sgm4154x_chg_mmi/Kconfig @@ -0,0 +1,23 @@ +# +# SGM4154X Charger driver +# + +config SGM4154X_CHARGER + tristate "sgm4154x charger driver" + depends on MMI_DISCRETE_CHARGER_CLASS + default n + help + Say Y here if you have a sgm415x charging device in + your system. + + To compile this driver as a module, choose M here: the + module will be called sgm415x_charger. + +config MMI_SGM41513_CHARGER + bool "Enable SGM4154X Moto SGM41513 Charger" + depends on SGM4154X_CHARGER + default n + help + Say Y here if you have a SGM4154X Moto SGM41513 Charger compatible device connected. + + If unsure, say N. diff --git a/drivers/power/sm5602_fg_mmi/Kbuild b/drivers/power/sm5602_fg_mmi/Kbuild index de7af59dabd3..1848331b019e 100644 --- a/drivers/power/sm5602_fg_mmi/Kbuild +++ b/drivers/power/sm5602_fg_mmi/Kbuild @@ -1,7 +1,2 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/drivers/power/sm5602_fg_mmi - sm5602_fg_mmi-objs += sm5602_fg.o -obj-m += sm5602_fg_mmi.o +obj-$(CONFIG_MMI_SM5602_FG) += sm5602_fg_mmi.o diff --git a/drivers/power/sm5602_fg_mmi/Kconfig b/drivers/power/sm5602_fg_mmi/Kconfig new file mode 100644 index 000000000000..fe71ff3854d1 --- /dev/null +++ b/drivers/power/sm5602_fg_mmi/Kconfig @@ -0,0 +1,8 @@ +config MMI_SM5602_FG + tristate "MMI SM5602 fuel gauge" + default n + help + Say Y here if you have an MMI SM5602 fuel gauge in your system. + + To compile this driver as a module, choose M here: the + module will be called sm5602_fg_mmi. diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 507c1984c973..a94a1d795b8f 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1230,5 +1230,9 @@ config VIRTIO_REGULATOR regulator for pass through peripheral devices via regulator backend in host. +source "drivers/regulator/wl2864c/Kconfig" + +source "drivers/regulator/wl2868c/Kconfig" + endif diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index fc812eef9615..388b0d05f084 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -151,4 +151,7 @@ obj-$(CONFIG_REGULATOR_RPMH) += rpmh-regulator.o obj-$(CONFIG_REGULATOR_STUB) += stub-regulator.o obj-$(CONFIG_VIRTIO_REGULATOR) += virtio_regulator.o +obj-$(CONFIG_REGULATOR_WL2864C) += wl2864c/ +obj-$(CONFIG_REGULATOR_WL2868C) += wl2868c/ + ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG diff --git a/drivers/regulator/wl2864c/Kbuild b/drivers/regulator/wl2864c/Kbuild index 359e291dfdca..753c3edbcb7a 100644 --- a/drivers/regulator/wl2864c/Kbuild +++ b/drivers/regulator/wl2864c/Kbuild @@ -1,5 +1,2 @@ -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include - wl2864c-objs += wl2864c-regulator.o -obj-m += wl2864c.o +obj-$(CONFIG_REGULATOR_WL2864C) += wl2864c.o diff --git a/drivers/regulator/wl2864c/Kconfig b/drivers/regulator/wl2864c/Kconfig new file mode 100644 index 000000000000..9dfe4474bf2d --- /dev/null +++ b/drivers/regulator/wl2864c/Kconfig @@ -0,0 +1,9 @@ +config REGULATOR_WL2864C + tristate "WL2864C REGULATOR" + default n + help + Say Y here if you have a WL2864C compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called wl2864c. diff --git a/drivers/regulator/wl2868c/Kbuild b/drivers/regulator/wl2868c/Kbuild index c24c715f39f3..967cdb0d84ab 100644 --- a/drivers/regulator/wl2868c/Kbuild +++ b/drivers/regulator/wl2868c/Kbuild @@ -1,5 +1,2 @@ -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include - wl2868c-objs += wl2868c-regulator.o -obj-m += wl2868c.o +obj-$(CONFIG_REGULATOR_WL2868C) += wl2868c.o diff --git a/drivers/regulator/wl2868c/Kconfig b/drivers/regulator/wl2868c/Kconfig new file mode 100644 index 000000000000..ce5df72c82f9 --- /dev/null +++ b/drivers/regulator/wl2868c/Kconfig @@ -0,0 +1,9 @@ +config REGULATOR_WL2868C + tristate "WL2868C REGULATOR" + default n + help + Say Y here if you have a WL2868C compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called wl2868c. diff --git a/drivers/sensors/Kbuild b/drivers/sensors/Kbuild index b50ef6c2c4d8..2e11c0c4110f 100644 --- a/drivers/sensors/Kbuild +++ b/drivers/sensors/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -obj-m += sensors_class.o \ No newline at end of file +obj-$(CONFIG_SENSORS_CLASS) += sensors_class.o diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig new file mode 100644 index 000000000000..59c021f7a9f4 --- /dev/null +++ b/drivers/sensors/Kconfig @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-only +config SENSORS_CLASS + tristate "Enable Sensors Class Driver Support" + help + Add support for sensors class driver. diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig index 895e2418de53..06706b58e3bb 100644 --- a/drivers/usb/typec/Kconfig +++ b/drivers/usb/typec/Kconfig @@ -65,4 +65,8 @@ source "drivers/usb/typec/mux/Kconfig" source "drivers/usb/typec/altmodes/Kconfig" +source "drivers/usb/typec/adapter_class/Kconfig" + +source "drivers/usb/typec/mmi_tcpc/Kconfig" + endif # TYPEC diff --git a/drivers/usb/typec/Makefile b/drivers/usb/typec/Makefile index 6696b7263d61..0035f6cad561 100644 --- a/drivers/usb/typec/Makefile +++ b/drivers/usb/typec/Makefile @@ -6,3 +6,6 @@ obj-$(CONFIG_TYPEC_TCPM) += tcpm/ obj-$(CONFIG_TYPEC_UCSI) += ucsi/ obj-$(CONFIG_TYPEC_TPS6598X) += tps6598x.o obj-$(CONFIG_TYPEC) += mux/ + +obj-$(CONFIG_TYPEC_ADAPTER_CLASS) += adapter_class/ +obj-$(CONFIG_TCPC_CLASS) += mmi_tcpc/ diff --git a/drivers/usb/typec/adapter_class/Kbuild b/drivers/usb/typec/adapter_class/Kbuild old mode 100755 new mode 100644 index f003c3c245e9..9e88ccb1f252 --- a/drivers/usb/typec/adapter_class/Kbuild +++ b/drivers/usb/typec/adapter_class/Kbuild @@ -1,5 +1 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include - -obj-m += adapter_class.o +obj-$(CONFIG_TYPEC_ADAPTER_CLASS) += adapter_class.o diff --git a/drivers/usb/typec/adapter_class/Kconfig b/drivers/usb/typec/adapter_class/Kconfig new file mode 100644 index 000000000000..426df2a2377a --- /dev/null +++ b/drivers/usb/typec/adapter_class/Kconfig @@ -0,0 +1,11 @@ +config TYPEC_ADAPTER_CLASS + tristate "Adapter Class Device Driver" + default n + help + Say Y here if you have Adapter Class Device support + in your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called adapter_class. diff --git a/drivers/usb/typec/mmi_tcpc/Kbuild b/drivers/usb/typec/mmi_tcpc/Kbuild index 72f7413ba5bc..a9165010cf72 100644 --- a/drivers/usb/typec/mmi_tcpc/Kbuild +++ b/drivers/usb/typec/mmi_tcpc/Kbuild @@ -1,18 +1,13 @@ -# add -Wall to try to catch everything we can. -EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \ - -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/usb/typec/mmi_tcpc - subdir-ccflags-y += -Wall -Werror -DCONFIG_RT_REGMAP -EXTRA_CFLAGS += -DCONFIG_PD_DBG_INFO +ccflags-y += -DCONFIG_PD_DBG_INFO ifneq ($(filter m y,$(CONFIG_TCPC_CLASS)),) - EXTRA_CFLAGS += -DCONFIG_TCPC_CLASS + ccflags-y += -DCONFIG_TCPC_CLASS endif ifneq ($(filter m y,$(CONFIG_USB_POWER_DELIVERY)),) - EXTRA_CFLAGS += -DCONFIG_USB_POWER_DELIVERY + ccflags-y += -DCONFIG_USB_POWER_DELIVERY endif ifneq ($(filter m y,$(CONFIG_TCPC_RT1711H)),) @@ -28,7 +23,7 @@ ifneq ($(filter m y,$(CONFIG_TCPC_SGM7220)),) endif ifneq ($(CONFIG_TCPC_MAX_POLLING_COUNT),) - EXTRA_CFLAGS += -DCONFIG_TCPC_MAX_POLLING_COUNT=$(CONFIG_TCPC_MAX_POLLING_COUNT) + ccflags-y += -DCONFIG_TCPC_MAX_POLLING_COUNT=$(CONFIG_TCPC_MAX_POLLING_COUNT) endif tcpc_class-objs += tcpci_core.o tcpci_typec.o tcpci_timer.o \ @@ -48,8 +43,5 @@ tcpc_class-objs += tcpci_event.o \ pd_dpm_mmi_adapter.o endif -obj-m += tcpc_class.o -obj-m += rt_pd_manager.o - -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../adapter_class/$(GKI_OBJ_MODULE_DIR)/Module.symvers -KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../power/mmi_discrete_charger/$(GKI_OBJ_MODULE_DIR)/Module.symvers +obj-$(CONFIG_TCPC_CLASS) += tcpc_class.o +obj-$(CONFIG_RT_PD_MANAGER) += rt_pd_manager.o diff --git a/drivers/usb/typec/mmi_tcpc/Kconfig b/drivers/usb/typec/mmi_tcpc/Kconfig new file mode 100644 index 000000000000..3bbe57462b12 --- /dev/null +++ b/drivers/usb/typec/mmi_tcpc/Kconfig @@ -0,0 +1,50 @@ +config TCPC_RT1711H + tristate "TCPC RT1711H driver" + default n + depends on TCPC_CLASS + help + Say Y here if you have a rt1711h compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called tcpc_rt1711h. + +config TCPC_SGM7220 + tristate "TCPC SGM7220 driver" + default n + depends on TCPC_CLASS + help + Say Y here if you have a sgm7220 compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called tcpc_sgm7220. + +config TCPC_CLASS + tristate "TCPC Class driver" + default n + help + Say Y here if you have a tcpc compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called tcpc_class. + +config RT_PD_MANAGER + tristate "RT PD Manager driver" + default n + help + Say Y here if you have a RT PD compatible + device connected. + + This driver can also be built as a module. If so, the module + will be called rt_pd_manager. + +config USB_POWER_DELIVERY + bool "Enable USB Power Delivery" + depends on TCPC_CLASS && TYPEC_ADAPTER_CLASS + default n + help + Say Y here if you have a usb power delivery compatible device connected. + + If unsure, say N.