<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/leds.h, branch v4.10.9</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.10.9</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.10.9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-11-22T11:07:05+00:00</updated>
<entry>
<title>led: core: Fix blink_brightness setting race</title>
<updated>2016-11-22T11:07:05+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-10-23T19:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb1610b4c273370f491c5e194e5a56e3470d81e8'/>
<id>urn:sha1:eb1610b4c273370f491c5e194e5a56e3470d81e8</id>
<content type='text'>
All 3 of led_timer_func, led_set_brightness and led_set_software_blink
set blink_brightness. If led_timer_func or led_set_software_blink race
with led_set_brightness they may end up overwriting the new
blink_brightness. The new atomic work_flags does not protect against
this as it just protects the flags and not blink_brightness.

This commit introduces a new new_blink_brightness value which gets
set by led_set_brightness and read by led_timer_func on LED on, fixing
this.

Dealing with the new brightness at LED on time, makes the new
brightness apply sooner, which also fixes a led_set_brightness which
happens while a oneshot blink which ends in LED on is running not
getting applied.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>led: core: Use atomic bit-field for the blink-flags</title>
<updated>2016-11-22T11:07:05+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-11-08T13:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9c6ce57ec2f136d08141e8220a0ffaca216f7b0'/>
<id>urn:sha1:a9c6ce57ec2f136d08141e8220a0ffaca216f7b0</id>
<content type='text'>
All the LED_BLINK* flags are accessed read-modify-write from e.g.
led_set_brightness and led_blink_set_oneshot while both
set_brightness_work and the blink_timer may be running.

If these race then the modify step done by one of them may be lost,
switch the LED_BLINK* flags to a new atomic work_flags bit-field
to avoid this race.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: gpio: introduce gpio_blink_set_t</title>
<updated>2016-09-15T14:49:39+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68620e594c250ba8c43a78e77f5296cb9952582e'/>
<id>urn:sha1:68620e594c250ba8c43a78e77f5296cb9952582e</id>
<content type='text'>
Introduce a typedef gpio_blink_set_t to improve readability of the code.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: Add no-op gpio_led_register_device when LED subsystem is disabled</title>
<updated>2016-06-27T06:58:42+00:00</updated>
<author>
<name>Andrew F. Davis</name>
<email>afd@ti.com</email>
</author>
<published>2016-06-21T12:40:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fca23e47dfdbcdacaae523f8b87d2240ce056ac1'/>
<id>urn:sha1:fca23e47dfdbcdacaae523f8b87d2240ce056ac1</id>
<content type='text'>
Some systems use 'gpio_led_register_device' to make an in-memory copy of
their LED device table so the original can be removed as .init.rodata.
When the LED subsystem is not enabled source in the led directory is not
built and so this function may be undefined. Fix this here.

Signed-off-by: Andrew F. Davis &lt;afd@ti.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: convert IDE trigger to common disk trigger</title>
<updated>2016-06-20T07:57:56+00:00</updated>
<author>
<name>Stephan Linz</name>
<email>linz@li-pro.net</email>
</author>
<published>2016-06-10T05:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb25cb9956cc9384b7fa0d75dec908c9fac8c444'/>
<id>urn:sha1:eb25cb9956cc9384b7fa0d75dec908c9fac8c444</id>
<content type='text'>
This patch converts the IDE specific LED trigger to a generic disk
activity LED trigger. The libata core is now a trigger source just
like before the IDE disk driver. It's merely a replacement of the
string ide by disk.

The patch is taken from http://dev.gentoo.org/~josejx/ata.patch and is
widely used by any ibook/powerbook owners with great satisfaction.
Likewise, it is very often used successfully on different ARM platforms.

Unlike the original patch, the existing 'ide-disk' trigger is still
available for backward compatibility. That reduce the amount of patches
in affected device trees out of the mainline kernel. For further
development, the new name 'disk-activity' should be used.

