<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/leds.h, branch v6.1.96</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.1.96</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.1.96'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-09-27T14:16:42Z</updated>
<entry>
<title>leds: trigger: use RCU to protect the led_cdevs list</title>
<updated>2021-09-27T14:16:42Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2021-09-15T16:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2a5a8fa8b23144d14567d6f8293dd6fbeecee393'/>
<id>urn:sha1:2a5a8fa8b23144d14567d6f8293dd6fbeecee393</id>
<content type='text'>
Even with the previous commit 27af8e2c90fb
("leds: trigger: fix potential deadlock with libata")
to this file, we still get lockdep unhappy, and Boqun
explained the report here:
https://lore.kernel.org/r/YNA+d1X4UkoQ7g8a@boqun-archlinux

Effectively, this means that the read_lock_irqsave() isn't
enough here because another CPU might be trying to do a
write lock, and thus block the readers.

This is all pretty messy, but it doesn't seem right that
the LEDs framework imposes some locking requirements on
users, in particular we'd have to make the spinlock in the
iwlwifi driver always disable IRQs, even if we don't need
that for any other reason, just to avoid this deadlock.

Since writes to the led_cdevs list are rare (and are done
by userspace), just switch the list to RCU. This costs a
synchronize_rcu() at removal time so we can ensure things
are correct, but that seems like a small price to pay for
getting lock-free iterations and no deadlocks (nor any
locking requirements imposed on users.)

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: move default_state read from fwnode to core</title>
<updated>2021-08-18T06:27:30Z</updated>
<author>
<name>Denis Osterland-Heim</name>
<email>Denis.Osterland@diehl.com</email>
</author>
<published>2021-06-08T06:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=791bc41163c51f870972d6c6b82d971ce951096c'/>
<id>urn:sha1:791bc41163c51f870972d6c6b82d971ce951096c</id>
<content type='text'>
This patch introduces a new function to read initial
default_state from fwnode.

Suggested-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Denis Osterland-Heim &lt;Denis.Osterland@diehl.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: led-core: Get rid of enum led_brightness</title>
<updated>2021-02-19T10:35:28Z</updated>
<author>
<name>Abanoub Sameh</name>
<email>abanoubsameh8@gmail.com</email>
</author>
<published>2020-12-11T20:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af0bfab907a011e146304d20d81dddce4e4d62d0'/>
<id>urn:sha1:af0bfab907a011e146304d20d81dddce4e4d62d0</id>
<content type='text'>
This gets rid of enum led_brightness in the main led files,
because it is deprecated, and an unsigned int can be used instead.

We can get rid of led_brightness completely and
patches can also be supplied for the other drivers' files.

Signed-off-by: Abanoub Sameh &lt;abanoubsameh@protonmail.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: trigger: add support for LED-private device triggers</title>
<updated>2020-07-22T12:42:07Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2020-07-16T17:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=93690cdf3060c61dfce813121d0bfc055e7fa30d'/>
<id>urn:sha1:93690cdf3060c61dfce813121d0bfc055e7fa30d</id>
<content type='text'>
Some LED controllers may come with an internal HW triggering mechanism
for the LED and the ability to switch between SW control and the
internal HW control. This includes most PHYs, various ethernet switches,
the Turris Omnia LED controller or AXP20X PMIC.

This adds support for registering such triggers.

This code is based on work by Pavel Machek &lt;pavel@ucw.cz&gt; and
Ondřej Jirman &lt;megous@megous.com&gt;.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: old enums are not really applicable to new code</title>
<updated>2020-04-06T20:55:27Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2020-03-21T16:01:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c7e4ea68c1626cceb966323a4b572e2f8d805138'/>
<id>urn:sha1:c7e4ea68c1626cceb966323a4b572e2f8d805138</id>
<content type='text'>
Warn about old defines that probably should not be used.

Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: Add managed API to get a LED from a device driver</title>
<updated>2020-01-05T23:20:18Z</updated>
<author>
<name>Jean-Jacques Hiblot</name>
<email>jjhiblot@ti.com</email>
</author>
<published>2019-10-03T08:28:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e389240ad99292d52a4f8ff30f16830dc9c63779'/>
<id>urn:sha1:e389240ad99292d52a4f8ff30f16830dc9c63779</id>
<content type='text'>
If the LED is acquired by a consumer device with devm_led_get(), it is
automatically released when the device is detached.

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: Add of_led_get() and led_put()</title>
<updated>2020-01-05T23:20:06Z</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ti.com</email>
</author>
<published>2019-10-03T08:28:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=699a8c7c4bd376aee4808e6272188319e900c8af'/>
<id>urn:sha1:699a8c7c4bd376aee4808e6272188319e900c8af</id>
<content type='text'>
This patch adds basic support for a kernel driver to get a LED device.
This will be used by the led-backlight driver.

Only OF version is implemented for now, and the behavior is similar to
PWM's of_pwm_get() and pwm_put().

Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: core: Fix leds.h structure documentation</title>
<updated>2019-11-03T16:38:55Z</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-10-02T12:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9cc93be7b0c91a87ef452457c706af62741249d7'/>
<id>urn:sha1:9cc93be7b0c91a87ef452457c706af62741249d7</id>
<content type='text'>
Update the leds.h structure documentation to define the
correct arguments.

Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: core: Remove extern from header</title>
<updated>2019-11-03T16:38:46Z</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-10-02T12:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ec28a8cfdce6306afcbf528e231a733010c82251'/>
<id>urn:sha1:ec28a8cfdce6306afcbf528e231a733010c82251</id>
<content type='text'>
extern is implied and is not needed in the header file.
Remove the extern keyword and re-align the code.

Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: remove PAGE_SIZE limit of /sys/class/leds/&lt;led&gt;/trigger</title>
<updated>2019-11-03T16:38:14Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2019-09-29T14:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=11f70002213774ed233950f71ea8803fa3700aa3'/>
<id>urn:sha1:11f70002213774ed233950f71ea8803fa3700aa3</id>
<content type='text'>
Reading /sys/class/leds/&lt;led&gt;/trigger returns all available LED triggers.
However, the size of this file is limited to PAGE_SIZE because of the
limitation for sysfs attribute.

Enabling LED CPU trigger on systems with thousands of CPUs easily hits
PAGE_SIZE limit, and makes it impossible to see all available LED triggers
and which trigger is currently activated.

We work around it here by converting /sys/class/leds/&lt;led&gt;/trigger to
binary attribute, which is not limited by length. This is _not_ good
design, do not copy it.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Dan Murphy &lt;dmurphy@ti.com&gt;A
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
</feed>
