summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ads7846.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r--drivers/input/touchscreen/ads7846.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index d247d0ae82d2..93e9d133e3a8 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1195,6 +1195,7 @@ static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev)
struct device_node *node = dev->of_node;
const struct of_device_id *match;
u32 value;
+ int ret;
if (!node) {
dev_err(dev, "Device does not have associated DT data\n");
@@ -1248,8 +1249,11 @@ static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev)
of_property_read_u16(node, "ti,debounce-tol", &pdata->debounce_tol);
of_property_read_u16(node, "ti,debounce-rep", &pdata->debounce_rep);
- of_property_read_u32(node, "ti,pendown-gpio-debounce",
+ ret = of_property_read_u32(node, "ti,pendown-gpio-debounce",
&pdata->gpio_pendown_debounce);
+ if (!ret)
+ dev_info(dev, "Set pendown gpio debounce time to %d microseconds\n",
+ pdata->gpio_pendown_debounce);
pdata->wakeup = of_property_read_bool(node, "wakeup-source") ||
of_property_read_bool(node, "linux,wakeup");
@@ -1377,7 +1381,7 @@ static int ads7846_probe(struct spi_device *spi)
pdata->y_max ? : MAX_12BIT,
0, 0);
input_set_abs_params(input_dev, ABS_PRESSURE,
- pdata->pressure_min, pdata->pressure_max, 0, 0);
+ pdata->pressure_min, ts->pressure_max, 0, 0);
/*
* Parse common framework properties. Must be done here to ensure the