<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/leds.h, branch v4.18.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.18.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.18.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-03-11T19:01:55Z</updated>
<entry>
<title>leds: Extends disk trigger for reads and writes</title>
<updated>2018-03-11T19:01:55Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-02-24T22:45:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d1ed7c558612630ce4c48e440a6fdd8d4785f6a3'/>
<id>urn:sha1:d1ed7c558612630ce4c48e440a6fdd8d4785f6a3</id>
<content type='text'>
This adds two new disk triggers for triggering on reads
and writes respectively, named "disk-read" and "disk-write".

The use case comes from working on the D-Link DNS-313 NAS
box. This features an RGB LED for disk activity. with
these two triggers I can couple the green LED to read
activity and the red LED to write activity, which gives
the appropriate user feedback about what is happening
on the disk. When tested it gave exactly the feedback
desired.

The in-kernel interface is simply changed to pass a bool
indicating if the activity is write activity and update
each trigger (and the composite "disk-activity" trigger)
depending on what is passed in.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: Replace flags bit shift with BIT() macros</title>
<updated>2017-10-06T19:31:03Z</updated>
<author>
<name>David Lin</name>
<email>dtwlin@google.com</email>
</author>
<published>2017-09-13T17:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=55edd1dad96b760c87f5b9e2c461ba551a625f44'/>
<id>urn:sha1:55edd1dad96b760c87f5b9e2c461ba551a625f44</id>
<content type='text'>
This is for readability as well as to avoid checkpatch warnings when
adding new bit flag information in the future.

Signed-off-by: David Lin &lt;dtwlin@google.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: gpio: Allow LED to retain state at shutdown</title>
<updated>2017-08-29T19:10:40Z</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2017-08-28T00:17:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f5808ac158f2b16b686a3d3c0879c5d6048aba14'/>
<id>urn:sha1:f5808ac158f2b16b686a3d3c0879c5d6048aba14</id>
<content type='text'>
In some systems, such as Baseboard Management Controllers (BMCs), we
want to retain the state of LEDs across a reboot of the BMC (whilst the
host remains up). Implement support for the retain-state-shutdown
devicetree property in leds-gpio.

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Tested-by: Brandon Wyman &lt;bjwyman@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: core: add OF variants of LED registering functions</title>
<updated>2017-03-08T20:10:01Z</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2017-03-06T05:19:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=442c609830e98919faa78b797e9b89c53bab9cbf'/>
<id>urn:sha1:442c609830e98919faa78b797e9b89c53bab9cbf</id>
<content type='text'>
These new functions allow passing an additional device_node argument
that will be internally set for created LED device. Thanks to this LED
core code and triggers will be able to access DT node for reading extra
info.

The easiest solution for achieving this was reworking old functions to
more generic ones &amp; adding simple defines for API compatibility.

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&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: class: Add new optional brightness_hw_changed attribute</title>
<updated>2017-01-29T18:59:42Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2017-01-29T13:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0cb8eb30d425d2d2ae28ab630596c44a158784c4'/>
<id>urn:sha1:0cb8eb30d425d2d2ae28ab630596c44a158784c4</id>
<content type='text'>
Some LEDs may have their brightness level changed autonomously
(outside of kernel control) by hardware / firmware. This commit
adds support for an optional brightness_hw_changed attribute to
signal such changes to userspace (if a driver can detect them):

What:		/sys/class/leds/&lt;led&gt;/brightness_hw_changed
Date:		January 2017
KernelVersion:	4.11
Description:
		Last hardware set brightness level for this LED. Some LEDs
		may be changed autonomously by hardware/firmware. Only LEDs
		where this happens and the driver can detect this, will
		have this file.

		This file supports poll() to detect when the hardware
		changes the brightness.

		Reading this file will return the last brightness level set
		by the hardware, this may be different from the current
		brightness.

Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to
their flags field and call led_classdev_notify_brightness_hw_changed()
with the hardware set brightness when they detect a hardware / firmware
triggered brightness change.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&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: add LED_ON brightness as boolean value</title>
<updated>2017-01-05T22:01:05Z</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@samsung.com</email>
</author>
<published>2017-01-05T02:34:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e552c8cb5bc9137e67e035bab8df6dddbca7384'/>
<id>urn:sha1:4e552c8cb5bc9137e67e035bab8df6dddbca7384</id>
<content type='text'>
Some devices do not handle the led brightness or simply don't
care about it. Conceptually said devices want to just switch on
or off the led. It is useless in this case to have a 255 range
of brightness, while just having an LED_ON and LED_OFF improves
the boolean meaning of the led status.

Signed-off-by: Andi Shyti &lt;andi.shyti@samsung.com&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>led: core: Fix blink_brightness setting race</title>
<updated>2016-11-22T11:07:05Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-10-23T19:47:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/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:05Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-11-08T13:38:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/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:39Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:54:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/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:42Z</updated>
<author>
<name>Andrew F. Davis</name>
<email>afd@ti.com</email>
</author>
<published>2016-06-21T12:40:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/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>
</feed>
