linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Mack <daniel@zonque.org>, Marco Felsch <m.felsch@pengutronix.de>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] Input: ads7846 - set input device bus type and product ID
Date: Thu,  9 Sep 2021 21:50:37 -0700	[thread overview]
Message-ID: <20210910045039.4020199-1-dmitry.torokhov@gmail.com> (raw)

Set input device's bus type as BUS_SPI and use model as product ID.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/ads7846.c | 3 +++
 1 file changed, 3 insertions(+)

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,
-- 
2.33.0.309.g3052b89438-goog


             reply	other threads:[~2021-09-10  4:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  4:50 Dmitry Torokhov [this message]
2021-09-10  4:50 ` [PATCH 2/3] Input: ads7846 - use input_set_capability() Dmitry Torokhov
2021-09-10  4:50 ` [PATCH 3/3] Input: ads7846 - do not attempt IRQ workaround when deferring probe Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210910045039.4020199-1-dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=daniel@zonque.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).