Commit 5f250f8a authored by Hans de Goede's avatar Hans de Goede
Browse files

platform/x86: x86-android-tablets: Lenovo Yoga Book match is for YB1-X91 models only



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: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230301092331.7038-15-hdegoede@redhat.com
parent dadbc368
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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,
	},
	{
		/*
+5 −5
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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;