All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI / x86: Revert: Make PWM2 device always present at Lenovo Yoga Book
@ 2021-11-13 13:52 Hans de Goede
  2021-11-13 18:16 ` Yauhen Kharuzhy
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2021-11-13 13:52 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Len Brown, linux-acpi, Yauhen Kharuzhy

It turns out that there is a WMI object which controls the PWM2 device
used for the keyboard backlight and that WMI object also provides some
other useful functionality.

The upcoming lenovo-yogabook-wmi driver will offer both backlight
control and the other functionality, so there no longer is a need
to have the lpss-pwm driver binding to PWM2 for backlight control;
and this is now actually undesirable because this will cause both
the WMI code and the lpss-pwm driver to poke at the same PWM
controller.

Revert commit ff6cdfd71495 ("ACPI / x86: Make PWM2 device always present
at Lenovo Yoga Book"), removing the always-present quirk for the PWM2
ACPI-device, so that the lpss-pwm controller will no longer bind to it.

Cc: Yauhen Kharuzhy <jekhor@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/x86/utils.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index cb988f9b23a1..bfcb76888ca7 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -54,10 +54,6 @@ static const struct always_present_id always_present_ids[] = {
 	ENTRY("80860F09", "1", X86_MATCH(ATOM_SILVERMONT), {}),
 	ENTRY("80862288", "1", X86_MATCH(ATOM_AIRMONT), {}),
 
-	/* Lenovo Yoga Book uses PWM2 for keyboard backlight control */
-	ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
-			DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
-		}),
 	/* The Xiaomi Mi Pad 2 uses PWM2 for touchkeys backlight control */
 	ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
 		DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / x86: Revert: Make PWM2 device always present at Lenovo Yoga Book
  2021-11-13 13:52 [PATCH] ACPI / x86: Revert: Make PWM2 device always present at Lenovo Yoga Book Hans de Goede
@ 2021-11-13 18:16 ` Yauhen Kharuzhy
  2021-11-16 19:25   ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Yauhen Kharuzhy @ 2021-11-13 18:16 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Rafael J . Wysocki, Len Brown, linux-acpi

On Sat, Nov 13, 2021 at 02:52:06PM +0100, Hans de Goede wrote:
> It turns out that there is a WMI object which controls the PWM2 device
> used for the keyboard backlight and that WMI object also provides some
> other useful functionality.
> 
> The upcoming lenovo-yogabook-wmi driver will offer both backlight
> control and the other functionality, so there no longer is a need
> to have the lpss-pwm driver binding to PWM2 for backlight control;
> and this is now actually undesirable because this will cause both
> the WMI code and the lpss-pwm driver to poke at the same PWM
> controller.

Acked-by: Yauhen Kharuzhy <jekhor@gmail.com>

> 
> Revert commit ff6cdfd71495 ("ACPI / x86: Make PWM2 device always present
> at Lenovo Yoga Book"), removing the always-present quirk for the PWM2
> ACPI-device, so that the lpss-pwm controller will no longer bind to it.
> 
> Cc: Yauhen Kharuzhy <jekhor@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/acpi/x86/utils.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> index cb988f9b23a1..bfcb76888ca7 100644
> --- a/drivers/acpi/x86/utils.c
> +++ b/drivers/acpi/x86/utils.c
> @@ -54,10 +54,6 @@ static const struct always_present_id always_present_ids[] = {
>  	ENTRY("80860F09", "1", X86_MATCH(ATOM_SILVERMONT), {}),
>  	ENTRY("80862288", "1", X86_MATCH(ATOM_AIRMONT), {}),
>  
> -	/* Lenovo Yoga Book uses PWM2 for keyboard backlight control */
> -	ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
> -			DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
> -		}),
>  	/* The Xiaomi Mi Pad 2 uses PWM2 for touchkeys backlight control */
>  	ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
>  		DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
> -- 
> 2.31.1
> 

-- 
Yauhen Kharuzhy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / x86: Revert: Make PWM2 device always present at Lenovo Yoga Book
  2021-11-13 18:16 ` Yauhen Kharuzhy
@ 2021-11-16 19:25   ` Rafael J. Wysocki
  2021-11-18 18:54     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2021-11-16 19:25 UTC (permalink / raw)
  To: Yauhen Kharuzhy, Hans de Goede
  Cc: Rafael J . Wysocki, Len Brown, ACPI Devel Maling List

