summaryrefslogtreecommitdiff
path: root/src/drivers/generic/gpio_keys/gpio_keys.c
diff options
context:
space:
mode:
authorBen Zhang <benzh@google.com>2021-05-19 15:22:17 -0400
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-05-20 20:40:42 +0000
commite91422dd68f18e3d8f90bbb81993d11ee223fe9b (patch)
treee69795756a865517c48d80154bfbe72471c0e0e1 /src/drivers/generic/gpio_keys/gpio_keys.c
parenta7822774fc1d819ec27645114a9687687fb37001 (diff)
drivers/gpio_keys: Add label to set input device name
Added the label field to the gpio_keys _DSD so that the kernel driver can use a meaningful name instead of the generic _HID PRP0001. BUG=b:184593945 BRANCH=puff TEST=build image and verify with evtest on puff: /dev/input/event3: mic_mute_switch UI event_device_info receives the proper name. Change-Id: I0377851b9cf23bab31930aed6e7de91b4ac3505b Signed-off-by: Ben Zhang <benzh@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54332 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/generic/gpio_keys/gpio_keys.c')
-rw-r--r--src/drivers/generic/gpio_keys/gpio_keys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c
index 3d273a030f..75ce09f7ea 100644
--- a/src/drivers/generic/gpio_keys/gpio_keys.c
+++ b/src/drivers/generic/gpio_keys/gpio_keys.c
@@ -76,6 +76,8 @@ static void gpio_keys_fill_ssdt_generator(const struct device *dev)
/* DSD */
dsd = acpi_dp_new_table("_DSD");
acpi_dp_add_string(dsd, "compatible", drv_string);
+ if (config->label)
+ acpi_dp_add_string(dsd, "label", config->label);
if (config->is_polled)
acpi_dp_add_integer(dsd, "poll-interval",
config->poll_interval);