Skip to contentSkip to conversation

ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001

PATCH Applied Marius Hoch 3 participants 3 messages Apr 22, 2023 – Apr 27, 2023 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001

The LSM303D on the Lenovo Yoga Tablet 2 series is present as both ACCL0001 and MAGN0001. As we can only ever register an i2c client for one of them, ignore MAGN0001.

Currently this errors:
i2c i2c-4: Failed to register i2c client MAGN0001:00 at 0x1d (-16)

Tested on a Lenovo Yoga Tablet 2 1051-F.

---
 drivers/acpi/x86/utils.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/acpi/x86/utils.c +10 -0
index ba420a28a4aa..9c2d6f35f88a 100644
@@ -143,6 +143,16 @@ static const struct override_status_id override_status_ids[] = {
 		DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
 		DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
 	      }),
+
+	/*
+	 * The LSM303D on the Lenovo Yoga Tablet 2 series is present
+	 * as both ACCL0001 and MAGN0001. As we can only ever register an
+	 * i2c client for one of them, ignore MAGN0001.
+	 */
+	NOT_PRESENT_ENTRY_HID("MAGN0001", "1", ATOM_SILVERMONT, {
+		DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		DMI_MATCH(DMI_PRODUCT_FAMILY, "YOGATablet2"),
+	      }),
 };
 
 bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *status)
Signature · 1 line
2.40.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 10 lines · Marius Hoch

The LSM303D on the Lenovo Yoga Tablet 2 series is present as both ACCL0001 and MAGN0001. As we can only ever register an i2c client for one of them, ignore MAGN0001.

Currently this errors:
i2c i2c-4: Failed to register i2c client MAGN0001:00 at 0x1d (-16)

Tested on a Lenovo Yoga Tablet 2 1051-F.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 25 lines
---
 drivers/acpi/x86/utils.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/acpi/x86/utils.c +10 -0
index ba420a28a4aa..9c2d6f35f88a 100644
@@ -143,6 +143,16 @@ static const struct override_status_id override_status_ids[] = {
 		DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
 		DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
 	      }),
+
+	/*
+	 * The LSM303D on the Lenovo Yoga Tablet 2 series is present
+	 * as both ACCL0001 and MAGN0001. As we can only ever register an
+	 * i2c client for one of them, ignore MAGN0001.
+	 */
+	NOT_PRESENT_ENTRY_HID("MAGN0001", "1", ATOM_SILVERMONT, {
+		DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		DMI_MATCH(DMI_PRODUCT_FAMILY, "YOGATablet2"),
+	      }),
 };
 
 bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *status)
maintainer Applied
#2 lore raw
Quoted 11 lines · Hans de Goede

Hi,

Quoted 7 lines · Marius Hoch

The LSM303D on the Lenovo Yoga Tablet 2 series is present as both ACCL0001 and MAGN0001. As we can only ever register an i2c client for one of them, ignore MAGN0001.

Currently this errors:
i2c i2c-4: Failed to register i2c client MAGN0001:00 at 0x1d (-16)

Quoted 7 lines
Quoted 3 lines

Tested on a Lenovo Yoga Tablet 2 1051-F.

Thanks, patch looks good to me:

Applied as 6.4-rc material, thanks!

Quoted 26 lines
Quoted 25 lines
---
 drivers/acpi/x86/utils.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/acpi/x86/utils.c +10 -0
index ba420a28a4aa..9c2d6f35f88a 100644
@@ -143,6 +143,16 @@ static const struct override_status_id override_status_ids[] = {
              DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
              DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
            }),
+
+     /*
+      * The LSM303D on the Lenovo Yoga Tablet 2 series is present
+      * as both ACCL0001 and MAGN0001. As we can only ever register an
+      * i2c client for one of them, ignore MAGN0001.
+      */
+     NOT_PRESENT_ENTRY_HID("MAGN0001", "1", ATOM_SILVERMONT, {
+             DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+             DMI_MATCH(DMI_PRODUCT_FAMILY, "YOGATablet2"),
+           }),
 };
 
 bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *status)