<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/leds, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-02-27T09:09:50+00:00</updated>
<entry>
<title>leds: lp5523: fix a missing check of return value of lp55xx_read</title>
<updated>2019-02-27T09:09:50+00:00</updated>
<author>
<name>Kangjie Lu</name>
<email>kjlu@umn.edu</email>
</author>
<published>2018-12-26T04:18:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f63b43f1ad1078ce5fdd69148568641e702eba35'/>
<id>urn:sha1:f63b43f1ad1078ce5fdd69148568641e702eba35</id>
<content type='text'>
[ Upstream commit 248b57015f35c94d4eae2fdd8c6febf5cd703900 ]

When lp55xx_read() fails, "status" is an uninitialized variable and thus
may contain random value; using it leads to undefined behaviors.

The fix inserts a check for the return value of lp55xx_read: if it
fails, returns with its error code.

Signed-off-by: Kangjie Lu &lt;kjlu@umn.edu&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'led-fixes-for-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds</title>
<updated>2018-11-08T23:49:04+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-11-08T23:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a1ac56c23db741200d1618ef4c3fb2d31932431'/>
<id>urn:sha1:6a1ac56c23db741200d1618ef4c3fb2d31932431</id>
<content type='text'>
Pull LED fixes from Jacek Anaszewski:
 "All three fixes are related to the newly added pattern trigger:

   - remove mutex_lock() from timer callback, which would trigger
     problems related to sleeping in atomic context, the removal is
     harmless since mutex protection turned out to be redundant in this
     case

   - fix pattern parsing to properly handle intervals with brightness == 0

   - fix typos in the ABI documentation"

* tag 'led-fixes-for-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  Documentation: ABI: led-trigger-pattern: Fix typos
  leds: trigger: Fix sleeping function called from invalid context
  Fix pattern handling optimalization
</content>
</entry>
<entry>
<title>leds: trigger: Fix sleeping function called from invalid context</title>
<updated>2018-11-07T20:43:25+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-11-07T05:42:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a40cfe8ba3abba57af2c7e26aad2c6dd1681864'/>
<id>urn:sha1:3a40cfe8ba3abba57af2c7e26aad2c6dd1681864</id>
<content type='text'>
We will meet below issue due to mutex_lock() is called in interrupt context.
The mutex lock is used to protect the pattern trigger data, but before changing
new pattern trigger data (pattern values or repeat value) by users, we always
cancel the timer firstly to clear previous patterns' performance. That means
there is no race in pattern_trig_timer_function(), so we can drop the mutex
lock in pattern_trig_timer_function() to avoid this issue.

Moreover we can move the timer cancelling into mutex protection, since there
is no deadlock risk if we remove the mutex lock in pattern_trig_timer_function().

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/1
CPU: 1 PID: 0 Comm: swapper/1 Not tainted
4.20.0-rc1-koelsch-00841-ga338c8181013c1a9 #171
Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[&lt;c020f19c&gt;] (unwind_backtrace) from [&lt;c020aecc&gt;] (show_stack+0x10/0x14)
[&lt;c020aecc&gt;] (show_stack) from [&lt;c07affb8&gt;] (dump_stack+0x7c/0x9c)
[&lt;c07affb8&gt;] (dump_stack) from [&lt;c02417d4&gt;] (___might_sleep+0xf4/0x158)
[&lt;c02417d4&gt;] (___might_sleep) from [&lt;c07c92c4&gt;] (mutex_lock+0x18/0x60)
[&lt;c07c92c4&gt;] (mutex_lock) from [&lt;c067b28c&gt;] (pattern_trig_timer_function+0x1c/0x11c)
[&lt;c067b28c&gt;] (pattern_trig_timer_function) from [&lt;c027f6fc&gt;] (call_timer_fn+0x1c/0x90)
[&lt;c027f6fc&gt;] (call_timer_fn) from [&lt;c027f944&gt;] (expire_timers+0x94/0xa4)
[&lt;c027f944&gt;] (expire_timers) from [&lt;c027fc98&gt;] (run_timer_softirq+0x108/0x15c)
[&lt;c027fc98&gt;] (run_timer_softirq) from [&lt;c02021cc&gt;] (__do_softirq+0x1d4/0x258)
[&lt;c02021cc&gt;] (__do_softirq) from [&lt;c0224d24&gt;] (irq_exit+0x64/0xc4)
[&lt;c0224d24&gt;] (irq_exit) from [&lt;c0268dd0&gt;] (__handle_domain_irq+0x80/0xb4)
[&lt;c0268dd0&gt;] (__handle_domain_irq) from [&lt;c045e1b0&gt;] (gic_handle_irq+0x58/0x90)
[&lt;c045e1b0&gt;] (gic_handle_irq) from [&lt;c02019f8&gt;] (__irq_svc+0x58/0x74)
Exception stack(0xeb483f60 to 0xeb483fa8)
3f60: 00000000 00000000 eb9afaa0 c0217e80 00000000 ffffe000 00000000 c0e06408
3f80: 00000002 c0e0647c c0c6a5f0 00000000 c0e04900 eb483fb0 c0207ea8 c0207e98
3fa0: 60020013 ffffffff
[&lt;c02019f8&gt;] (__irq_svc) from [&lt;c0207e98&gt;] (arch_cpu_idle+0x1c/0x38)
[&lt;c0207e98&gt;] (arch_cpu_idle) from [&lt;c0247ca8&gt;] (do_idle+0x138/0x268)
[&lt;c0247ca8&gt;] (do_idle) from [&lt;c0248050&gt;] (cpu_startup_entry+0x18/0x1c)
[&lt;c0248050&gt;] (cpu_startup_entry) from [&lt;402022ec&gt;] (0x402022ec)

