Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576212 > unrolled thread

Re: [ibm-acpi-devel] [PATCH 1/1] thinkpad_acpi: Add support for status (external cover) LED

Started byHenrique de Moraes Holschuh <hmh@hmh.eng.br>
First post2017-02-08 02:30 +0100
Last post2017-02-12 19:30 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [ibm-acpi-devel] [PATCH 1/1] thinkpad_acpi: Add support for  status (external cover) LED Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2017-02-08 02:30 +0100
    Re: [ibm-acpi-devel] [PATCH 1/1] thinkpad_acpi: Add support for  status (external cover) LED Adam Goode <agoode@google.com> - 2017-02-12 19:30 +0100
    Re: [ibm-acpi-devel] [PATCH 1/1] thinkpad_acpi: Add support for  status (external cover) LED Sebastian Reichel <sre@kernel.org> - 2017-02-12 19:30 +0100

#1576212 — Re: [ibm-acpi-devel] [PATCH 1/1] thinkpad_acpi: Add support for status (external cover) LED

FromHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Date2017-02-08 02:30 +0100
SubjectRe: [ibm-acpi-devel] [PATCH 1/1] thinkpad_acpi: Add support for status (external cover) LED
Message-ID<t8pf4-22v-21@gated-at.bofh.it>
Hello Adam,

I apologise for the delay on answering you.

On Tue, 31 Jan 2017, Adam Goode wrote:
> On Thu, Jan 19, 2017 at 12:21 PM, Adam Goode <agoode@google.com> wrote:
> > This allows the control of the red status LED, which is the dot of the "i"
> > in the word "ThinkPad" on the outside cover of newer models.
> >
> > In the manual, both this LED and the power LED are referred to as
> > the "system-status indicators" without distinction between the two, so
> > I chose "status" as the LED name.

I seem to recall this LED had an ACPI interface that was specific for
it, and allowed it to on/off/sine-wave?

> > Signed-off-by: Adam Goode <agoode@google.com>
> >
> > diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/
> > thinkpad_acpi.c
> > index cacb43fb1df7..6577bf8e5635 100644
> > --- a/drivers/platform/x86/thinkpad_acpi.c
> > +++ b/drivers/platform/x86/thinkpad_acpi.c
> > @@ -5611,11 +5611,11 @@ static const char * const
> > tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
> >         "tpacpi::standby",
> >         "tpacpi::dock_status1",
> >         "tpacpi::dock_status2",
> > -       "tpacpi::unknown_led2",
> > +       "tpacpi::status",
> >         "tpacpi::unknown_led3",
> >         "tpacpi::thinkvantage",
> >  };
> > -#define TPACPI_SAFE_LEDS       0x1081U
> > +#define TPACPI_SAFE_LEDS       0x1481U

What happens on older Lenovo models (x00, x10, x20 series?)?  I think
the T410 already had it...

Also, please add code to not export it to userspace (as a led class) on
IBM.

-- 
  Henrique Holschuh

[toc] | [next] | [standalone]


#1579256

FromAdam Goode <agoode@google.com>
Date2017-02-12 19:30 +0100
Message-ID<ta74l-1en-3@gated-at.bofh.it>
In reply to#1576212
On Sun, Feb 12, 2017 at 1:22 PM, Sebastian Reichel <sre@kernel.org> wrote:
> Hi,
>
> On Tue, Feb 07, 2017 at 11:01:32PM -0200, Henrique de Moraes Holschuh wrote:
>> Hello Adam,
>>
>> I apologise for the delay on answering you.
>>
>> On Tue, 31 Jan 2017, Adam Goode wrote:
>> > On Thu, Jan 19, 2017 at 12:21 PM, Adam Goode <agoode@google.com> wrote:
>> > > This allows the control of the red status LED, which is the dot of the "i"
>> > > in the word "ThinkPad" on the outside cover of newer models.
>> > >
>> > > In the manual, both this LED and the power LED are referred to as
>> > > the "system-status indicators" without distinction between the two, so
>> > > I chose "status" as the LED name.
>>
>> I seem to recall this LED had an ACPI interface that was specific for
>> it, and allowed it to on/off/sine-wave?
>
> I don't know what the ACPI interface looks like, but the lid status
> led goes into sine-wave mode during suspend. Note, that the power-led
> also goes into sine-wave mode during suspend and is already supported
> by thinkpad-acpi's LED code (without the sine-wave feature as far
> as I can tell).
>
>> > > Signed-off-by: Adam Goode <agoode@google.com>
>> > >
>> > > diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/
>> > > thinkpad_acpi.c
>> > > index cacb43fb1df7..6577bf8e5635 100644
>> > > --- a/drivers/platform/x86/thinkpad_acpi.c
>> > > +++ b/drivers/platform/x86/thinkpad_acpi.c
>> > > @@ -5611,11 +5611,11 @@ static const char * const
>> > > tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
>> > >         "tpacpi::standby",
>> > >         "tpacpi::dock_status1",
>> > >         "tpacpi::dock_status2",
>> > > -       "tpacpi::unknown_led2",
>> > > +       "tpacpi::status",
>
> "status" looks a bit generic. I suggest "external_lid_status".
>
>> > >         "tpacpi::unknown_led3",
>> > >         "tpacpi::thinkvantage",
>> > >  };
>> > > -#define TPACPI_SAFE_LEDS       0x1081U
>> > > +#define TPACPI_SAFE_LEDS       0x1481U
>>
>> What happens on older Lenovo models (x00, x10, x20 series?)?  I think
>> the T410 already had it...
>>
>> Also, please add code to not export it to userspace (as a led class) on
>> IBM.
>
> Adam, can you prepare an updated patch? I would like to use this
> led to notify myself about events (i.e. compilation finished)
> while my thinkpad's lid is closed.
>

