public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Yauhen Kharuzhy <jekhor@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Hans de Goede <hansg@kernel.org>
Subject: Re: [PATCH 2/5] input: drv260x: Add support for ACPI-enumerated devices
Date: Fri, 13 Feb 2026 22:48:36 +0200	[thread overview]
Message-ID: <aY-HibKtT-thpaoS@jekhomev> (raw)
In-Reply-To: <aY4MqXG2zr01Pk4Q@google.com>

On Thu, Feb 12, 2026 at 09:26:24AM -0800, Dmitry Torokhov wrote:
> Hi Yauhen,
> 
> On Thu, Feb 12, 2026 at 01:46:52AM +0200, Yauhen Kharuzhy wrote:
> > Add ACPI ids and GPIO lookup mapping for drv2604 haptics device.
> > Found in Lenovo Yoga Book YB1-X91L tablet.
> > 
> > Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
> > ---
> >  drivers/input/misc/drv260x.c | 30 ++++++++++++++++++++++++++++--
> >  1 file changed, 28 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
> > index 18360bdfe877..f613c81fa2ba 100644
> > --- a/drivers/input/misc/drv260x.c
> > +++ b/drivers/input/misc/drv260x.c
> > @@ -15,6 +15,7 @@
> >  #include <linux/delay.h>
> >  #include <linux/gpio/consumer.h>
> >  #include <linux/regulator/consumer.h>
> > +#include <linux/acpi.h>
> 
> Sort alphabetically please.

Sure.

> 
> >  
> >  #include <dt-bindings/input/ti-drv260x.h>
> >  
> > @@ -419,6 +420,12 @@ static const struct regmap_config drv260x_regmap_config = {
> >  	.cache_type = REGCACHE_NONE,
> >  };
> >  
> > +static const struct acpi_gpio_params enable_gpio = { 0, 0, false };
> > +static const struct acpi_gpio_mapping acpi_drv260x_default_gpios[] = {
> > +	{ "enable-gpio", &enable_gpio, 1 },
> > +	{ }
> > +};
> 
> I'd rather move this ACPI/device-specifin handling into drivers/platform/x86/x86-android-tablets/lenovo.c

I am not sure if this is device-specific, but since there are no other
devices with a DRV260x ACPI entry, I may agree. Will move it.

> 
> > +
> >  static int drv260x_probe(struct i2c_client *client)
> >  {
> >  	struct device *dev = &client->dev;
> > @@ -426,6 +433,14 @@ static int drv260x_probe(struct i2c_client *client)
> >  	u32 voltage;
> >  	int error;
> >  
> > +	if (has_acpi_companion(dev)) {
> > +		error = devm_acpi_dev_add_driver_gpios(dev, acpi_drv260x_default_gpios);
> > +		if (error) {
> > +			dev_err(dev, "can't add GPIO ACPI mapping\n");
> > +			return error;
> > +		}
> > +	}
> > +
> >  	haptics = devm_kzalloc(dev, sizeof(*haptics), GFP_KERNEL);
> >  	if (!haptics)
> >  		return -ENOMEM;
> > @@ -484,8 +499,10 @@ static int drv260x_probe(struct i2c_client *client)
> >  		return error;
> >  	}
> >  
> > -	haptics->enable_gpio = devm_gpiod_get_optional(dev, "enable",
> > -						       GPIOD_OUT_HIGH);
> > +	haptics->enable_gpio = devm_gpiod_get_optional(dev,
> > +			"enable", GPIOD_OUT_HIGH);
> 
> Why this change?

A good question. Looks like artifact from previous development
iterations, will remove it.

> 
> > +
> > +	dev_dbg(dev, "Enable gpio = 0x%p\n", haptics->enable_gpio);
> 
> ?

Hmm, looks like a forgotten debug stuff, removing it.


-- 
Yauhen Kharuzhy

  reply	other threads:[~2026-02-13 20:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 23:46 DRV260x: Support ACPI-enumerated devices Yauhen Kharuzhy
2026-02-11 23:46 ` [PATCH 1/5] input: drv260x: Add I2C IDs for all device variants Yauhen Kharuzhy
2026-02-11 23:46 ` [PATCH 2/5] input: drv260x: Add support for ACPI-enumerated devices Yauhen Kharuzhy
2026-02-12 17:26   ` Dmitry Torokhov
2026-02-13 20:48     ` Yauhen Kharuzhy [this message]
2026-02-11 23:46 ` [PATCH 3/5] input: drv260x: Check the device ID at initialization Yauhen Kharuzhy
2026-02-12 17:28   ` Dmitry Torokhov
2026-02-13 20:53     ` Yauhen Kharuzhy
2026-02-11 23:46 ` [PATCH 4/5] input: drv260x: Stop waiting for GO bit clearing after timeout Yauhen Kharuzhy
2026-02-12 17:34   ` Dmitry Torokhov
2026-02-13 21:00     ` Yauhen Kharuzhy
2026-02-11 23:46 ` [PATCH 5/5] input: drv260x: Don't try to disable dummy regulator Yauhen Kharuzhy
2026-02-12 17:41   ` Dmitry Torokhov
2026-02-13 21:56     ` Yauhen Kharuzhy

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=aY-HibKtT-thpaoS@jekhomev \
    --to=jekhor@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hansg@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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