<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/leds, branch v5.10-rc2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>leds: pwm: Remove platform_data support</title>
<updated>2020-10-07T10:02:58+00:00</updated>
<author>
<name>Alexander Dahl</name>
<email>post@lespocky.de</email>
</author>
<published>2020-10-05T20:34:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=19d2e0cef0b14f8c7210162f58327485f5fa7c51'/>
<id>19d2e0cef0b14f8c7210162f58327485f5fa7c51</id>
<content type='text'>
Since commit 141f15c66d94 ("leds: pwm: remove header") that platform
interface is not usable from outside and there seems to be no in tree
user anymore.  All in-tree users of the leds-pwm driver seem to use DT
currently.  Getting rid of the old platform interface allows the
leds-pwm driver to switch over from 'devm_led_classdev_register()' to
'devm_led_classdev_register_ext()'.

Signed-off-by: Alexander Dahl &lt;post@lespocky.de&gt;
Cc: Denis Osterland-Heim &lt;denis.osterland@diehl.com&gt;
Reviewed-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 141f15c66d94 ("leds: pwm: remove header") that platform
interface is not usable from outside and there seems to be no in tree
user anymore.  All in-tree users of the leds-pwm driver seem to use DT
currently.  Getting rid of the old platform interface allows the
leds-pwm driver to switch over from 'devm_led_classdev_register()' to
'devm_led_classdev_register_ext()'.

Signed-off-by: Alexander Dahl &lt;post@lespocky.de&gt;
Cc: Denis Osterland-Heim &lt;denis.osterland@diehl.com&gt;
Reviewed-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: lm3697: Fix out-of-bound access</title>
<updated>2020-10-05T18:36:09+00:00</updated>
<author>
<name>Gabriel David</name>
<email>ultracoolguy@tutanota.com</email>
</author>
<published>2020-10-02T22:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=98d278ca00bd8f62c8bc98bd9e65372d16eb6956'/>
<id>98d278ca00bd8f62c8bc98bd9e65372d16eb6956</id>
<content type='text'>
If both LED banks aren't used in device tree, an out-of-bounds
condition in lm3697_init occurs because of the for loop assuming that
all the banks are used.  Fix it by adding a variable that contains the
number of used banks.

Signed-off-by: Gabriel David &lt;ultracoolguy@tutanota.com&gt;
[removed extra rename, minor tweaks]
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If both LED banks aren't used in device tree, an out-of-bounds
condition in lm3697_init occurs because of the for loop assuming that
all the banks are used.  Fix it by adding a variable that contains the
number of used banks.

Signed-off-by: Gabriel David &lt;ultracoolguy@tutanota.com&gt;
[removed extra rename, minor tweaks]
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: ns2: do not guard OF match pointer with of_match_ptr</title>
<updated>2020-09-30T17:22:58+00:00</updated>
<author>
<name>Marek Behún</name>
<email>kabel@kernel.org</email>
</author>
<published>2020-09-26T20:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8fd8f94235c2c925d80b2316e0ab2bdd00af9bae'/>
<id>8fd8f94235c2c925d80b2316e0ab2bdd00af9bae</id>
<content type='text'>
Do not match OF match pointer with of_match_ptr, so that even if
CONFIG_OF is disabled, the driver can still be bound via another method.

Move definition of of_ns2_leds_match just before ns2_led_driver
definition, since it is not needed sooner.

Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Tested-by: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not match OF match pointer with of_match_ptr, so that even if
CONFIG_OF is disabled, the driver can still be bound via another method.

Move definition of of_ns2_leds_match just before ns2_led_driver
definition, since it is not needed sooner.

Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Tested-by: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: ns2: convert to fwnode API</title>
<updated>2020-09-30T17:22:58+00:00</updated>
<author>
<name>Marek Behún</name>
<email>kabel@kernel.org</email>
</author>
<published>2020-09-26T20:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=940cca1ab5d6c3bc1f8db0c804cf7c5e0caf1853'/>
<id>940cca1ab5d6c3bc1f8db0c804cf7c5e0caf1853</id>
<content type='text'>
Convert from OF api to fwnode API, so that it is possible to bind this
driver without device-tree.

The fwnode API does not expose a function to read a specific element of
an array. We therefore change the types of the ns2_led_modval structure
so that we can read the whole modval array with one fwnode call.

Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Tested-by: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert from OF api to fwnode API, so that it is possible to bind this
driver without device-tree.

The fwnode API does not expose a function to read a specific element of
an array. We therefore change the types of the ns2_led_modval structure
so that we can read the whole modval array with one fwnode call.

Signed-off-by: Marek Behún &lt;kabel@kernel.org&gt;
Tested-by: Simon Guinot &lt;simon.guinot@sequanux.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: tlc591xx: fix leak of device node iterator</title>
<updated>2020-09-30T17:20:46+00:00</updated>
<author>
<name>Tobias Jordan</name>
<email>kernel@cdqe.de</email>
</author>
<published>2020-09-26T00:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=108f4664e3449828114780a05393eb8d2be7fdd0'/>
<id>108f4664e3449828114780a05393eb8d2be7fdd0</id>
<content type='text'>
In one of the error paths of the for_each_child_of_node loop in
tlc591xx_probe, add missing call to of_node_put.

Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API")

