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>
This commit is contained in:
committed by
Tim Wawrzynczak
parent
a7822774fc
commit
e91422dd68
@@ -74,6 +74,8 @@ struct key_info {
|
|||||||
struct drivers_generic_gpio_keys_config {
|
struct drivers_generic_gpio_keys_config {
|
||||||
/* Device name of the parent gpio-keys node */
|
/* Device name of the parent gpio-keys node */
|
||||||
const char *name;
|
const char *name;
|
||||||
|
/* Name of the input device - Optional */
|
||||||
|
const char *label;
|
||||||
/* GPIO line providing the key - Mandatory */
|
/* GPIO line providing the key - Mandatory */
|
||||||
struct acpi_gpio gpio;
|
struct acpi_gpio gpio;
|
||||||
/* Is this a polled GPIO button? - Optional */
|
/* Is this a polled GPIO button? - Optional */
|
||||||
|
@@ -76,6 +76,8 @@ static void gpio_keys_fill_ssdt_generator(const struct device *dev)
|
|||||||
/* DSD */
|
/* DSD */
|
||||||
dsd = acpi_dp_new_table("_DSD");
|
dsd = acpi_dp_new_table("_DSD");
|
||||||
acpi_dp_add_string(dsd, "compatible", drv_string);
|
acpi_dp_add_string(dsd, "compatible", drv_string);
|
||||||
|
if (config->label)
|
||||||
|
acpi_dp_add_string(dsd, "label", config->label);
|
||||||
if (config->is_polled)
|
if (config->is_polled)
|
||||||
acpi_dp_add_integer(dsd, "poll-interval",
|
acpi_dp_add_integer(dsd, "poll-interval",
|
||||||
config->poll_interval);
|
config->poll_interval);
|
||||||
|
Reference in New Issue
Block a user