diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/Android.mk b/drivers/input/touchscreen/goodix_berlin_mmi/Android.mk index 6a48859b4a0c..e80d79b73cb1 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/Android.mk +++ b/drivers/input/touchscreen/goodix_berlin_mmi/Android.mk @@ -10,7 +10,7 @@ ifeq ($(DRM_PANEL_NOTIFICATIONS),true) endif ifeq ($(TOUCHSCREEN_GOODIX_BRL_SPI),true) -ifeq ($(call is-board-platform-in-list,taro kalama parrot crow), true) +ifeq ($(call is-board-platform-in-list,taro kalama parrot crow pineapple), true) KBUILD_OPTIONS += CONFIG_TOUCHSCREEN_GOODIX_BRL_SPI=y else KERNEL_CFLAGS += CONFIG_TOUCHSCREEN_GOODIX_BRL_SPI=y diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/Makefile b/drivers/input/touchscreen/goodix_berlin_mmi/Makefile index ba83f4fc9e1a..28b34eea422a 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/Makefile +++ b/drivers/input/touchscreen/goodix_berlin_mmi/Makefile @@ -15,4 +15,6 @@ clean: KBUILD_EXTRA_SYMBOLS += $(M)/../../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers KBUILD_EXTRA_SYMBOLS += $(M)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers +ifneq ($(filter m y, $(CONFIG_INPUT_GTP_PASSIVE_PEN_NOTIFIER)),) KBUILD_EXTRA_SYMBOLS += $(M)/../../../misc/hall/$(GKI_OBJ_MODULE_DIR)/Module.symvers +endif diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_i2c.c b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_i2c.c index 85c340be17f8..defa5cf03510 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_i2c.c +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_i2c.c @@ -228,11 +228,18 @@ err_pdev: return ret; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) +static void goodix_i2c_remove(struct i2c_client *client) +{ + platform_device_unregister(goodix_pdev); +} +#else static int goodix_i2c_remove(struct i2c_client *client) { platform_device_unregister(goodix_pdev); return 0; } +#endif #ifdef CONFIG_OF static const struct of_device_id i2c_matchs[] = { diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_spi.c b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_spi.c index 8173555d3152..956f2dd209dc 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_spi.c +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_brl_spi.c @@ -264,11 +264,18 @@ err_pdev: return ret; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)) +static void goodix_spi_remove(struct spi_device *spi) +{ + platform_device_unregister(goodix_pdev); +} +#else static int goodix_spi_remove(struct spi_device *spi) { platform_device_unregister(goodix_pdev); return 0; } +#endif #ifdef CONFIG_OF static const struct of_device_id spi_matchs[] = { diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.c b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.c index 4ffa452663c7..06a2f830ab72 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.c +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.c @@ -14,18 +14,17 @@ * General Public License for more details. * */ -#include #include #include #include #include +#include "goodix_ts_core.h" #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) #include #define INPUT_TYPE_B_PROTOCOL #endif -#include "goodix_ts_core.h" #include "goodix_ts_mmi.h" #define PINCTRL_STATE_ACTIVE "pmx_ts_active" @@ -33,6 +32,10 @@ #define GOODIX_DEFAULT_CFG_NAME "goodix_cfg_group.cfg" #define GOOIDX_INPUT_PHYS "goodix_ts/input0" +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)) +#define PDE_DATA(x) pde_data(x) +#endif + struct goodix_module goodix_modules; int core_module_prob_sate = CORE_MODULE_UNPROBED; @@ -2237,6 +2240,7 @@ static int goodix_generic_noti_callback(struct notifier_block *self, ret = goodix_send_ic_config(cd, CONFIG_TYPE_NORMAL); if (ret) ts_info("failed send normal config[ignore]"); + fallthrough; case NOTIFY_FWUPDATE_FAILED: if (hw_ops->read_version(cd, &cd->fw_version)) ts_info("failed read fw version info[ignore]"); diff --git a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.h b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.h index 9264830792ad..3f8450bb14c4 100644 --- a/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.h +++ b/drivers/input/touchscreen/goodix_berlin_mmi/goodix_ts_core.h @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef CONFIG_OF #include #include diff --git a/drivers/input/touchscreen/touchscreen_mmi/Makefile b/drivers/input/touchscreen/touchscreen_mmi/Makefile index 23e3c4f27831..881b2808debf 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/Makefile +++ b/drivers/input/touchscreen/touchscreen_mmi/Makefile @@ -11,4 +11,6 @@ modules_install: KBUILD_EXTRA_SYMBOLS += $(M)/../../../sensors/Module.symvers KBUILD_EXTRA_SYMBOLS += $(M)/../../../mmi_relay/Module.symvers +ifneq ($(filter m y, $(CONFIG_DRM_DYNAMIC_REFRESH_RATE)),) KBUILD_EXTRA_SYMBOLS += $(OUT_DIR)/../../vendor/qcom/opensource/display-drivers/msm/Module.symvers +endif