[PATCH 2/2] Input: drv260x: Map ACPI enable GPIO
From: Maurizio Casciano
Date: Wed Aug 26 2026 - 09:23:01 EST
Some ACPI DRV2604 devices describe the enable line as the first GPIO
resource in _CRS but provide no _DSD mapping for its function. The GPIO
consumer lookup then returns no descriptor, leaving Yoga Book haptics
unable to complete calibration.
Add a managed ACPI GPIO mapping before requesting the optional enable
line so these devices can power their haptic path.
Signed-off-by: Maurizio Casciano <mauriziocasciano7@xxxxxxxxx>
Assisted-by: Codex:gpt-5.6-sol sparse
---
drivers/input/misc/drv260x.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index c4fbb10b254e..b6243ce8157d 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -434,6 +434,13 @@ static const struct regmap_config drv260x_regmap_config = {
.cache_type = REGCACHE_NONE,
};
+/* ACPI DRV2604 devices describe enable as their first GPIO resource. */
+static const struct acpi_gpio_params drv260x_enable_gpio = { 0, 0, false };
+static const struct acpi_gpio_mapping drv260x_acpi_gpios[] = {
+ { "enable-gpios", &drv260x_enable_gpio, 1 },
+ { }
+};
+
static void drv260x_power_off(void *data)
{
struct drv260x_data *haptics = data;
@@ -448,6 +455,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,
+ drv260x_acpi_gpios);
+ if (error)
+ return dev_err_probe(dev, error,
+ "Failed to add ACPI GPIO mapping\n");
+ }
+
haptics = devm_kzalloc(dev, sizeof(*haptics), GFP_KERNEL);
if (!haptics)
return -ENOMEM;
--
2.53.0