Skip to content

Commit 5556af9

Browse files
committed
Merge: Enable and update gpio-keys-polled driver
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4918 JIRA: https://issues.redhat.com/browse/RHEL-52234 We've been requested to enable this driver because there are vendors using it (although not all DT files are upstream yet). I've performed basic testing on the Jetson AGX Orin w/ a slightly modified driver (so that it would load without DT changes). Signed-off-by: Luiz Capitulino <luizcap@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: Mark Salter <msalter@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents 20855f5 + 7bc6929 commit 5556af9

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

drivers/input/keyboard/gpio_keys_polled.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,9 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
299299
NULL, GPIOD_IN,
300300
button->desc);
301301
if (IS_ERR(bdata->gpiod)) {
302-
error = PTR_ERR(bdata->gpiod);
303-
if (error != -EPROBE_DEFER)
304-
dev_err(dev,
305-
"failed to get gpio: %d\n",
306-
error);
307302
fwnode_handle_put(child);
308-
return error;
303+
return dev_err_probe(dev, PTR_ERR(bdata->gpiod),
304+
"failed to get gpio\n");
309305
}
310306
} else if (gpio_is_valid(button->gpio)) {
311307
/*
@@ -319,12 +315,10 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
319315

320316
error = devm_gpio_request_one(dev, button->gpio,
321317
flags, button->desc ? : DRV_NAME);
322-
if (error) {
323-
dev_err(dev,
324-
"unable to claim gpio %u, err=%d\n",
325-
button->gpio, error);
326-
return error;
327-
}
318+
if (error)
319+
return dev_err_probe(dev, error,
320+
"unable to claim gpio %u\n",
321+
button->gpio);
328322

329323
bdata->gpiod = gpio_to_desc(button->gpio);
330324
if (!bdata->gpiod) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_KEYBOARD_GPIO_POLLED=m

0 commit comments

Comments
 (0)