<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/leds, branch v5.4.50</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.50</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.50'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-04-23T08:36:37+00:00</updated>
<entry>
<title>leds: core: Fix warning message when init_data</title>
<updated>2020-04-23T08:36:37+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ribalda@kernel.org</email>
</author>
<published>2020-04-01T09:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9282e58238d228c76fbefa3f1b8200eee716378'/>
<id>urn:sha1:a9282e58238d228c76fbefa3f1b8200eee716378</id>
<content type='text'>
[ Upstream commit 64ed6588c2ea618d3f9ca9d8b365ae4c19f76225 ]

The warning message when a led is renamed due to name collition can fail
to show proper original name if init_data is used. Eg:

[    9.073996] leds-gpio a0040000.leds_0: Led (null) renamed to red_led_1 due to name collision

Fixes: bb4e9af0348d ("leds: core: Add support for composing LED class device names")
Signed-off-by: Ricardo Ribalda Delgado &lt;ribalda@kernel.org&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: pca963x: Fix open-drain initialization</title>
<updated>2020-02-24T07:36:24+00:00</updated>
<author>
<name>Zahari Petkov</name>
<email>zahari@balena.io</email>
</author>
<published>2019-11-18T21:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=348a7ccdb9f0d83e665dccc26e7a7ae5d3638736'/>
<id>urn:sha1:348a7ccdb9f0d83e665dccc26e7a7ae5d3638736</id>
<content type='text'>
[ Upstream commit 697529091ac7a0a90ca349b914bb30641c13c753 ]