Yes, I will definitely prepare a new patch at some point. The only
hardware I have to test this on is an old IBM X40 and the Lenovo X260.
(I have a T410 with a busted screen that I could try it on maybe.) But
not much else.

I don't know if I can get to this in the next few weeks, since I am
travelling. If someone would like to clean up the patch and move
forward without me, no problem. Otherwise I will get to it eventually.


Thanks,

Adam


> -- Sebastian

[toc] | [prev] | [next] | [standalone]


#1579257

FromSebastian Reichel <sre@kernel.org>
Date2017-02-12 19:30 +0100
Message-ID<ta74l-1en-5@gated-at.bofh.it>
In reply to#1576212

[Multipart message — attachments visible in raw view] — view raw

Hi,

On Tue, Feb 07, 2017 at 11:01:32PM -0200, Henrique de Moraes Holschuh wrote:
> Hello Adam,
> 
> I apologise for the delay on answering you.
> 
> On Tue, 31 Jan 2017, Adam Goode wrote:
> > On Thu, Jan 19, 2017 at 12:21 PM, Adam Goode <agoode@google.com> wrote:
> > > This allows the control of the red status LED, which is the dot of the "i"
> > > in the word "ThinkPad" on the outside cover of newer models.
> > >
> > > In the manual, both this LED and the power LED are referred to as
> > > the "system-status indicators" without distinction between the two, so
> > > I chose "status" as the LED name.
> 
> I seem to recall this LED had an ACPI interface that was specific for
> it, and allowed it to on/off/sine-wave?

I don't know what the ACPI interface looks like, but the lid status
led goes into sine-wave mode during suspend. Note, that the power-led
also goes into sine-wave mode during suspend and is already supported
by thinkpad-acpi's LED code (without the sine-wave feature as far
as I can tell).

> > > Signed-off-by: Adam Goode <agoode@google.com>
> > >
> > > diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/
> > > thinkpad_acpi.c
> > > index cacb43fb1df7..6577bf8e5635 100644
> > > --- a/drivers/platform/x86/thinkpad_acpi.c
> > > +++ b/drivers/platform/x86/thinkpad_acpi.c
> > > @@ -5611,11 +5611,11 @@ static const char * const
> > > tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
> > >         "tpacpi::standby",
> > >         "tpacpi::dock_status1",
> > >         "tpacpi::dock_status2",
> > > -       "tpacpi::unknown_led2",
> > > +       "tpacpi::status",

"status" looks a bit generic. I suggest "external_lid_status".

> > >         "tpacpi::unknown_led3",
> > >         "tpacpi::thinkvantage",
> > >  };
> > > -#define TPACPI_SAFE_LEDS       0x1081U
> > > +#define TPACPI_SAFE_LEDS       0x1481U
> 
> What happens on older Lenovo models (x00, x10, x20 series?)?  I think
> the T410 already had it...
> 
> Also, please add code to not export it to userspace (as a led class) on
> IBM.

Adam, can you prepare an updated patch? I would like to use this
led to notify myself about events (i.e. compilation finished)
while my thinkpad's lid is closed.

-- Sebastian

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web