platform/x86: x86-android-tablets: Lenovo Yoga Book match is for YB1-X91 models only
authorHans de Goede <hdegoede@redhat.com>
Tue, 28 Feb 2023 08:35:03 +0000 (09:35 +0100)
committerHans de Goede <hdegoede@redhat.com>
Tue, 7 Mar 2023 11:08:31 +0000 (12:08 +0100)
When support for instantiating an i2c-client for the fuel-gauge was
added for the Windows based Yoga Book YB1-X91F/L models, the assumption
was made that this would apply to the Android based YB1-X90F/L models too.

But these have a completely different BIOS with completely different DMI
strings. Update the existing YB1-X91 support to reflect that it only
applies to the YB1-X91F/L models.

Cc: Yauhen Kharuzhy <jekhor@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230301092331.7038-15-hdegoede@redhat.com
drivers/platform/x86/x86-android-tablets/dmi.c
drivers/platform/x86/x86-android-tablets/lenovo.c
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h

index 34af993d53925a5e2d1db3f13323cbb206b342a4..6ea47af1b4805671466d2247fa4ada452d4326df 100644 (file)
@@ -77,12 +77,12 @@ const struct dmi_system_id x86_android_tablet_ids[] __initconst = {
                .driver_data = (void *)&czc_p10t,
        },
        {
-               /* Lenovo Yoga Book X90F / X91F / X91L */
+               /* Lenovo Yoga Book X91F / X91L */
                .matches = {
-                       /* Non exact match to match all versions */
-                       DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
+                       /* Non exact match to match F + L versions */
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"),
                },
-               .driver_data = (void *)&lenovo_yogabook_x9x_info,
+               .driver_data = (void *)&lenovo_yogabook_x91_info,
        },
        {
                /*
index ec29c4d2445146a8c5a58991c74dbf18c66d1771..0baad9970820446c908e031ecaf809e7e38235f8 100644 (file)
@@ -24,8 +24,8 @@
 #include "shared-psy-info.h"
 #include "x86-android-tablets.h"
 
-/* Lenovo Yoga Book X90F / X91F / X91L need manual instantiation of the fg client */
-static const struct x86_i2c_client_info lenovo_yogabook_x9x_i2c_clients[] __initconst = {
+/* Lenovo Yoga Book X91F/L Windows tablet needs manual instantiation of the fg client */
+static const struct x86_i2c_client_info lenovo_yogabook_x91_i2c_clients[] __initconst = {
        {
                /* BQ27542 fuel-gauge */
                .board_info = {
@@ -38,9 +38,9 @@ static const struct x86_i2c_client_info lenovo_yogabook_x9x_i2c_clients[] __init
        },
 };
 
-const struct x86_dev_info lenovo_yogabook_x9x_info __initconst = {
-       .i2c_client_info = lenovo_yogabook_x9x_i2c_clients,
-       .i2c_client_count = ARRAY_SIZE(lenovo_yogabook_x9x_i2c_clients),
+const struct x86_dev_info lenovo_yogabook_x91_info __initconst = {
+       .i2c_client_info = lenovo_yogabook_x91_i2c_clients,
+       .i2c_client_count = ARRAY_SIZE(lenovo_yogabook_x91_i2c_clients),
 };
 
 /* Lenovo Yoga Tablet 2 1050F/L's Android factory img has everything hardcoded */
index f7ee36a30a91c2ecc22a028d62939341caeda34e..cf8566b3fd9cf99bae32ed2022c214244818d15a 100644 (file)
@@ -94,7 +94,7 @@ extern const struct x86_dev_info asus_me176c_info;
 extern const struct x86_dev_info asus_tf103c_info;
 extern const struct x86_dev_info chuwi_hi8_info;
 extern const struct x86_dev_info czc_p10t;
-extern const struct x86_dev_info lenovo_yogabook_x9x_info;
+extern const struct x86_dev_info lenovo_yogabook_x91_info;
 /* Not const as this gets modified by its init callback */
 extern struct x86_dev_info lenovo_yoga_tab2_830_1050_info;
 extern const struct x86_dev_info lenovo_yt3_info;