Cc: Joseph Jezak &lt;josejx@gentoo.org&gt;
Cc: Jörg Sommer &lt;joerg@alea.gnuu.de&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Stephan Linz &lt;linz@li-pro.net&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: core: Fix brightness setting upon hardware blinking enabled</title>
<updated>2016-06-08T09:47:06+00:00</updated>
<author>
<name>Tony Makkiel</name>
<email>tony.makkiel@daqri.com</email>
</author>
<published>2016-05-18T16:22:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cfe749fad5158247282f2fee30773fd454029ab'/>
<id>urn:sha1:7cfe749fad5158247282f2fee30773fd454029ab</id>
<content type='text'>
Commit 76931edd54f8 ("leds: fix brightness changing when software blinking
is active") changed the semantics of led_set_brightness() which according
to the documentation should disable blinking upon any brightness setting.
Moreover it made it different for soft blink case, where it was possible
to change blink brightness, and for hardware blink case, where setting
any brightness greater than 0 was ignored.

While the change itself is against the documentation claims, it was driven
also by the fact that timer trigger remained active after turning blinking
off. Fixing that would have required major refactoring in the led-core,
led-class, and led-triggers because of cyclic dependencies.

Finally, it has been decided that allowing for brightness change during
blinking is beneficial as it can be accomplished without disturbing
blink rhythm.

The change in brightness setting semantics will not affect existing
LED class drivers that implement blink_set op thanks to the LED_BLINK_SW
flag introduced by this patch. The flag state will be from now on checked
in led_set_brightness() which will allow to distinguish between software
and hardware blink mode. In the latter case the control will be passed
directly to the drivers which apply their semantics on brightness set,
which is disable the blinking in case of most such drivers. New drivers
will apply new semantics and just change the brightness while hardware
blinking is on, if possible.

The issue was smuggled by subsequent LED core improvements, which modified
the code that originally introduced the problem.

Fixes: f1e80c07416a ("leds: core: Add two new LED_BLINK_ flags")
Signed-off-by: Tony Makkiel &lt;tony.makkiel@daqri.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: gpio: Support the "panic-indicator" firmware property</title>
<updated>2016-05-06T08:26:07+00:00</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel@vanguardiasur.com.ar</email>
</author>
<published>2016-04-28T22:03:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80d6737b27bbdf645a815c136606836b435f0268'/>
<id>urn:sha1:80d6737b27bbdf645a815c136606836b435f0268</id>
<content type='text'>
Calling a GPIO LEDs is quite likely to work even if the kernel
has paniced, so they are ideal to blink in this situation.
This commit adds support for the new "panic-indicator"
firmware property, allowing to mark a given LED to blink on
a kernel panic.

Signed-off-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Reviewed-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: triggers: Allow to switch the trigger to "panic" on a kernel panic</title>
<updated>2016-05-06T08:22:09+00:00</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel@vanguardiasur.com.ar</email>
</author>
<published>2016-04-28T22:03:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba93cdce5bbe6929fd7486f87c985598ded8f451'/>
<id>urn:sha1:ba93cdce5bbe6929fd7486f87c985598ded8f451</id>
<content type='text'>
This commit adds a new led_cdev flag LED_PANIC_INDICATOR, which
allows to mark a specific LED to be switched to the "panic"
trigger, on a kernel panic.

This is useful to allow the user to assign a regular trigger
to a given LED, and still blink that LED on a kernel panic.

Signed-off-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Reviewed-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: trigger: Introduce a MTD (NAND/NOR) trigger</title>
<updated>2016-04-13T08:23:14+00:00</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel@vanguardiasur.com.ar</email>
</author>
<published>2016-04-12T20:46:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4b721174c7976f26300e39aa42714fb5a54bebb5'/>
<id>urn:sha1:4b721174c7976f26300e39aa42714fb5a54bebb5</id>
<content type='text'>
This commit introduces a MTD trigger for flash (NAND/NOR) device
activity. The implementation is copied from IDE disk.

This trigger deprecates the "nand-disk" LED trigger, but for backwards
compatibility, we still keep the "nand-disk" trigger around.

The motivation for deprecating the "nand-disk" LED trigger is that
it only works for NAND drivers, whereas the "mtd" LED trigger
is more generic (in fact, "nand-disk" currently only works for
certain NAND drivers).

Signed-off-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>leds: core: avoid error message when a USB LED device is unplugged</title>
<updated>2016-03-14T08:22:20+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-01-22T20:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d84d80f38f0ff4eb4becf1a3569c8e7b2c463b61'/>
<id>urn:sha1:d84d80f38f0ff4eb4becf1a3569c8e7b2c463b61</id>
<content type='text'>
When a USB LED device is unplugged the remove call chain calls
led_classdev_unregister which tries to switch the LED off.
As the device has been removed already this results in a ENODEV
error message in dmesg.
Avoid this error message by ignoring ENODEV in calls from
led_classdev_unregister if the LED device is flagged as pluggable.

Therefore a new flag LED_HW_PLUGGABLE was introduced which should be set by
all LED drivers handling pluggable LED devices (mainly USB LED devices).

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
</entry>
</feed>
