summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/generic/gpio_keys/chip.h2
-rw-r--r--src/drivers/generic/gpio_keys/gpio_keys.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/generic/gpio_keys/chip.h b/src/drivers/generic/gpio_keys/chip.h
index a2ff59dc73..1599b8df1e 100644
--- a/src/drivers/generic/gpio_keys/chip.h
+++ b/src/drivers/generic/gpio_keys/chip.h
@@ -74,6 +74,8 @@ struct key_info {
struct drivers_generic_gpio_keys_config {
/* Device name of the parent gpio-keys node */
const char *name;
+ /* Name of the input device - Optional */
+ const char *label;
/* GPIO line providing the key - Mandatory */
struct acpi_gpio gpio;
/* Is this a polled GPIO button? - Optional */
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);