<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/leds, branch v4.9.16</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: triggers: Check return value of kobject_uevent_env()</title>
<updated>2016-09-20T08:22:10+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2016-09-19T10:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f3bad9670729ea3a7c78b3752a89c94ffa2397a'/>
<id>6f3bad9670729ea3a7c78b3752a89c94ffa2397a</id>
<content type='text'>
Log error message if kobject_uevent_env() fails in led_trigger_set().

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Log error message if kobject_uevent_env() fails in led_trigger_set().

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: triggers: Return from led_trigger_set() if there is nothing to do</title>
<updated>2016-09-20T08:21:17+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>jacek.anaszewski@gmail.com</email>
</author>
<published>2016-09-18T18:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fbfa197afddd13f9bdca1c822f5d5730b50639eb'/>
<id>fbfa197afddd13f9bdca1c822f5d5730b50639eb</id>
<content type='text'>
If led_trigger_set() is called with "trig" argument set to NULL, and there
is no trigger to remove then the function should return immediately so
as to avoid doing unnecessary allocation and sending uevent.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Reported-by: Daniel Romell &lt;daro@hms.se&gt;
Acked-by Daniel Romell &lt;daro@hms.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If led_trigger_set() is called with "trig" argument set to NULL, and there
is no trigger to remove then the function should return immediately so
as to avoid doing unnecessary allocation and sending uevent.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Reported-by: Daniel Romell &lt;daro@hms.se&gt;
Acked-by Daniel Romell &lt;daro@hms.se&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: gpio: fix and simplify error handling in gpio_leds_create</title>
<updated>2016-09-15T14:49:43+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74b69e5246d13840963b7b23e21dbab541cb26d2'/>
<id>74b69e5246d13840963b7b23e21dbab541cb26d2</id>
<content type='text'>
Simplify the error handling and add a missing call to fwnode_handle_put
when checking led.name.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify the error handling and add a missing call to fwnode_handle_put
when checking led.name.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: gpio: switch to managed version of led_classdev_register</title>
<updated>2016-09-15T14:49:42+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bc2c0dd85a0a31505ca2f92bef891ddac9126725'/>
<id>bc2c0dd85a0a31505ca2f92bef891ddac9126725</id>
<content type='text'>
Using the managed version of led_classdev_register allows to
significantly simplify the code.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the managed version of led_classdev_register allows to
significantly simplify the code.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: gpio: fix and simplify reading property "label"</title>
<updated>2016-09-15T14:49:42+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bec69de89bab29c739ab84ceb04ae63d6811babf'/>
<id>bec69de89bab29c739ab84ceb04ae63d6811babf</id>
<content type='text'>
Checking for the presence of the property first isn't strictly needed
as we can react on the return code of fwnode_property_read_string.
Also, even if the presence of a property "label" was checked,
reading a string value for it theoretically still can fail and
this case isn't handled.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Checking for the presence of the property first isn't strictly needed
as we can react on the return code of fwnode_property_read_string.
Also, even if the presence of a property "label" was checked,
reading a string value for it theoretically still can fail and
this case isn't handled.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: gpio: simplify gpio_leds_create</title>
<updated>2016-09-15T14:49:41+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8ca03da5e0f70a413986221da4c88459bb6f6878'/>
<id>8ca03da5e0f70a413986221da4c88459bb6f6878</id>
<content type='text'>
Definition of np can be moved into the loop as well to simplify
the code a little.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Definition of np can be moved into the loop as well to simplify
the code a little.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: gpio: add helper cdev_to_gpio_led_data</title>
<updated>2016-09-15T14:49:40+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:55:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4580809436fc391aff9d876a14d07f66a5de6b28'/>
<id>4580809436fc391aff9d876a14d07f66a5de6b28</id>
<content type='text'>
Add a helper for the container_of as it's used more than once.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a helper for the container_of as it's used more than once.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: gpio: fix an unhandled error case in create_gpio_led</title>
<updated>2016-09-15T14:49:40+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=061b5c1d013a94af385ba8980ea3b2617f1ff0f6'/>
<id>061b5c1d013a94af385ba8980ea3b2617f1ff0f6</id>
<content type='text'>
gpiod_get_value_cansleep returns 0, 1, or an error code.
So far errors are not handled and treated the same as 1.
Change this to bail out if an error code is returned and
remove the double negation.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gpiod_get_value_cansleep returns 0, 1, or an error code.
So far errors are not handled and treated the same as 1.
Change this to bail out if an error code is returned and
remove the double negation.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: gpio: introduce gpio_blink_set_t</title>
<updated>2016-09-15T14:49:39+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2016-09-14T18:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=68620e594c250ba8c43a78e77f5296cb9952582e'/>
<id>68620e594c250ba8c43a78e77f5296cb9952582e</id>
<content type='text'>
Introduce a typedef gpio_blink_set_t to improve readability of the code.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a typedef gpio_blink_set_t to improve readability of the code.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: add driver for Mellanox systems LEDs</title>
<updated>2016-09-15T14:49:39+00:00</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@mellanox.com</email>
</author>
<published>2016-09-08T07:25:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be4fdf99fa4dc95aa01144b207caf2cc9fa074d8'/>
<id>be4fdf99fa4dc95aa01144b207caf2cc9fa074d8</id>
<content type='text'>
This makes it possible to create a set of LEDs for Mellanox systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
"msb7800", "msn2740", "msn2100".

