* [PATCH] ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001
@ 2023-04-22 16:44 Marius Hoch
2023-04-22 17:29 ` Hans de Goede
0 siblings, 1 reply; 3+ messages in thread
From: Marius Hoch @ 2023-04-22 16:44 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel
Cc: Hans de Goede, 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.
Signed-off-by: Marius Hoch <mail@mariushoch.de>
---
drivers/acpi/x86/utils.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index ba420a28a4aa..9c2d6f35f88a 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -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)
--
2.40.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001
2023-04-22 16:44 [PATCH] ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001 Marius Hoch
@ 2023-04-22 17:29 ` Hans de Goede
2023-04-27 16:53 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2023-04-22 17:29 UTC (permalink / raw)
To: Marius Hoch, Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel
Hi,
On 4/22/23 18:44, Marius Hoch wrote:
> 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.
>
> Signed-off-by: Marius Hoch <mail@mariushoch.de>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/acpi/x86/utils.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> index ba420a28a4aa..9c2d6f35f88a 100644
> --- a/drivers/acpi/x86/utils.c
> +++ b/drivers/acpi/x86/utils.c
> @@ -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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001
2023-04-22 17:29 ` Hans de Goede
@ 2023-04-27 16:53 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2023-04-27 16:53 UTC (permalink / raw)
To: Hans de Goede, Marius Hoch; +Cc: Len Brown, linux-acpi, linux-kernel
On Sat, Apr 22, 2023 at 7:29 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 4/22/23 18:44, Marius Hoch wrote:
> > 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.
> >
> > Signed-off-by: Marius Hoch <mail@mariushoch.de>
>
> Thanks, patch looks good to me:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Applied as 6.4-rc material, thanks!
> > ---
> > drivers/acpi/x86/utils.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> > index ba420a28a4aa..9c2d6f35f88a 100644
> > --- a/drivers/acpi/x86/utils.c
> > +++ b/drivers/acpi/x86/utils.c
> > @@ -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)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-27 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-22 16:44 [PATCH] ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001 Marius Hoch
2023-04-22 17:29 ` Hans de Goede
2023-04-27 16:53 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.