aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-09-09 21:50:37 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-10-15 22:09:48 -0700
commit9271cda2bb41b16063e2c24aae890e814caf82a1 (patch)
treef00ceb9c6d5d04b82b8313864fd4a4a46a5b2c6e /drivers/input
parentInput: tm2-touchkey - allow changing keycodes from userspace (diff)
downloadlinux-dev-9271cda2bb41b16063e2c24aae890e814caf82a1.tar.xz
linux-dev-9271cda2bb41b16063e2c24aae890e814caf82a1.zip
Input: ads7846 - set input device bus type and product ID
Set input device's bus type as BUS_SPI and use model as product ID. Link: https://lore.kernel.org/r/20210910045039.4020199-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/ads7846.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index eaa8714ad19d..a018481e9d8b 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1304,6 +1304,9 @@ static int ads7846_probe(struct spi_device *spi)
input_dev->name = ts->name;
input_dev->phys = ts->phys;
+ input_dev->id.bustype = BUS_SPI;
+ input_dev->id.product = pdata->model;
+
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
input_set_abs_params(input_dev, ABS_X,