Driver obtains LED devices according to system configuration, provided
through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and
creates devices in form: "devicename:colour:function".

LED setting is controlled through on board CPLD Lattice device.
For setting particular LED off, solid, blink:
echo 0 &gt; /sys/class/leds/mlxcpld\:status\:green/brightness
echo 1 &gt; /sys/class/leds/mlxcpld\:status\:green/brightness
echo timer &gt; /sys/class/leds/mlxcpld\:status\:green/trigger

On module probing all LEDs are set green, on removing - off.

Last setting overwrites previous, f.e. sequence for
changing LED from green - red - green:
echo 1 &gt; /sys/class/leds/mlxcpld\:psu\:green/brightness
echo 1 &gt; /sys/class/leds/mlxcpld\:psu\:red/brightness
echo 1 &gt; /sys/class/leds/mlxcpld\:psu\:green/brightness
Note: LEDs cannot be turned on/off simultaneously.

The Kconfig currently controlling compilation of this code is:
drivers/leds/Kconfig:config LEDS_MLXCPLD

Signed-off-by: Vadim Pasternak &lt;vadimp@mellanox.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it possible to create a set of LEDs for Mellanox systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
"msb7800", "msn2740", "msn2100".

Driver obtains LED devices according to system configuration, provided
through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and
creates devices in form: "devicename:colour:function".

LED setting is controlled through on board CPLD Lattice device.
For setting particular LED off, solid, blink:
echo 0 &gt; /sys/class/leds/mlxcpld\:status\:green/brightness
echo 1 &gt; /sys/class/leds/mlxcpld\:status\:green/brightness
echo timer &gt; /sys/class/leds/mlxcpld\:status\:green/trigger

On module probing all LEDs are set green, on removing - off.

Last setting overwrites previous, f.e. sequence for
changing LED from green - red - green:
echo 1 &gt; /sys/class/leds/mlxcpld\:psu\:green/brightness
echo 1 &gt; /sys/class/leds/mlxcpld\:psu\:red/brightness
echo 1 &gt; /sys/class/leds/mlxcpld\:psu\:green/brightness
Note: LEDs cannot be turned on/off simultaneously.

The Kconfig currently controlling compilation of this code is:
drivers/leds/Kconfig:config LEDS_MLXCPLD

Signed-off-by: Vadim Pasternak &lt;vadimp@mellanox.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
