<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/leds/trigger, branch v5.10.78</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.78</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.78'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-09-15T07:50:36+00:00</updated>
<entry>
<title>leds: trigger: audio: Add an activate callback to ensure the initial brightness is set</title>
<updated>2021-09-15T07:50:36+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-02-21T11:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7dd8b778a4dc5bd3637a1364918f22ffd6ff7cf'/>
<id>urn:sha1:a7dd8b778a4dc5bd3637a1364918f22ffd6ff7cf</id>
<content type='text'>
[ Upstream commit 64f67b5240db79eceb0bd57dae8e591fd3103ba0 ]

Some 2-in-1s with a detachable (USB) keyboard(dock) have mute-LEDs in
the speaker- and/or mic-mute keys on the keyboard.

Examples of this are the Lenovo Thinkpad10 tablet (with its USB kbd-dock)
and the HP x2 10 series.

The detachable nature of these keyboards means that the keyboard and
thus the mute LEDs may show up after the user (or userspace restoring
old mixer settings) has muted the speaker and/or mic.

Current LED-class devices with a default_trigger of "audio-mute" or
"audio-micmute" initialize the brightness member of led_classdev with
ledtrig_audio_get() before registering the LED.

This makes the software state after attaching the keyboard match the
actual audio mute state, e.g. cat /sys/class/leds/foo/brightness will
show the right value.

But before this commit nothing was actually calling the led_classdev's
brightness_set[_blocking] callback so the value returned by
ledtrig_audio_get() was never actually being sent to the hw, leading
to the mute LEDs staying in their default power-on state, after
attaching the keyboard, even if ledtrig_audio_get() returned a different
state.

This could be fixed by having the individual LED drivers call
brightness_set[_blocking] themselves after registering the LED,
but this really is something which should be done by a led-trigger
activate callback.

Add an activate callback for this, fixing the issue of the
mute LEDs being out of sync after (re)attaching the keyboard.

Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Fixes: faa2541f5b1a ("leds: trigger: Introduce audio mute LED trigger")
Reviewed-by: Marek Behún &lt;kabel@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ledtrig-cpu: Limit to 8 CPUs</title>
<updated>2020-09-30T17:15:40+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2020-09-19T09:34:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abcc131292aa8c7de2c5f0ed76a717436c21de63'/>
<id>urn:sha1:abcc131292aa8c7de2c5f0ed76a717436c21de63</id>
<content type='text'>
Some machines have thousands of CPUs... and trigger mechanisms was not
really meant for thousands of triggers. I doubt anyone uses this
trigger on many-CPU machine; but if they do, they'll need to do it
properly.

Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: pattern trigger -- check pattern for validity</title>
<updated>2020-07-24T10:43:57+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2020-07-24T10:43:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=feff72735b316e268da4ccc04091977e8f89a721'/>
<id>urn:sha1:feff72735b316e268da4ccc04091977e8f89a721</id>
<content type='text'>
Don't allow invalid brightness in the pattern.

Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: trigger: gpio: Avoid warning on update of inverted</title>
<updated>2020-07-12T08:06:38+00:00</updated>
<author>
<name>Jan Kiszka</name>
<email>jan.kiszka@siemens.com</email>
</author>
<published>2020-06-13T07:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ad79c20b6d28467db643ac107bbdaa01aa93a23'/>
<id>urn:sha1:5ad79c20b6d28467db643ac107bbdaa01aa93a23</id>
<content type='text'>
If the GPIO has not been configured yet, writing to inverted will raise
a kernel warning.

Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: trigger: remove redundant assignment to variable ret</title>
<updated>2020-04-27T12:13:12+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-04-20T22:12:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c85c7cdef3c906d316bf04c0e452d45cf9452c67'/>
<id>urn:sha1:c85c7cdef3c906d316bf04c0e452d45cf9452c67</id>
<content type='text'>
The variable ret is being assigned with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>ledtrig-pattern: fix email address quoting in MODULE_AUTHOR()</title>
<updated>2020-01-22T20:07:52+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2019-03-10T18:54:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30d57d55abd7cc2c08ba032f1dc3079b1b42b9dc'/>
<id>urn:sha1:30d57d55abd7cc2c08ba032f1dc3079b1b42b9dc</id>
<content type='text'>
Apparently it is quite easy to forget "&gt;" in quoting of email
address. This fixes it.

Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>Merge tag 'leds-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds</title>
<updated>2019-12-02T00:09:28+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-12-02T00:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=304220b56e8c6a99b71832427802221be472247a'/>
<id>urn:sha1:304220b56e8c6a99b71832427802221be472247a</id>
<content type='text'>
Pull LED updates from Pavel Machek:
 "This contains usual small updates to drivers, and removal of PAGE_SIZE
  limits on /sys/class/leds/&lt;led&gt;/trigger.

  We should not be really having that many triggers; but with cpu
  activity triggers we do, and we'll eventually need to fix it, but...
  remove the limit for now"

