From 5942749eed4654ae1a41f07fbc7ca1d894d4477a Mon Sep 17 00:00:00 2001 From: Konstantin Makariev Date: Tue, 22 Oct 2019 14:51:31 -0500 Subject: [PATCH] sec_mmi: use stubs for unavailable functions For bringup purpose adding stubs for the functions from other DLKM not available at the moment. Change-Id: I91c42f0c4472db606b871b10a1c64217fd3fd635 Signed-off-by: Konstantin Makariev Reviewed-on: https://gerrit.mot.com/1441361 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Konstantin Makariev Submit-Approved: Jira Key --- drivers/input/touchscreen/sec_mmi/Kbuild | 5 +++++ .../input/touchscreen/sec_mmi/sec_ts_mmi.c | 22 ++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sec_mmi/Kbuild b/drivers/input/touchscreen/sec_mmi/Kbuild index 46ebdbd70dff..abebaae16028 100644 --- a/drivers/input/touchscreen/sec_mmi/Kbuild +++ b/drivers/input/touchscreen/sec_mmi/Kbuild @@ -4,5 +4,10 @@ EXTRA_CFLAGS += \ -I$(TOP)/motorola/kernel/modules/include \ -I$(TOP)/motorola/kernel/modules/drivers/input/touchscreen/sec_mmi +ifneq (,$(filter smith%,$(TARGET_PRODUCT))) +# MMI_STOPSHIP LSI: remove when all DLKM available +EXTRA_CFLAGS += -DUSE_STUBS +endif + obj-m := sec_mmi.o sec_mmi-objs = sec_ts.o sec_ts_fn.o sec_ts_fw.o sec_ts_mmi.o sec_cmd.o sec_ts_only_vendor.o diff --git a/drivers/input/touchscreen/sec_mmi/sec_ts_mmi.c b/drivers/input/touchscreen/sec_mmi/sec_ts_mmi.c index 44753ef35ecb..93e49034aa17 100644 --- a/drivers/input/touchscreen/sec_mmi/sec_ts_mmi.c +++ b/drivers/input/touchscreen/sec_mmi/sec_ts_mmi.c @@ -28,12 +28,32 @@ #include #include #include -#include #include #include "sec_ts.h" #include "sec_mmi.h" +#if defined(USE_STUBS) +static struct class *local_touchscreen_class; +struct class *get_touchscreen_class_ptr(void) +{ + pr_info("sec_mmi: stub %s\n", __func__); + return local_touchscreen_class; +} +void set_touchscreen_class_ptr(struct class *ptr) +{ + pr_info("sec_mmi: stub %s\n", __func__); + local_touchscreen_class = ptr; +} +bool dsi_display_is_panel_enable(int ctrl_dsi, int *probe_status, char **pname) +{ + pr_info("sec_mmi: stub %s\n", __func__); + *probe_status = 0; + *pname = "csot_620_876x2142_cmd_display_v1"; + return true; +} +#endif + /* MMI specific sysfs entries and API */ static ssize_t sec_mmi_reset_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size);