<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/leds.h, branch v6.4.16</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.4.16</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.4.16'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2023-05-02T17:36:02Z</updated>
<entry>
<title>Merge tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds</title>
<updated>2023-05-02T17:36:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-05-02T17:36:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c5eb8bf76718cf2e2f36aac216a99014f00927de'/>
<id>urn:sha1:c5eb8bf76718cf2e2f36aac216a99014f00927de</id>
<content type='text'>
Pull LED updates from Lee Jones:
 "New Drivers:
   - Add support for MediaTek MT6370 LED Indicator
   - Add support for MediaTek MT6370 Flashlight
   - Add support for QCOM PMIC Flash
   - Add support for Rohm BD2606MVV Charge Pump LED

  New Device Support:
   - Add support for PMK8550 PWM to QCOM LPG

  New Functionality:
   - Add support for high resolution PWM to QCOM LPG

  Fix-ups:
   - Kconfig 'depends' and 'select' dependency changes
   - Remove unused / irrelevant includes
   - Remove unnecessary checks (already performed further into the call stack)
   - Trivial: Fix commentary, simplify error messages
   - Rid 'defined but not used' warnings
   - Provide documentation
   - Explicitly provide include files

  Bug Fixes:
   - Mark GPIO LED as BROKEN
   - Fix Kconfig entries
   - Fix various Smatch staticify reports
   - Fix error handling (or a lack there of)"

* tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (30 commits)
  leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver
  dt-bindings: leds: Add ROHM BD2606MVV LED
  docs: leds: ledtrig-oneshot: Fix spelling mistake
  leds: pwm-multicolor: Simplify an error message
  dt-bindings: leds: Convert PCA9532 to dtschema
  leds: rgb: leds-qcom-lpg: Add support for PMK8550 PWM
  leds: rgb: leds-qcom-lpg: Add support for high resolution PWM
  dt-bindings: leds-qcom-lpg: Add qcom,pmk8550-pwm compatible string
  leds: tca6507: Fix error handling of using fwnode_property_read_string
  leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static
  leds: rgb: mt6370: Correct config name to select in LEDS_MT6370_RGB
  MAINTAINERS: Add entry for LED devices documentation
  Documentation: leds: MT6370: Use bullet lists for timing variables
  Documentation: leds: mt6370: Properly wrap hw_pattern chart
  Documentation: leds: Add MT6370 doc to the toctree
  leds: rgb: mt6370: Fix implicit declaration for FIELD_GET
  docs: leds: Add MT6370 RGB LED pattern document
  leds: flash: mt6370: Add MediaTek MT6370 flashlight support
  leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support
  dt-bindings: leds: spmi-flash-led: Add pm6150l compatible
  ...
</content>
</entry>
<entry>
<title>leds: Provide stubs for when CLASS_LED &amp; NEW_LEDS are disabled</title>
<updated>2023-04-19T11:59:15Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2023-04-17T15:17:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e5029edd53937a29801ef507cee12e657ff31ea9'/>
<id>urn:sha1:e5029edd53937a29801ef507cee12e657ff31ea9</id>
<content type='text'>
Provide stubs for devm_led_classdev_register_ext() and
led_init_default_state_get() so that LED drivers embedded within other
drivers such as PHYs and Ethernet switches still build when LEDS_CLASS
or NEW_LEDS are disabled. This also helps with Kconfig dependencies,
which are somewhat hairy for phylib and mdio and only get worse when
adding a dependency on LED_CLASS.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>leds: Fix reference to led_set_brightness() in doc</title>
<updated>2023-03-16T15:08:41Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2023-02-18T17:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8af70e202ac4ea5dd2d5561cc2675bc09b30412e'/>
<id>urn:sha1:8af70e202ac4ea5dd2d5561cc2675bc09b30412e</id>
<content type='text'>
The referenced function led_classdev_brightness_set() never existed.

Fixes: 5ada28bf7675 ("led-class: always implement blinking")
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230218-typo-led-set-v1-1-3c35362a2f2d@weissschuh.net
</content>
</entry>
<entry>
<title>leds: Move led_init_default_state_get() to the global header</title>
<updated>2023-01-30T08:03:35Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-01-03T13:12:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=156a5bb89ca6f3edd2be0bfd0de15e575442927e'/>
<id>urn:sha1:156a5bb89ca6f3edd2be0bfd0de15e575442927e</id>
<content type='text'>
There are users inside and outside LED framework that have implemented
a local copy of led_init_default_state_get(). In order to deduplicate
that, as the first step move the declaration from LED header to the
global one.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230103131256.33894-3-andriy.shevchenko@linux.intel.com
</content>
</entry>
<entry>
<title>leds: Add missing includes and forward declarations in leds.h</title>
<updated>2023-01-30T08:03:35Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-01-03T13:12:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d35d0c9de762e003129dfc1240df7152a4bc31e8'/>
<id>urn:sha1:d35d0c9de762e003129dfc1240df7152a4bc31e8</id>
<content type='text'>
Add missing includes and forward declarations to leds.h. While at it,
replace headers by forward declarations and vise versa.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230103131256.33894-2-andriy.shevchenko@linux.intel.com
</content>
</entry>
<entry>
<title>leds: led-class: Add generic [devm_]led_get()</title>
<updated>2023-01-27T11:07:11Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2023-01-20T11:45:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=abc3100fcba6827444ef4bdb17065ac3b6619dff'/>
<id>urn:sha1:abc3100fcba6827444ef4bdb17065ac3b6619dff</id>
<content type='text'>
Add a generic [devm_]led_get() method which can be used on both devicetree
and non devicetree platforms to get a LED classdev associated with
a specific function on a specific device, e.g. the privacy LED associated
with a specific camera sensor.

Note unlike of_led_get() this takes a string describing the function
rather then an index. This is done because e.g. camera sensors might
have a privacy LED, or a flash LED, or both and using an index
approach leaves it unclear what the function of index 0 is if there is
only 1 LED.

This uses a lookup-table mechanism for non devicetree platforms.
This allows the platform code to map specific LED class_dev-s to a specific
device,function combinations this way.

For devicetree platforms getting the LED by function-name could be made
to work using the standard devicetree pattern of adding a -names string
array to map names to the indexes.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230120114524.408368-5-hdegoede@redhat.com
</content>
</entry>
<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>
</feed>