Fixes: 5fd752b6b3a2 ("leds: core: Introduce LED pattern trigger")
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Reported-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: gpio: set led_dat-&gt;gpiod pointer for OF defined GPIO leds</title>
<updated>2018-10-26T18:51:36+00:00</updated>
<author>
<name>Liviu Dudau</name>
<email>liviu@dudau.co.uk</email>
</author>
<published>2018-10-18T00:14:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72b8ad40e14302f869382656a914bb803796b4ed'/>
<id>urn:sha1:72b8ad40e14302f869382656a914bb803796b4ed</id>
<content type='text'>
Commit 45d4c6de4e49 ("leds: gpio: Try to lookup gpiod from device")
removed the common code path that set the led_dat-&gt;gpiod pointer in
create_gpio_led(), but only added it back for the devices that have
a valid gpio_led_platform_data structure. Calling gpio_leds_create()
in gpio_led_probe() is not enough to get a valid gpiod pointer.

Fortunately enough, gpio_leds_create() already gets the needed pointer,
we just need to assign it to the relevant gpio_led_data structure.

Fixes: 45d4c6de4e49 ("leds: gpio: Try to lookup gpiod from device")
Signed-off-by: Liviu Dudau &lt;liviu@dudau.co.uk&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&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>Fix pattern handling optimalization</title>
<updated>2018-10-25T18:47:46+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2018-10-24T20:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b50bb4d36e89fd54c14722c4ab5266ef17767ff'/>
<id>urn:sha1:1b50bb4d36e89fd54c14722c4ab5266ef17767ff</id>
<content type='text'>
Check for zero duration before skipping step. This fixes pattern

    echo "0 1000 10 2550 0 1000" &gt; pattern

which should do [  .-xXx-.] but does [   Xx-.]

Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Suggested-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: sc27xx: Add pattern_set/clear interfaces for LED controller</title>
<updated>2018-10-11T19:59:11+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-11T04:07:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8dbac65f5c181e4723586ab738b703bb23bc3f2a'/>
<id>urn:sha1:8dbac65f5c181e4723586ab738b703bb23bc3f2a</id>
<content type='text'>
This patch implements the 'pattern_set'and 'pattern_clear'
interfaces to support SC27XX LED breathing mode.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.c&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: core: Introduce LED pattern trigger</title>
<updated>2018-10-11T19:55:58+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-11T04:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5fd752b6b3a2233972ce1726df8bdb40886113a9'/>
<id>urn:sha1:5fd752b6b3a2233972ce1726df8bdb40886113a9</id>
<content type='text'>
This patch adds a new LED trigger that LED device can configure
to employ software or hardware pattern engine.

Consumers can write 'pattern' file to enable the software pattern
which alters the brightness for the specified duration with one
software timer.

Moreover consumers can write 'hw_pattern' file to enable the hardware
pattern for some LED controllers which can autonomously control
brightness over time, according to some preprogrammed hardware
patterns.

Signed-off-by: Raphael Teysseyre &lt;rteysseyre@gmail.com&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: add Panasonic AN30259A support</title>
<updated>2018-09-10T19:31:11+00:00</updated>
<author>
<name>Simon Shields</name>
<email>simon@lineageos.org</email>
</author>
<published>2018-09-09T10:38:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2d00f35c55e74fcb5626c9aa336c1ed697cd2ae9'/>
<id>urn:sha1:2d00f35c55e74fcb5626c9aa336c1ed697cd2ae9</id>
<content type='text'>
AN30259A is a 3-channel LED driver which uses I2C. It supports timed
operation via an internal PWM clock, and variable brightness. This
driver offers support for basic hardware-based blinking and brightness
control.

The datasheet is freely available:
https://www.alliedelec.com/m/d/a9d2b3ee87c2d1a535a41dd747b1c247.pdf

Signed-off-by: Simon Shields &lt;simon@lineageos.org&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: gpio: Try to lookup gpiod from device</title>
<updated>2018-09-10T19:14:17+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2018-09-06T22:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=45d4c6de4e497e5b0026c77044ae5fcddf8fecd8'/>
<id>urn:sha1:45d4c6de4e497e5b0026c77044ae5fcddf8fecd8</id>
<content type='text'>
This augments the GPIO lookup code in the GPIO LEDs to
attempt to look up a GPIO descriptor from the device with
index.

This makes it possible to use GPIO machine look-up tables
and stop passing global GPIO numbers through platform data.

Using this we can stepwise convert existing board files
to use machine descriptor tables and then eventually drop
the legacy GPIO support and only include
&lt;linux/gpio/consumer.h&gt; and use descriptors exclusively.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: pwm: silently error out on EPROBE_DEFER</title>
<updated>2018-09-08T20:47:15+00:00</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2018-09-06T13:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9aec30371fb095a0c9415f3f0146ae269c3713d8'/>
<id>urn:sha1:9aec30371fb095a0c9415f3f0146ae269c3713d8</id>
<content type='text'>
When probing, if we fail to get the pwm due to probe deferal, we shouldn't
print an error message. Just be silent in this case.

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
</feed>
