diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-04-29 20:02:30 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-05-09 11:54:42 +0200 |
commit | fbc29478aa60662711679a8b0b56962b35db8df6 (patch) | |
tree | 26680631b83d19def6d86c78f4377cbb9e6262ca /drivers/platform | |
parent | d190a7786eafe17670c3a63326a8f97a4497449e (diff) |
platform/x86: x86-android-tablets: Add Lenovo Yoga Book lid switch
Add x86_gpio_button info for the yb1-x90f/l describing the lid switch
on the Lenovo Yoga Book Android models.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230429180230.97716-2-hdegoede@redhat.com
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/x86-android-tablets/lenovo.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c index 270c4712fa7c..50031e902a2c 100644 --- a/drivers/platform/x86/x86-android-tablets/lenovo.c +++ b/drivers/platform/x86/x86-android-tablets/lenovo.c @@ -160,6 +160,19 @@ static const struct x86_serdev_info lenovo_yb1_x90_serdevs[] __initconst = { }, }; +static struct x86_gpio_button lenovo_yb1_x90_lid = { + .button = { + .code = SW_LID, + .active_low = true, + .desc = "lid_sw", + .type = EV_SW, + .wakeup = true, + .debounce_interval = 50, + }, + .chip = "INT33FF:02", + .pin = 19, +}; + static struct gpiod_lookup_table lenovo_yb1_x90_goodix_gpios = { .dev_id = "i2c-goodix_ts", .table = { @@ -218,6 +231,7 @@ const struct x86_dev_info lenovo_yogabook_x90_info __initconst = { .pdev_count = ARRAY_SIZE(lenovo_yb1_x90_pdevs), .serdev_info = lenovo_yb1_x90_serdevs, .serdev_count = ARRAY_SIZE(lenovo_yb1_x90_serdevs), + .gpio_button = &lenovo_yb1_x90_lid, .gpiod_lookup_tables = lenovo_yb1_x90_gpios, .init = lenovo_yb1_x90_init, }; |