<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/leds/leds-mlxreg.c, branch linux-6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.19.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.19.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-04-11T16:35:18Z</updated>
<entry>
<title>leds: mlxreg: Use devm_mutex_init() for mutex initialization</title>
<updated>2024-04-11T16:35:18Z</updated>
<author>
<name>George Stark</name>
<email>gnstark@salutedevices.com</email>
</author>
<published>2024-04-11T16:10:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=efc347b9efee1c2b081f5281d33be4559fa50a16'/>
<id>urn:sha1:efc347b9efee1c2b081f5281d33be4559fa50a16</id>
<content type='text'>
In this driver LEDs are registered using devm_led_classdev_register()
so they are automatically unregistered after module's remove() is done.
led_classdev_unregister() calls module's led_set_brightness() to turn off
the LEDs and that callback uses mutex which was destroyed already
in module's remove() so use devm API instead.

Signed-off-by: George Stark &lt;gnstark@salutedevices.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20240411161032.609544-8-gnstark@salutedevices.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: mlxreg: Drop an excess struct mlxreg_led_data member</title>
<updated>2024-03-07T08:48:16Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2024-02-29T07:19:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a22f11305d329110dbea5aa235f1b1d1d0f12392'/>
<id>urn:sha1:a22f11305d329110dbea5aa235f1b1d1d0f12392</id>
<content type='text'>
Drop one struct member description to fix a kernel-doc warning:

drivers/leds/leds-mlxreg.c:42: warning: Excess struct member 'led_data' description in 'mlxreg_led_data'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240229071931.7870-4-rdunlap@infradead.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: Convert all platform drivers to return void</title>
<updated>2023-11-01T11:28:35Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-17T13:09:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6061302092305a0584aacf0d82a9d5e66653884c'/>
<id>urn:sha1:6061302092305a0584aacf0d82a9d5e66653884c</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

All platform drivers below drivers/leds/ unconditionally return zero in
their remove callback and so can be converted trivially to the variant
returning void.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230917130947.1122198-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: Explicitly include correct DT includes</title>
<updated>2023-07-28T09:02:32Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-14T17:46:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3192f141240336dd6d7675ff374757006fed1916'/>
<id>urn:sha1:3192f141240336dd6d7675ff374757006fed1916</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20230714174651.4058753-1-robh@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: leds-mlxreg: Fix incorrect documentation of struct member 'led_cdev' and 'led_cdev_name'</title>
<updated>2021-05-28T09:38:59Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2021-05-28T09:06:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aedc13573c537f65424c5ad28ecf7078038d6975'/>
<id>urn:sha1:aedc13573c537f65424c5ad28ecf7078038d6975</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/leds/leds-mlxreg.c:42: warning: Function parameter or member 'led_cdev' not described in 'mlxreg_led_data'
 drivers/leds/leds-mlxreg.c:42: warning: Function parameter or member 'led_cdev_name' not described in 'mlxreg_led_data'

Cc: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: linux-leds@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: mlxreg: Fix possible buffer overflow</title>
<updated>2019-11-03T16:39:00Z</updated>
<author>
<name>Oleh Kravchenko</name>
<email>oleg@kaa.org.ua</email>
</author>
<published>2019-10-16T07:24:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7c6082b903ac28dc3f383fba57c6f9e7e2594178'/>
<id>urn:sha1:7c6082b903ac28dc3f383fba57c6f9e7e2594178</id>
<content type='text'>
Error was detected by PVS-Studio:
V512 A call of the 'sprintf' function will lead to overflow of
the buffer 'led_data-&gt;led_cdev_name'.

Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Oleh Kravchenko &lt;oleg@kaa.org.ua&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
</entry>
<entry>
<title>leds: mlxreg: Add support for capability register</title>
<updated>2019-02-23T17:20:46Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@mellanox.com</email>
</author>
<published>2019-02-19T11:33:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=530451d0df203e9603175db772941011450136f8'/>
<id>urn:sha1:530451d0df203e9603175db772941011450136f8</id>
<content type='text'>
Add support for capability register in order to distinct between the
systems with minor LED configuration differences. It reduces the amount
of code describing systems' LED configuration.
For example one system can be equipped with six LED, while the other
with only four. Reading this information from the capability registers
allows to use the same LED structure for such systems and set the
relevant configuration dynamically based on capability register
content.

Signed-off-by: Vadim Pasternak &lt;vadimp@mellanox.com&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Darren Hart (VMware) &lt;dvhart@infradead.org&gt;
</content>
</entry>
<entry>
<title>leds: add driver for support Mellanox regmap LEDs for BMC and x86 platform</title>
<updated>2018-02-19T20:09:20Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@mellanox.com</email>
</author>
<published>2018-02-15T23:37:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=386570d76f2f25a347a7118fa54315d56b46e7be'/>
<id>urn:sha1:386570d76f2f25a347a7118fa54315d56b46e7be</id>
<content type='text'>
Driver obtains LED devices according to system configuration and creates
devices in form: "devicename:color:function", like
The full path is to be:
/sys/class/leds/mlxreg\:status\:amber/brightness
After timer trigger activation:
echo timer &gt; /sys/class/leds/mlxreg\:status\:amber/trigger
Attributes for LED blinking will appaer in sysfs infrastructure:
/sys/class/leds/mlxreg\:status\:amber/delay_off
/sys/class/leds/mlxreg\:status\:amber/delay_on

LED setting is controlled through the on-board programmable devices,
which exports its register map. This device could be attached to any
bus type, for which register mapping is supported.

Signed-off-by: Vadim Pasternak &lt;vadimp@mellanox.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
</feed>
