diff --git a/drivers/input/touchscreen/nova_0flash_mmi/Android.mk b/drivers/input/touchscreen/nova_0flash_mmi/Android.mk index 5fdb2c717d7b..b7903de064cf 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/Android.mk +++ b/drivers/input/touchscreen/nova_0flash_mmi/Android.mk @@ -15,6 +15,10 @@ ifneq ($(BOARD_USES_PANEL_NOTIFICATIONS),) KERNEL_CFLAGS += CONFIG_INPUT_NOVA_PANEL_NOTIFICATIONS=y endif +ifneq ($(CONFIG_INPUT_ENABLE_DRM_PANEL),) + KERNEL_CFLAGS += CONFIG_INPUT_NOVA_DRM_PANEL=y +endif + ifneq ($(BOARD_USES_PEN_NOTIFIER),) KERNEL_CFLAGS += CONFIG_INPUT_NOVA_0FLASH_MMI_PEN_NOTIFIER=y endif diff --git a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild index 99fe5c9a653b..a15e94abf59f 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild +++ b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild @@ -13,6 +13,10 @@ 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 + ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_STYLUS_PALM)),) EXTRA_CFLAGS += -DPALM_GESTURE endif diff --git a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c index 2449dec42b67..5024c9db09e4 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c +++ b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c @@ -27,7 +27,7 @@ #include #include -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) #include #include @@ -111,7 +111,7 @@ extern void nvt_mp_proc_deinit(void); struct nvt_ts_data *ts; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) static struct drm_panel *active_panel; #endif @@ -126,7 +126,7 @@ extern void Boot_Update_Firmware(struct work_struct *work); int nvt_mcu_pen_detect_set(uint8_t pen_detect); #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) static int nvt_drm_notifier_callback(struct notifier_block *self, unsigned long event, void *data); #endif @@ -1132,7 +1132,7 @@ static int nvt_get_dt_def_coords(struct device *dev, char *name) return rc; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) static int nova_check_dt(struct device_node *np) { @@ -2079,7 +2079,7 @@ static int32_t nvt_ts_probe(struct spi_device *client) #ifdef NVT_SENSOR_EN static bool initialized_sensor; #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) struct device_node *dp = client->dev.of_node; ret = nova_check_dt(dp); @@ -2403,7 +2403,7 @@ static int32_t nvt_ts_probe(struct spi_device *client) } #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) ts->drm_notif.notifier_call = nvt_drm_notifier_callback; if (active_panel && @@ -2465,7 +2465,7 @@ static int32_t nvt_ts_probe(struct spi_device *client) return 0; err_create_touchscreen_class_failed: -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) if (active_panel) { if (drm_panel_notifier_unregister(active_panel, &ts->drm_notif)) @@ -2578,7 +2578,7 @@ static int32_t nvt_ts_remove(struct spi_device *client) nvt_fw_class_init(false); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) if (active_panel) { drm_panel_notifier_unregister(active_panel, &ts->drm_notif); @@ -2677,7 +2677,7 @@ static void nvt_ts_shutdown(struct spi_device *client) nvt_irq_enable(false); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) if (active_panel) { drm_panel_notifier_unregister(active_panel, &ts->drm_notif); @@ -2917,7 +2917,7 @@ static int32_t nvt_ts_resume(struct device *dev) return 0; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) static int nvt_drm_notifier_callback(struct notifier_block *self, unsigned long event, void *data) {