* tag 'leds-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (26 commits)
  leds: trigger: netdev: fix handling on interface rename
  leds: an30259a: add a check for devm_regmap_init_i2c
  leds: mlxreg: Fix possible buffer overflow
  leds: pca953x: Use of_device_get_match_data()
  leds: core: Fix leds.h structure documentation
  leds: core: Fix devm_classdev_match to reference correct structure
  leds: core: Remove extern from header
  leds: lm3601x: Convert class registration to device managed
  leds: flash: Add devm_* functions to the flash class
  leds: flash: Remove extern from the header file
  leds: flash: Convert non extended registration to inline
  leds: Kconfig: Be consistent with the usage of "LED"
  leds: remove PAGE_SIZE limit of /sys/class/leds/&lt;led&gt;/trigger
  leds: tlc591xx: update the maximum brightness
  leds: lm3692x: Use flags from LM3692X_BRT_CTRL
  leds: lm3692x: Use flags from LM3692X_BOOST_CTRL
  leds: lm3692x: Handle failure to probe the regulator
  leds: lm3692x: Don't overwrite return value in error path
  leds: lm3692x: Print error value on dev_err
  leds: tlc591xx: use devm_led_classdev_register_ext()
  ...
</content>
</entry>
<entry>
<title>leds: Use all-in-one vtime aware kcpustat accessor</title>
<updated>2019-11-21T06:58:48+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>frederic@kernel.org</email>
</author>
<published>2019-11-21T02:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8688f2fb671b2ed59b1b16083136b6edc3750435'/>
<id>urn:sha1:8688f2fb671b2ed59b1b16083136b6edc3750435</id>
<content type='text'>
We can now safely read user kcpustat fields on nohz_full CPUs.
Use the appropriate accessor.

[ mingo: Fixed build failure. ]

Reported-by: Yauheni Kaliuta &lt;yauheni.kaliuta@redhat.com&gt;
Signed-off-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Cc: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt; (maintainer:LED SUBSYSTEM)
Cc: Pavel Machek &lt;pavel@ucw.cz&gt; (maintainer:LED SUBSYSTEM)
Cc: Dan Murphy &lt;dmurphy@ti.com&gt; (reviewer:LED SUBSYSTEM)
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Wanpeng Li &lt;wanpengli@tencent.com&gt;
Link: https://lkml.kernel.org/r/20191121024430.19938-6-frederic@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: trigger: netdev: fix handling on interface rename</title>
<updated>2019-11-03T17:10:12+00:00</updated>
<author>
<name>Martin Schiller</name>
<email>ms@dev.tdt.de</email>
</author>
<published>2019-10-25T07:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f820ed52371b4f5d8c43c93f03408d0dbc01e5b'/>
<id>urn:sha1:5f820ed52371b4f5d8c43c93f03408d0dbc01e5b</id>
<content type='text'>
The NETDEV_CHANGENAME code is not "unneeded" like it is stated in commit
4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface
rename").

The event was accidentally misinterpreted equivalent to
NETDEV_UNREGISTER, but should be equivalent to NETDEV_REGISTER.

This was the case in the original code from the openwrt project.

Otherwise, you are unable to set netdev led triggers for (non-existent)
netdevices, which has to be renamed. This is the case, for example, for
ppp interfaces in openwrt.

Fixes: 06f502f57d0d ("leds: trigger: Introduce a NETDEV trigger")
Fixes: 4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface rename")
Signed-off-by: Martin Schiller &lt;ms@dev.tdt.de&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: Use vtime aware kcpustat accessor to fetch CPUTIME_SYSTEM</title>
<updated>2019-10-29T09:01:19+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>frederic@kernel.org</email>
</author>
<published>2019-10-16T02:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e79b3ddad6790aabead5fb775456a5b0599e97ee'/>
<id>urn:sha1:e79b3ddad6790aabead5fb775456a5b0599e97ee</id>
<content type='text'>
Now that we have a vtime safe kcpustat accessor for CPUTIME_SYSTEM, use
it to start fixing frozen kcpustat values on nohz_full CPUs.

Reported-by: Yauheni Kaliuta &lt;yauheni.kaliuta@redhat.com&gt;
Signed-off-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Rafael J . Wysocki &lt;rjw@rjwysocki.net&gt;
Cc: Rik van Riel &lt;riel@surriel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Cc: Wanpeng Li &lt;wanpengli@tencent.com&gt;
Link: https://lkml.kernel.org/r/20191016025700.31277-15-frederic@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