On Sat, Nov 13, 2021 at 7:17 PM Yauhen Kharuzhy <jekhor@gmail.com> wrote:
>
> On Sat, Nov 13, 2021 at 02:52:06PM +0100, Hans de Goede wrote:
> > It turns out that there is a WMI object which controls the PWM2 device
> > used for the keyboard backlight and that WMI object also provides some
> > other useful functionality.
> >
> > The upcoming lenovo-yogabook-wmi driver will offer both backlight
> > control and the other functionality, so there no longer is a need
> > to have the lpss-pwm driver binding to PWM2 for backlight control;
> > and this is now actually undesirable because this will cause both
> > the WMI code and the lpss-pwm driver to poke at the same PWM
> > controller.
>
> Acked-by: Yauhen Kharuzhy <jekhor@gmail.com>
>
> >
> > Revert commit ff6cdfd71495 ("ACPI / x86: Make PWM2 device always present
> > at Lenovo Yoga Book"), removing the always-present quirk for the PWM2
> > ACPI-device, so that the lpss-pwm controller will no longer bind to it.
> >
> > Cc: Yauhen Kharuzhy <jekhor@gmail.com>
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > ---
> >  drivers/acpi/x86/utils.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> > index cb988f9b23a1..bfcb76888ca7 100644
> > --- a/drivers/acpi/x86/utils.c
> > +++ b/drivers/acpi/x86/utils.c
> > @@ -54,10 +54,6 @@ static const struct always_present_id always_present_ids[] = {
> >       ENTRY("80860F09", "1", X86_MATCH(ATOM_SILVERMONT), {}),
> >       ENTRY("80862288", "1", X86_MATCH(ATOM_AIRMONT), {}),
> >
> > -     /* Lenovo Yoga Book uses PWM2 for keyboard backlight control */
> > -     ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
> > -                     DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
> > -             }),
> >       /* The Xiaomi Mi Pad 2 uses PWM2 for touchkeys backlight control */
> >       ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
> >               DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
> > --

Applied as 5.16-rc2 material, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / x86: Revert: Make PWM2 device always present at Lenovo Yoga Book
  2021-11-16 19:25   ` Rafael J. Wysocki
@ 2021-11-18 18:54     ` Rafael J. Wysocki
  2021-11-18 20:56       ` Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2021-11-18 18:54 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Yauhen Kharuzhy, Rafael J . Wysocki, Len Brown, ACPI Devel Maling List

On Tue, Nov 16, 2021 at 8:25 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Sat, Nov 13, 2021 at 7:17 PM Yauhen Kharuzhy <jekhor@gmail.com> wrote:
> >
> > On Sat, Nov 13, 2021 at 02:52:06PM +0100, Hans de Goede wrote:
> > > It turns out that there is a WMI object which controls the PWM2 device
> > > used for the keyboard backlight and that WMI object also provides some
> > > other useful functionality.
> > >
> > > The upcoming lenovo-yogabook-wmi driver will offer both backlight
> > > control and the other functionality, so there no longer is a need
> > > to have the lpss-pwm driver binding to PWM2 for backlight control;
> > > and this is now actually undesirable because this will cause both
> > > the WMI code and the lpss-pwm driver to poke at the same PWM
> > > controller.
> >
> > Acked-by: Yauhen Kharuzhy <jekhor@gmail.com>
> >
> > >
> > > Revert commit ff6cdfd71495 ("ACPI / x86: Make PWM2 device always present
> > > at Lenovo Yoga Book"), removing the always-present quirk for the PWM2
> > > ACPI-device, so that the lpss-pwm controller will no longer bind to it.
> > >
> > > Cc: Yauhen Kharuzhy <jekhor@gmail.com>
> > > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > > ---
> > >  drivers/acpi/x86/utils.c | 4 ----
> > >  1 file changed, 4 deletions(-)
> > >
> > > diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> > > index cb988f9b23a1..bfcb76888ca7 100644
> > > --- a/drivers/acpi/x86/utils.c
> > > +++ b/drivers/acpi/x86/utils.c
> > > @@ -54,10 +54,6 @@ static const struct always_present_id always_present_ids[] = {
> > >       ENTRY("80860F09", "1", X86_MATCH(ATOM_SILVERMONT), {}),
> > >       ENTRY("80862288", "1", X86_MATCH(ATOM_AIRMONT), {}),
> > >
> > > -     /* Lenovo Yoga Book uses PWM2 for keyboard backlight control */
> > > -     ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
> > > -                     DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
> > > -             }),
> > >       /* The Xiaomi Mi Pad 2 uses PWM2 for touchkeys backlight control */
> > >       ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
> > >               DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
> > > --
>
> Applied as 5.16-rc2 material, thanks!

I've decided to make this change in 5.17.

It would be good to put the patch under a different subject too,
because the way it is may confuse someone to regard it as a fix.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / x86: Revert: Make PWM2 device always present at Lenovo Yoga Book
  2021-11-18 18:54     ` Rafael J. Wysocki
