mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
goodix_gtx8_v1430_mmi: support touchscreen_mmi.
TP: Only create touchscreen class if not defined touchscreen_mmi kernel module. Change-Id: I0ede7303b71197e6fababcc338857778fd17d96e Signed-off-by: haojl2 <haojl2@motorola.com> Reviewed-on: https://gerrit.mot.com/1454624 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Konstantin Makariev <kmakariev@motorola.com> Reviewed-by: Jun Weng <wengjun1@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
8f491c1f46
commit
04d3cc75f8
3 changed files with 14 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
DLKM_DIR := motorola/kernel/modules
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq ($(findstring touchscreen_mmi.ko,$(BOARD_VENDOR_KERNEL_MODULES)),)
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_TOUCHSCREEN_MMI=y
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := goodix_v1430_mmi.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ EXTRA_CFLAGS += \
|
|||
-I$(TOP)/motorola/kernel/modules/include \
|
||||
-I$(TOP)/motorola/kernel/modules/drivers/input/touchscreen/goodix_gtx8_v1430_mmi
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_INPUT_TOUCHSCREEN_MMI
|
||||
endif
|
||||
|
||||
obj-m := goodix_v1430_mmi.o
|
||||
goodix_v1430_mmi-objs = goodix_ts_i2c.o goodix_ts_core.o goodix_cfg_bin.o
|
||||
|
||||
|
|
|
|||
|
|
@ -799,6 +799,7 @@ static const struct attribute_group sysfs_group = {
|
|||
};
|
||||
|
||||
|
||||
#ifndef CONFIG_INPUT_TOUCHSCREEN_MMI
|
||||
/****/
|
||||
static ssize_t path_show(struct device *dev, struct device_attribute *pAttr, char *pBuf)
|
||||
{
|
||||
|
|
@ -895,6 +896,7 @@ device_destroy:
|
|||
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
static ssize_t goodix_sysfs_config_write(struct file *file,
|
||||
struct kobject *kobj, struct bin_attribute *attr,
|
||||
|
|
@ -987,6 +989,7 @@ static int goodix_ts_sysfs_init(struct goodix_ts_core *core_data)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_INPUT_TOUCHSCREEN_MMI
|
||||
ret = goodix_ts_sysfs_class(core_data->ts_dev, true);
|
||||
if (ret) {
|
||||
sysfs_remove_group(&core_data->pdev->dev.kobj, &sysfs_group);
|
||||
|
|
@ -994,13 +997,16 @@ static int goodix_ts_sysfs_init(struct goodix_ts_core *core_data)
|
|||
&goodix_config_bin_attr);
|
||||
ts_err("sys class files creation failed");
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void goodix_ts_sysfs_exit(struct goodix_ts_core *core_data)
|
||||
{
|
||||
#ifndef CONFIG_INPUT_TOUCHSCREEN_MMI
|
||||
goodix_ts_sysfs_class(core_data->ts_dev, false);
|
||||
#endif
|
||||
sysfs_remove_bin_file(&core_data->pdev->dev.kobj,
|
||||
&goodix_config_bin_attr);
|
||||
sysfs_remove_group(&core_data->pdev->dev.kobj, &sysfs_group);
|
||||
|
|
|
|||
Loading…
Reference in a new issue