Signed-off-by: Tobias Jordan &lt;kernel@cdqe.de&gt;
Reviewed-by: Marek Behún &lt;kabel@kernel.org&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In one of the error paths of the for_each_child_of_node loop in
tlc591xx_probe, add missing call to of_node_put.

Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API")

Signed-off-by: Tobias Jordan &lt;kernel@cdqe.de&gt;
Reviewed-by: Marek Behún &lt;kabel@kernel.org&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: pca963x: use struct led_init_data when registering</title>
<updated>2020-09-30T17:15:42+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2020-09-20T00:25:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=564ead1280d7590f0015d8225637d546e9fa94eb'/>
<id>564ead1280d7590f0015d8225637d546e9fa94eb</id>
<content type='text'>
By using struct led_init_data when registering we do not need to parse
`label` DT property. Moreover `label` is deprecated and if it is not
present but `color` and `function` are, LED core will compose a name
from these properties instead.

Previously if the `label` DT property was not present, the code composed
name for the LED in the form
  "pca963x:%d:%.2x:%u"
For backwards compatibility we therefore set init_data-&gt;default_label
to this value so that the LED will not get a different name if `label`
property is not present, nor are `color` and `function`.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: Peter Meerwald &lt;p.meerwald@bct-electronic.com&gt;
Cc: Ricardo Ribalda &lt;ribalda@kernel.org&gt;
Cc: Zahari Petkov &lt;zahari@balena.io&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By using struct led_init_data when registering we do not need to parse
`label` DT property. Moreover `label` is deprecated and if it is not
present but `color` and `function` are, LED core will compose a name
from these properties instead.

Previously if the `label` DT property was not present, the code composed
name for the LED in the form
  "pca963x:%d:%.2x:%u"
For backwards compatibility we therefore set init_data-&gt;default_label
to this value so that the LED will not get a different name if `label`
property is not present, nor are `color` and `function`.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: Peter Meerwald &lt;p.meerwald@bct-electronic.com&gt;
Cc: Ricardo Ribalda &lt;ribalda@kernel.org&gt;
Cc: Zahari Petkov &lt;zahari@balena.io&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: pca963x: register LEDs immediately after parsing, get rid of platdata</title>
<updated>2020-09-30T17:15:41+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2020-09-20T00:24:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=85fc8efe85d405b80904f73e4e23184a84283753'/>
<id>85fc8efe85d405b80904f73e4e23184a84283753</id>
<content type='text'>
Register LEDs immediately after parsing their properties.
This allows us to get rid of platdata, and since no one in tree uses
header linux/platform_data/leds-pca963x.h, remove it.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: Peter Meerwald &lt;p.meerwald@bct-electronic.com&gt;
Cc: Ricardo Ribalda &lt;ribalda@kernel.org&gt;
Cc: Zahari Petkov &lt;zahari@balena.io&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Register LEDs immediately after parsing their properties.
This allows us to get rid of platdata, and since no one in tree uses
header linux/platform_data/leds-pca963x.h, remove it.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: Peter Meerwald &lt;p.meerwald@bct-electronic.com&gt;
Cc: Ricardo Ribalda &lt;ribalda@kernel.org&gt;
Cc: Zahari Petkov &lt;zahari@balena.io&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: tca6507: remove binding comment</title>
<updated>2020-09-30T17:15:41+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2020-09-19T22:15:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7e2dc43da2c0e9352766de5d578edbcfd2c548eb'/>
<id>7e2dc43da2c0e9352766de5d578edbcfd2c548eb</id>
<content type='text'>
Remove the binding comment at the beginning. The information for
platdata is now obsolete and DT binding is documented in device-tree
bindings.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the binding comment at the beginning. The information for
platdata is now obsolete and DT binding is documented in device-tree
bindings.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: tca6507: cosmetic change: use helper variable</title>
<updated>2020-09-30T17:15:41+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2020-09-19T22:15:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c1ff1a1d3598964bd4bfe1effff1100aa0e79f9d'/>
<id>c1ff1a1d3598964bd4bfe1effff1100aa0e79f9d</id>
<content type='text'>
Use helper variable dev instead of always writing &amp;client-&gt;dev.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use helper variable dev instead of always writing &amp;client-&gt;dev.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: tca6507: do not set GPIO names</title>
<updated>2020-09-30T17:15:41+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2020-09-19T22:15:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b7f0b3bd1fe362160164a3dec3e8063ba3389549'/>
<id>b7f0b3bd1fe362160164a3dec3e8063ba3389549</id>
<content type='text'>
Do not set GPIO names. Let gpiolib determine GPIO names from the DT
property `gpio-line-names`.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not set GPIO names. Let gpiolib determine GPIO names from the DT
property `gpio-line-names`.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