@ 2021-11-18 20:56       ` Hans de Goede
  0 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2021-11-18 20:56 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Yauhen Kharuzhy, Rafael J . Wysocki, Len Brown, ACPI Devel Maling List

Hi,

On 11/18/21 19:54, Rafael J. Wysocki wrote:
> On Tue, Nov 16, 2021 at 8:25 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>>
>> On Sat, Nov 13, 2021 at 7:17 PM Yauhen Kharuzhy <jekhor@gmail.com> wrote:
>>>
>>> On Sat, Nov 13, 2021 at 02:52:06PM +0100, Hans de Goede wrote:
>>>> It turns out that there is a WMI object which controls the PWM2 device
>>>> used for the keyboard backlight and that WMI object also provides some
>>>> other useful functionality.
>>>>
>>>> The upcoming lenovo-yogabook-wmi driver will offer both backlight
>>>> control and the other functionality, so there no longer is a need
>>>> to have the lpss-pwm driver binding to PWM2 for backlight control;
>>>> and this is now actually undesirable because this will cause both
>>>> the WMI code and the lpss-pwm driver to poke at the same PWM
>>>> controller.
>>>
>>> Acked-by: Yauhen Kharuzhy <jekhor@gmail.com>
>>>
>>>>
>>>> Revert commit ff6cdfd71495 ("ACPI / x86: Make PWM2 device always present
>>>> at Lenovo Yoga Book"), removing the always-present quirk for the PWM2
>>>> ACPI-device, so that the lpss-pwm controller will no longer bind to it.
>>>>
>>>> Cc: Yauhen Kharuzhy <jekhor@gmail.com>
>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>> ---
>>>>  drivers/acpi/x86/utils.c | 4 ----
>>>>  1 file changed, 4 deletions(-)
>>>>
>>>> diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
>>>> index cb988f9b23a1..bfcb76888ca7 100644
>>>> --- a/drivers/acpi/x86/utils.c
>>>> +++ b/drivers/acpi/x86/utils.c
>>>> @@ -54,10 +54,6 @@ static const struct always_present_id always_present_ids[] = {
>>>>       ENTRY("80860F09", "1", X86_MATCH(ATOM_SILVERMONT), {}),
>>>>       ENTRY("80862288", "1", X86_MATCH(ATOM_AIRMONT), {}),
>>>>
>>>> -     /* Lenovo Yoga Book uses PWM2 for keyboard backlight control */
>>>> -     ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
>>>> -                     DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
>>>> -             }),
>>>>       /* The Xiaomi Mi Pad 2 uses PWM2 for touchkeys backlight control */
>>>>       ENTRY("80862289", "2", X86_MATCH(ATOM_AIRMONT), {
>>>>               DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
>>>> --
>>
>> Applied as 5.16-rc2 material, thanks!
> 
> I've decided to make this change in 5.17.

That is fine, the WMI driver won't land before then anyways.

> It would be good to put the patch under a different subject too,
> because the way it is may confuse someone to regard it as a fix.

Ack, I will send a v2 with a commit msg which makes it less likely
this gets picked into a stable series.

Note if it does end up in a stable series that is fine too, there
were plans to use the LPSS PWM driver to driver the kbd backlight
but those were never fulfilled so the ACPI PWM device getting
its default _STA return of 0 back on older kernels will not
matter.

Regards,

Hans


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-18 20:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13 13:52 [PATCH] ACPI / x86: Revert: Make PWM2 device always present at Lenovo Yoga Book Hans de Goede
2021-11-13 18:16 ` Yauhen Kharuzhy
2021-11-16 19:25   ` Rafael J. Wysocki
2021-11-18 18:54     ` Rafael J. Wysocki
2021-11-18 20:56       ` Hans de Goede

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.