linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Kevin Locke <kevin@kevinlocke.name>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
	platform-driver-x86@vger.kernel.org,
	ibm-acpi-devel@lists.sourceforge.net,
	Richard Purdie <rpurdie@rpsys.net>,
	Darren Hart <dvhart@infradead.org>,
	Jacek Anaszewski <j.anaszewski@samsung.com>,
	linux-leds@vger.kernel.org
Subject: Re: [ibm-acpi-devel] [PATCH v4 2/4] platform: x86: thinkpad: Call led_notify_brightness_change on kbd brightness change
Date: Sat, 12 Nov 2016 12:52:43 +0100	[thread overview]
Message-ID: <201611121252.44443@pali> (raw)
In-Reply-To: <20161111184051.xemayi634xqhkp4c@kevinolos>

[-- Attachment #1: Type: Text/Plain, Size: 2399 bytes --]

On Friday 11 November 2016 19:40:51 Kevin Locke wrote:
> On Fri, 2016-11-11 at 15:33 +0100, Hans de Goede wrote:
> > On 11-11-16 15:12, Pali Rohár wrote:
> >> My question remains. Is this for Thinklight or keyboard backlight?
> >> Because Thinklinght has led device "tpacpi_led_thinklight" and
> >> keyboard backlight has led device "tpacpi_led_kbdlight".
> > 
> > I would say both, this matches with the pre-existing
> > TP_ACPI_HKEY_THNKLGHT_MASK (they have a 1:1 mapping),
> > keep in mind that there are no thinkpads with both
> > a thinklight and a backlit keyboard, as those both
> > serve the same purpose so it looks like the re-used
> > the scancode.
> 
> That's not entirely correct.  The ThinkPad T430 has both a ThinkLight
> and a keyboard backlight.  Pressing Fn-Space toggles between 4
> states:
> 
> Both Off -> Backlight Low -> Backlight High -> ThinkLight On (BL Off)
> 
> I tested out your patch and observed the following behavior (printing
> brightness initially and on POLLPRI):
> 
> # Initial state with both lights off.
> tpacpi::kbd_backlight/brightness: 0
> tpacpi::thinklight/brightness: 0
> # Press Fn-Space.  KBD Backlight comes on low.
> tpacpi::kbd_backlight/brightness: 1
> # Press Fn-Space.  KBD Backlight brightens to high.
> tpacpi::kbd_backlight/brightness: 2
> # Press Fn-Space.  KBD Backlight turns off.  ThinkLight turns on.
> tpacpi::kbd_backlight/brightness: 0
> # Press Fn-Space.  ThinkLight turns off.
> tpacpi::kbd_backlight/brightness: 0
> 
> It works, but the behavior is not quite what I would hope for.  There
> are no poll events for tpacpi::thinklight/brightness

Yes, this is what I already pointed... That we should send event also 
for tpacpi::thinklight.

> and when the
> ThinkLight turns off it triggers an unnecessary
> tpacpi::kbd_backlight/brightness poll event.

It is problem? Or are forced to send event only if brightness level is 
really changed? I think that bigger problem is when brightness changes, 
but we do not send event.

Should not be event treated as "hey, brightness level was probably 
changed, read file to get current status"?

> If there is anything else I can do to assist, let me know.

Great, this is really useful to see somebody who can test patches on 
those machines with both Thinklight and keyboard backlight...

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2016-11-12 11:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161101133800eucas1p19df1b7f85ad751fcf98e60277b207296@eucas1p1.samsung.com>
2016-11-01 13:37 ` [PATCH v4 1/4] leds: core: Add support for poll()ing the sysfs brightness attr for changes Hans de Goede
2016-11-01 13:37   ` [PATCH v4 2/4] platform: x86: thinkpad: Call led_notify_brightness_change on kbd brightness change Hans de Goede
2016-11-11 14:12     ` Pali Rohár
2016-11-11 14:33       ` Hans de Goede
2016-11-11 14:46         ` Pali Rohár
     [not found]         ` <f90bd318-9f3f-62e4-be49-e03cae4eac14-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-11 18:40           ` Kevin Locke
2016-11-12 11:52             ` Pali Rohár [this message]
2016-11-12 12:07               ` [ibm-acpi-devel] " Hans de Goede
2016-11-01 13:37   ` [PATCH v4 3/4] platform: x86: dell-*: Add a generic dell-laptop notifier chain Hans de Goede
2016-11-11 14:17     ` Pali Rohár
2016-11-11 14:36       ` Hans de Goede
2016-11-01 13:37   ` [PATCH v4 4/4] platform: x86: dell-*: Call led_notify_brightness_change on kbd brightness change Hans de Goede
2016-11-08 11:52   ` [PATCH v4 1/4] leds: core: Add support for poll()ing the sysfs brightness attr for changes Jacek Anaszewski
     [not found]     ` <5021470c-705b-6920-708e-dd5fca13951f-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-08 12:31       ` Hans de Goede
2016-11-08 13:08         ` Jacek Anaszewski
2016-11-08 13:16           ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201611121252.44443@pali \
    --to=pali.rohar@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=hdegoede@redhat.com \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=j.anaszewski@samsung.com \
    --cc=kevin@kevinlocke.name \
    --cc=linux-leds@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).