summaryrefslogtreecommitdiff
path: root/sec_ts_fn.c
diff options
context:
space:
mode:
authorSuper Liu <supercjliu@google.com>2020-02-12 09:57:19 +0800
committerSuper Liu <supercjliu@google.com>2020-02-12 10:00:49 +0800
commitcf488d3dc9891b5cafd0d4db7c9d361705d037b4 (patch)
treee9ada7c325c1b4410f29d0e2b1589d32d4c6f6ec /sec_ts_fn.c
parent1ee579f6b5da57826cc50adbc25e5eaf4229769a (diff)
downloadsec_touch-cf488d3dc9891b5cafd0d4db7c9d361705d037b4.tar.gz
sec_touch: support heatmap setting from dtsi
Bug: 145788304 Change-Id: Ib21e5f18da06a851d2dc3f02b304fe7906c1b777 Signed-off-by: Super Liu <supercjliu@google.com>
Diffstat (limited to 'sec_ts_fn.c')
-rw-r--r--sec_ts_fn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sec_ts_fn.c b/sec_ts_fn.c
index c4570ce..1e8b219 100644
--- a/sec_ts_fn.c
+++ b/sec_ts_fn.c
@@ -935,6 +935,7 @@ static ssize_t heatmap_mode_store(struct device *dev,
defined(CONFIG_TOUCHSCREEN_HEATMAP_MODULE)
struct sec_cmd_data *sec = dev_get_drvdata(dev);
struct sec_ts_data *ts = container_of(sec, struct sec_ts_data, sec);
+ struct sec_ts_plat_data *pdata = ts->plat_data;
int result;
int val;
u8 config;
@@ -946,7 +947,7 @@ static ssize_t heatmap_mode_store(struct device *dev,
return -EINVAL;
}
- ts->heatmap_mode = val;
+ pdata->heatmap_mode = val;
/* reset all heatmap settings when any change */
config = 0;
@@ -977,9 +978,10 @@ static ssize_t heatmap_mode_show(struct device *dev,
defined(CONFIG_TOUCHSCREEN_HEATMAP_MODULE)
struct sec_cmd_data *sec = dev_get_drvdata(dev);
struct sec_ts_data *ts = container_of(sec, struct sec_ts_data, sec);
+ const struct sec_ts_plat_data *pdata = ts->plat_data;
return scnprintf(buf, PAGE_SIZE, "%d\n",
- ts->heatmap_mode);
+ pdata->heatmap_mode);
#else
return scnprintf(buf, PAGE_SIZE, "N/A\n");
#endif