<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/leds/trigger/ledtrig-timer.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-06-26T15:56:07+00:00</updated>
<entry>
<title>leds: triggers: Flush pending brightness before activating trigger</title>
<updated>2024-06-26T15:56:07+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-06-13T15:24:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab477b766edd3bfb6321a6e3df4c790612613fae'/>
<id>urn:sha1:ab477b766edd3bfb6321a6e3df4c790612613fae</id>
<content type='text'>
The race fixed in timer_trig_activate() between a blocking
set_brightness() call and trigger-&gt;activate() can affect any trigger.
So move the call to flush_work() into led_trigger_set() where it can
avoid the race for all triggers.

Fixes: 0db37915d912 ("leds: avoid races with workqueue")
Fixes: 8c0f693c6eff ("leds: avoid flush_work in atomic context")
Cc: stable@vger.kernel.org
Tested-by: Dustin L. Howett &lt;dustin@howett.net&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://lore.kernel.org/r/20240613-led-trigger-flush-v2-1-f4f970799d77@weissschuh.net
Signed-off-by: Lee Jones &lt;lee@kernel.org&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>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500</title>
<updated>2019-06-19T15:09:55+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-04T08:11:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2912cb15bdda8ba4a5dd73396ad62641af2f520'/>
<id>urn:sha1:d2912cb15bdda8ba4a5dd73396ad62641af2f520</id>
<content type='text'>
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>leds: avoid flush_work in atomic context</title>
<updated>2019-05-31T20:29:14+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2019-05-26T07:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c0f693c6effbc3f42f77a9e81209af9af20910c'/>
<id>urn:sha1:8c0f693c6effbc3f42f77a9e81209af9af20910c</id>
<content type='text'>
It turns out that various triggers use led_blink_setup() from atomic
context, so we can't do a flush_work there. Flush is still needed for
slow LEDs, but we can move it to sysfs code where it is safe.

    WARNING: inconsistent lock state
    5.2.0-rc1 #1 Tainted: G        W
    --------------------------------
    inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
    swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
    000000006e30541b
    ((work_completion)(&amp;led_cdev-&gt;set_brightness_work)){+.?.}, at:
    +__flush_work+0x3b/0x38a
    {SOFTIRQ-ON-W} state was registered at:
      lock_acquire+0x146/0x1a1
     __flush_work+0x5b/0x38a
     flush_work+0xb/0xd
     led_blink_setup+0x1e/0xd3
     led_blink_set+0x3f/0x44
     tpt_trig_timer+0xdb/0x106
     ieee80211_mod_tpt_led_trig+0xed/0x112

Fixes: 0db37915d912 ("leds: avoid races with workqueue")
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Tested-by: Hugh Dickins &lt;hughd@google.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: trigger: timer: Add initialization from Device Tree</title>
<updated>2019-01-16T21:09:25+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2019-01-09T14:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f85e8498a482cbfdab91fb2d1b81c6c8c1cfd15'/>
<id>urn:sha1:0f85e8498a482cbfdab91fb2d1b81c6c8c1cfd15</id>
<content type='text'>
Allow initialization of delays used in timer trigger from Device
Tree property.

This is especially useful for embedded systems where the trigger might
be used early, before bringing up user-space.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: timer trigger: simplifications from core changes</title>
<updated>2018-07-05T21:21:12+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b7b6d44e29160eb12abd950c374babf21ed83d4'/>
<id>urn:sha1:2b7b6d44e29160eb12abd950c374babf21ed83d4</id>
<content type='text'>
The trigger core learned error handling for the activate callback and
can handle device attributes now. This allows simplifying the driver
considerably. Note that .deactivate() is only called when .activate()
succeeded, so the check for .trigger_data being non-NULL can go away.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: triggers: let struct led_trigger::activate() return an error code</title>
<updated>2018-07-05T21:21:10+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2282e125a406e09331c5a785e3df29035c99a607'/>
<id>urn:sha1:2282e125a406e09331c5a785e3df29035c99a607</id>
<content type='text'>
Given that activating a trigger can fail, let the callback return an
indication. This prevents to have a trigger active according to the
"trigger" sysfs attribute but not functional.

All users are changed accordingly to return 0 for now. There is no intended
change in behaviour.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: triggers: make the MODULE_LICENSE string match the actual license</title>
<updated>2018-07-05T20:59:36+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=033692eb3ec8305f6e9998b297aaec6899680637'/>
<id>urn:sha1:033692eb3ec8305f6e9998b297aaec6899680637</id>
<content type='text'>
These files are licensed under GPL version 2 only. So use "GPL v2"
instead of "GPL" (which means v2 or later).

Also remove an empty (but commented) line at the end of the license
header which nicely proves in the context that the drivers are really v2
only :-)

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: move LED trigger drivers into new subdirectory</title>
<updated>2013-04-01T18:04:48+00:00</updated>
<author>
<name>Kim, Milo</name>
<email>Milo.Kim@ti.com</email>
</author>
<published>2013-02-20T08:36:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f07fb52107c881f35eaff09fe990a4dfd0f7e62a'/>
<id>urn:sha1:f07fb52107c881f35eaff09fe990a4dfd0f7e62a</id>
<content type='text'>
For better driver management, new subdirectory, 'trigger' is created.
All LED trigger drivers are moved into this directory.

Internal header, 'leds.h' is included in each LED trigger drivers.
Fix the location of header file, "leds.h" -&gt; "../leds.h" in driver files.
One exception is here, 'ledtrig-timer.c'.
There is no need to include 'leds.h'. so '#include "leds.h"' line was removed.

Signed-off-by: Milo(Woogyom) Kim &lt;milo.kim@ti.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
</entry>
</feed>
