Message ID | 20230727-ads7846-pressure-v1-1-fa74c7680191@skidata.com |
---|---|
State | New |
Headers | show |
Series | Input: ads7846 - don't set ABS_PRESSURE when min == max | expand |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index faea40dd66d0..2535424a5630 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -1281,7 +1281,7 @@ static int ads7846_probe(struct spi_device *spi) pdata->y_min ? : 0, pdata->y_max ? : MAX_12BIT, 0, 0); - if (ts->model != 7845) + if (ts->model != 7845 && pdata->pressure_min != pdata->pressure_max) input_set_abs_params(input_dev, ABS_PRESSURE, pdata->pressure_min, pdata->pressure_max, 0, 0);