aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2023-02-27 16:56:25 -0800
committerChristian Lamparter <chunkeey@gmail.com>2023-05-18 17:11:43 +0200
commit23845fa10bc135bfc7fd4380948b5965b9d20cb5 (patch)
tree8b8ec4103872e405b082eb0cba8b725e734975c0 /package/kernel
parent1465691319bf9fb20869945c8f7bb5e43da1cf3c (diff)
downloadupstream-23845fa10bc135bfc7fd4380948b5965b9d20cb5.tar.gz
upstream-23845fa10bc135bfc7fd4380948b5965b9d20cb5.tar.bz2
upstream-23845fa10bc135bfc7fd4380948b5965b9d20cb5.zip
gpio-button-hotplug: do not error on interrupt attached keys
The Linux gpio-keys driver bindings allow for GPIO attached or interrupt attached keys. Currently if an interrupt attached key is encountered gpio_keys_button_probe() will fail due to not being able to get a gpio descriptor: gpio-keys: probe of gpio-keys failed with error -2 Skip the failure in the case of interrupt attached keys to resolve this. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index 2b39ec8f3b..522085bb2f 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -506,6 +506,13 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
goto out;
}
+ if (button->irq) {
+ dev_err(dev, "skipping button %s (only gpio buttons supported)\n",
+ button->desc);
+ bdata->b = &pdata->buttons[i];
+ continue;
+ }
+
if (gpio_is_valid(button->gpio)) {
/* legacy platform data... but is it the lookup table? */
bdata->gpiod = devm_gpiod_get_index(dev, desc, i,