Before commit bb29b9cccd95 ("leds: pca963x: Add bindings to invert
polarity") Mode register 2 was initialized directly with either 0x01
or 0x05 for open-drain or totem pole (push-pull) configuration.

Afterwards, MODE2 initialization started using bitwise operations on
top of the default MODE2 register value (0x05). Using bitwise OR for
setting OUTDRV with 0x01 and 0x05 does not produce correct results.
When open-drain is used, instead of setting OUTDRV to 0, the driver
keeps it as 1:

Open-drain: 0x05 | 0x01 -&gt; 0x05 (0b101 - incorrect)
Totem pole: 0x05 | 0x05 -&gt; 0x05 (0b101 - correct but still wrong)

Now OUTDRV setting uses correct bitwise operations for initialization:

Open-drain: 0x05 &amp; ~0x04 -&gt; 0x01 (0b001 - correct)
Totem pole: 0x05 | 0x04 -&gt; 0x05 (0b101 - correct)

Additional MODE2 register definitions are introduced now as well.

Fixes: bb29b9cccd95 ("leds: pca963x: Add bindings to invert polarity")
Signed-off-by: Zahari Petkov &lt;zahari@balena.io&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>led: max77650: add of_match table</title>
<updated>2020-02-05T21:22:49+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2019-12-10T10:08:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0703666b96587246e526b4bd46ab52e59bfe7651'/>
<id>urn:sha1:0703666b96587246e526b4bd46ab52e59bfe7651</id>
<content type='text'>
[ Upstream commit 2424415d25a765d4302ddfb4de75427e9294dc09 ]

We need the of_match table if we want to use the compatible string in
the pmic's child node and get the led driver loaded automatically.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: gpio: Fix uninitialized gpio label for fwnode based probe</title>
<updated>2020-01-29T15:45:29+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>jacek.anaszewski@gmail.com</email>
</author>
<published>2019-12-05T21:25:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5440678b5acbfea878d30922ba44ffecfb9487b7'/>
<id>urn:sha1:5440678b5acbfea878d30922ba44ffecfb9487b7</id>
<content type='text'>
commit 90a8e82d3ca8c1f85ac63f4a94c9b034f05af4ee upstream.

When switching to using generic LED name composition mechanism via
devm_led_classdev_register_ext() API the part of code initializing
struct gpio_led's template name property was removed alongside.
It was however overlooked that the property was also passed to
devm_fwnode_get_gpiod_from_child() in place of "label" parameter,
which when set to NULL, results in gpio label being initialized to '?'.

It could be observed in debugfs and failed to properly identify
gpio association with LED consumer.

Fix this shortcoming by updating the GPIO label after the LED is
registered and its final name is known.

Fixes: d7235f5feaa0 ("leds: gpio: Use generic support for composing LED names")
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
[fixed comment]
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: tlc591xx: update the maximum brightness</title>
<updated>2020-01-26T09:01:02+00:00</updated>
<author>
<name>Jean-Jacques Hiblot</name>
<email>jjhiblot@ti.com</email>
</author>
<published>2019-09-23T10:02:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3af1974d54d4618b103f35b46101b9daeec9499c'/>
<id>urn:sha1:3af1974d54d4618b103f35b46101b9daeec9499c</id>
<content type='text'>
commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 upstream.

The TLC chips actually offer 257 levels:
- 0: led OFF
- 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6%
- 256: led fully ON

Fixes: e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver")
Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: trigger: netdev: fix handling on interface rename</title>
<updated>2020-01-04T18:17:05+00:00</updated>
<author>
<name>Martin Schiller</name>
<email>ms@dev.tdt.de</email>
</author>
<published>2019-10-25T07:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b6b7636ac42855d70150e8e804f2e142204eae8b'/>
<id>urn:sha1:b6b7636ac42855d70150e8e804f2e142204eae8b</id>
<content type='text'>
[ Upstream commit 5f820ed52371b4f5d8c43c93f03408d0dbc01e5b ]

The NETDEV_CHANGENAME code is not "unneeded" like it is stated in commit
4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface
rename").

The event was accidentally misinterpreted equivalent to
NETDEV_UNREGISTER, but should be equivalent to NETDEV_REGISTER.

This was the case in the original code from the openwrt project.

Otherwise, you are unable to set netdev led triggers for (non-existent)
netdevices, which has to be renamed. This is the case, for example, for
ppp interfaces in openwrt.

Fixes: 06f502f57d0d ("leds: trigger: Introduce a NETDEV trigger")
Fixes: 4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface rename")
Signed-off-by: Martin Schiller &lt;ms@dev.tdt.de&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: an30259a: add a check for devm_regmap_init_i2c</title>
<updated>2020-01-04T18:17:03+00:00</updated>
<author>
<name>Chuhong Yuan</name>
<email>hslester96@gmail.com</email>
</author>
<published>2019-10-16T12:54:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fd2f1bc5b673328f3b14ecd1da8d7389c862bea9'/>
<id>urn:sha1:fd2f1bc5b673328f3b14ecd1da8d7389c862bea9</id>
<content type='text'>
[ Upstream commit fc7b5028f2627133c7c18734715a08829eab4d1f ]

an30259a_probe misses a check for devm_regmap_init_i2c and may cause
problems.
Add a check and print errors like other leds drivers.

Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: lm3692x: Handle failure to probe the regulator</title>
<updated>2020-01-04T18:17:02+00:00</updated>
<author>
<name>Guido Günther</name>
<email>agx@sigxcpu.org</email>
</author>
<published>2019-09-21T21:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af4eac2a2871a97f6284f816930ab612bbd6c01c'/>
<id>urn:sha1:af4eac2a2871a97f6284f816930ab612bbd6c01c</id>
<content type='text'>
[ Upstream commit 396128d2ffcba6e1954cfdc9a89293ff79cbfd7c ]

Instead use devm_regulator_get_optional since the regulator
is optional and check for errors.

Signed-off-by: Guido Günther &lt;agx@sigxcpu.org&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Reviewed-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: lm3532: Fix optional led-max-microamp prop error handling</title>
<updated>2019-09-12T18:45:52+00:00</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-09-11T18:27:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d4faf3b6b6eb3c8a750b2e6659a5b1ff3dd9e75'/>
<id>urn:sha1:6d4faf3b6b6eb3c8a750b2e6659a5b1ff3dd9e75</id>
<content type='text'>
Fix the error handling for the led-max-microamp property.
Need to check if the property is present and then if it is
retrieve the setting and its max boundary

Reported-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>led: triggers: Fix dereferencing of null pointer</title>
<updated>2019-09-05T20:32:45+00:00</updated>
<author>
<name>Oleh Kravchenko</name>
<email>oleg@kaa.org.ua</email>
</author>
<published>2019-09-03T21:18:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4016ba85880b252365d11bc7dc899450f2c73ad7'/>
<id>urn:sha1:4016ba85880b252365d11bc7dc899450f2c73ad7</id>
<content type='text'>
Error was detected by PVS-Studio:
V522 Dereferencing of the null pointer 'led_cdev-&gt;trigger' might take place.

Fixes: 2282e125a406 ("leds: triggers: let struct led_trigger::activate() return an error code")
Signed-off-by: Oleh Kravchenko &lt;oleg@kaa.org.ua&gt;
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
</feed>
