* [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book
@ 2023-04-29 18:02 Hans de Goede
2023-04-29 18:02 ` [PATCH 2/2] platform/x86: x86-android-tablets: Add Lenovo Yoga Book lid switch Hans de Goede
2023-05-09 9:29 ` [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book Hans de Goede
0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2023-04-29 18:02 UTC (permalink / raw)
To: Ilpo Järvinen, Andy Shevchenko; +Cc: Hans de Goede, platform-driver-x86
The Lenovo Yoga Book yb1-x90f/l has (another) bug in its DSDT where
the UART resource for the BTH0 ACPI device contains
"\\_SB.PCIO.URT1" as path to the UART.
Note that is with a letter 'O' instead of the number '0' which is wrong.
Add a x86_serdev_info entry to make the x86-android-tablets module
manually setup the /sys/bus/serial device for the Bluetooth UART
to fix Bluetooth not working due to this bug.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/x86-android-tablets/lenovo.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c
index 0297b4c43d3b..270c4712fa7c 100644
--- a/drivers/platform/x86/x86-android-tablets/lenovo.c
+++ b/drivers/platform/x86/x86-android-tablets/lenovo.c
@@ -147,6 +147,19 @@ static const struct platform_device_info lenovo_yb1_x90_pdevs[] __initconst = {
},
};
+/*
+ * DSDT says UART path is "\\_SB.PCIO.URT1" with a letter 'O' instead of
+ * the number '0' add the link manually.
+ */
+static const struct x86_serdev_info lenovo_yb1_x90_serdevs[] __initconst = {
+ {
+ .ctrl_hid = "8086228A",
+ .ctrl_uid = "1",
+ .ctrl_devname = "serial0",
+ .serdev_hid = "BCM2E1A",
+ },
+};
+
static struct gpiod_lookup_table lenovo_yb1_x90_goodix_gpios = {
.dev_id = "i2c-goodix_ts",
.table = {
@@ -203,6 +216,8 @@ const struct x86_dev_info lenovo_yogabook_x90_info __initconst = {
.i2c_client_count = ARRAY_SIZE(lenovo_yb1_x90_i2c_clients),
.pdev_info = lenovo_yb1_x90_pdevs,
.pdev_count = ARRAY_SIZE(lenovo_yb1_x90_pdevs),
+ .serdev_info = lenovo_yb1_x90_serdevs,
+ .serdev_count = ARRAY_SIZE(lenovo_yb1_x90_serdevs),
.gpiod_lookup_tables = lenovo_yb1_x90_gpios,
.init = lenovo_yb1_x90_init,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] platform/x86: x86-android-tablets: Add Lenovo Yoga Book lid switch
2023-04-29 18:02 [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book Hans de Goede
@ 2023-04-29 18:02 ` Hans de Goede
2023-05-09 9:29 ` [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2023-04-29 18:02 UTC (permalink / raw)
To: Ilpo Järvinen, Andy Shevchenko; +Cc: Hans de Goede, platform-driver-x86
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>
---
drivers/platform/x86/x86-android-tablets/lenovo.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
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,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book
2023-04-29 18:02 [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book Hans de Goede
2023-04-29 18:02 ` [PATCH 2/2] platform/x86: x86-android-tablets: Add Lenovo Yoga Book lid switch Hans de Goede
@ 2023-05-09 9:29 ` Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2023-05-09 9:29 UTC (permalink / raw)
To: Ilpo Järvinen, Andy Shevchenko; +Cc: platform-driver-x86
Hi,
On 4/29/23 20:02, Hans de Goede wrote:
> The Lenovo Yoga Book yb1-x90f/l has (another) bug in its DSDT where
> the UART resource for the BTH0 ACPI device contains
> "\\_SB.PCIO.URT1" as path to the UART.
>
> Note that is with a letter 'O' instead of the number '0' which is wrong.
>
> Add a x86_serdev_info entry to make the x86-android-tablets module
> manually setup the /sys/bus/serial device for the Bluetooth UART
> to fix Bluetooth not working due to this bug.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
I've added this series to my review-hans (soon to be for-next) branch now.
Regards,
Hans
> ---
> drivers/platform/x86/x86-android-tablets/lenovo.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c
> index 0297b4c43d3b..270c4712fa7c 100644
> --- a/drivers/platform/x86/x86-android-tablets/lenovo.c
> +++ b/drivers/platform/x86/x86-android-tablets/lenovo.c
> @@ -147,6 +147,19 @@ static const struct platform_device_info lenovo_yb1_x90_pdevs[] __initconst = {
> },
> };
>
> +/*
> + * DSDT says UART path is "\\_SB.PCIO.URT1" with a letter 'O' instead of
> + * the number '0' add the link manually.
> + */
> +static const struct x86_serdev_info lenovo_yb1_x90_serdevs[] __initconst = {
> + {
> + .ctrl_hid = "8086228A",
> + .ctrl_uid = "1",
> + .ctrl_devname = "serial0",
> + .serdev_hid = "BCM2E1A",
> + },
> +};
> +
> static struct gpiod_lookup_table lenovo_yb1_x90_goodix_gpios = {
> .dev_id = "i2c-goodix_ts",
> .table = {
> @@ -203,6 +216,8 @@ const struct x86_dev_info lenovo_yogabook_x90_info __initconst = {
> .i2c_client_count = ARRAY_SIZE(lenovo_yb1_x90_i2c_clients),
> .pdev_info = lenovo_yb1_x90_pdevs,
> .pdev_count = ARRAY_SIZE(lenovo_yb1_x90_pdevs),
> + .serdev_info = lenovo_yb1_x90_serdevs,
> + .serdev_count = ARRAY_SIZE(lenovo_yb1_x90_serdevs),
> .gpiod_lookup_tables = lenovo_yb1_x90_gpios,
> .init = lenovo_yb1_x90_init,
> };
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-09 9:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-29 18:02 [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book Hans de Goede
2023-04-29 18:02 ` [PATCH 2/2] platform/x86: x86-android-tablets: Add Lenovo Yoga Book lid switch Hans de Goede
2023-05-09 9:29 ` [PATCH 1/2] platform/x86: x86-android-tablets: Fix Bluetooth on Lenovo Yoga Book Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox