summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuper Liu <supercjliu@google.com>2021-09-23 14:06:52 +0800
committerSuper Liu <supercjliu@google.com>2021-09-30 02:54:39 +0000
commit661813143362b5c831fcfc53846407b9d314c084 (patch)
treee27381491ce22a445ede76e62c480b3e50d309cd
parent9cc207b316f0b08f2326bfde813b2e968307ce0f (diff)
downloadsec_touch-661813143362b5c831fcfc53846407b9d314c084.tar.gz
touch/sec: disable debug sysfs.
Below sysfs will be disabled. /sys/devices/virtual/sec/sec_ts/ sec_ts_enter_recovery sec_ts_gesture_status sec_ts_reg sec_ts_reg_manual sec_ts_regread sec_ts_regread_manual sec_ts_regreadsize sec_ts_regreadsize_manual Bug: 194499021 Signed-off-by: Super Liu <supercjliu@google.com> Change-Id: I2eaa3720bff3e7d98a07adfd1f4a37eec79a2c72 Merged-In: I2eaa3720bff3e7d98a07adfd1f4a37eec79a2c72 (cherry picked from commit e8cb55be314046fda6aeb37cf1e5803c424c6f6c)
-rw-r--r--Kbuild6
-rw-r--r--sec_ts.h13
2 files changed, 15 insertions, 4 deletions
diff --git a/Kbuild b/Kbuild
index 04453d7..b9ee991 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1,3 +1,5 @@
obj-$(CONFIG_TOUCHSCREEN_SEC_TS) += sec_touch.o
-sec_touch-objs += sec_cmd.o sec_ts.o sec_ts_fw.o sec_ts_fn.o \
- sec_ts_only_vendor.o
+sec_touch-objs += sec_cmd.o sec_ts.o sec_ts_fw.o sec_ts_fn.o
+ifneq ($(CONFIG_TOUCHSCREEN_SEC_TS_DEBUG),)
+sec_touch-objs += sec_ts_only_vendor.o
+endif
diff --git a/sec_ts.h b/sec_ts.h
index 9901d63..387c007 100644
--- a/sec_ts.h
+++ b/sec_ts.h
@@ -1131,10 +1131,19 @@ int sec_ts_read_raw_data(struct sec_ts_data *ts,
struct sec_cmd_data *sec, struct sec_ts_test_mode *mode);
u8 sec_ts_run_cal_check(struct sec_ts_data *ts);
-#if (1)//!defined(CONFIG_SAMSUNG_PRODUCT_SHIP)
+#if IS_ENABLED(CONFIG_TOUCHSCREEN_SEC_TS_DEBUG)
int sec_ts_raw_device_init(struct sec_ts_data *ts);
-#endif
void sec_ts_raw_device_exit(struct sec_ts_data *ts);
+#else
+static inline int sec_ts_raw_device_init(struct sec_ts_data *ts)
+{
+ return 0;
+}
+
+static inline void sec_ts_raw_device_exit(struct sec_ts_data *ts)
+{
+}
+#endif
extern struct class *sec_class;