<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/leds/trigger, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-11-28T11:28:30Z</updated>
<entry>
<title>leds: trigger: Introduce audio mute LED trigger</title>
<updated>2018-11-28T11:28:30Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2018-11-26T16:47:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=faa2541f5b1afa8b6d777a73bc2f27d5c8c98695'/>
<id>urn:sha1:faa2541f5b1afa8b6d777a73bc2f27d5c8c98695</id>
<content type='text'>
This patch adds a new LED trigger for coupling the audio mixer change
with the LED on laptops or other devices.  Currently there are two
trigger types, "audio-mute" and "audio-micmute".

The audio driver triggers the LED brightness change via
ledtrig_audio_set() call with the proper type (either mute or
mic-mute).  OTOH, the consumers may call ledtrig_audio_get() for the
initial brightness value that may have been set by the audio driver
beforehand.

This new stuff will be used by HD-audio codec driver and some platform
drivers (thinkpad_acpi and dell-laptop, also upcoming huawei-wmi).

Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>leds: trigger: Fix sleeping function called from invalid context</title>
<updated>2018-11-07T20:43:25Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-11-07T05:42:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>Fix pattern handling optimalization</title>
<updated>2018-10-25T18:47:46Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2018-10-24T20:44:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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: core: Introduce LED pattern trigger</title>
<updated>2018-10-11T19:55:58Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-10-11T04:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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: gpio trigger: simplifications from core changes</title>
<updated>2018-07-05T21:21:15Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9bfd7d9e5d63532da2d2d55a6bec5bb377761d37'/>
<id>urn:sha1:9bfd7d9e5d63532da2d2d55a6bec5bb377761d37</id>
<content type='text'>
The trigger core learned error handling for the activate callback and
to handle device attributes. Also make use of the module_led_trigger()
helper to simplify trigger registration.

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: backlight trigger: simplifications from core changes</title>
<updated>2018-07-05T21:21:14Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4786ba0db7b1163403c29c429f5ef61906a84c0'/>
<id>urn:sha1:e4786ba0db7b1163403c29c429f5ef61906a84c0</id>
<content type='text'>
Use the new module_led_trigger() helper. Also use
attribute support from the trigger core. Drop error message on
allocation failure as kzalloc() already screams loudly when failing. Use
wrappers to get and set trigger data.

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: activity trigger: simplifications from core changes</title>
<updated>2018-07-05T21:21:14Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13d698cbd99ce90f1d6b4fb0ff11ab90eb55f55e'/>
<id>urn:sha1:13d698cbd99ce90f1d6b4fb0ff11ab90eb55f55e</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 .activated can go away in .deactivate().

Also make use of module_led_trigger() and the accessor function to get
and set trigger_data.

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: default-on trigger: make use of module_led_trigger()</title>
<updated>2018-07-05T21:21:14Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cccc555108b602f92101a939143925095ff9b1d'/>
<id>urn:sha1:5cccc555108b602f92101a939143925095ff9b1d</id>
<content type='text'>
This removes some boilerplate from the driver.

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: heartbeat trigger: simplifications from core changes</title>
<updated>2018-07-05T21:21:13Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71c4af71e597f429d37c89f5db2e44c59c8ba88c'/>
<id>urn:sha1:71c4af71e597f429d37c89f5db2e44c59c8ba88c</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 .activated can go away in .deactivate().

Also make use of module_led_trigger() and the accessor function to get
and set trigger_data.

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: oneshot trigger: simplifications from core changes</title>
<updated>2018-07-05T21:21:13Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2018-07-02T20:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81d5533297fb672012bb298c1f7545f9c168ccb0'/>
<id>urn:sha1:81d5533297fb672012bb298c1f7545f9c168ccb0</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 .activated can go away in .deactivate().

Also make use of module_led_trigger() and do some minor coding style
improvements.

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>
</feed>
