Re: [PATCH 2/5] input: drv260x: Add support for ACPI-enumerated devices

From: Yauhen Kharuzhy

Date: Fri Feb 13 2026 - 15:48:51 EST


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@xxxxxxxxx>
> > ---
> > 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