<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/leds, branch v4.4.171</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-12-13T08:21:31+00:00</updated>
<entry>
<title>leds: leds-gpio: Fix return value check in create_gpio_led()</title>
<updated>2018-12-13T08:21:31+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2016-02-06T14:37:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c4da5d2b0d53b79ebe8e3b3f17edfe6ec146737'/>
<id>urn:sha1:0c4da5d2b0d53b79ebe8e3b3f17edfe6ec146737</id>
<content type='text'>
commit 2d88a331e48095cf60ad9bdf3177bd401bf99727 upstream.

In case of error, the function gpio_to_desc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: turn off the LED and wait for completion on unregistering LED class device</title>
<updated>2018-12-13T08:21:31+00:00</updated>
<author>
<name>Milo Kim</name>
<email>milo.kim@ti.com</email>
</author>
<published>2015-11-20T08:03:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e946ed3c55c43441440d478c0b1b5086d6e8999'/>
<id>urn:sha1:5e946ed3c55c43441440d478c0b1b5086d6e8999</id>
<content type='text'>
commit d1aa577f5e191d77d3ad62da93729b5af9532bb4 upstream.

Workqueue, 'set_brightness_work' is used for scheduling brightness control.
This workqueue is canceled when the LED class device is unregistered.
Currently, LED subsystem handles like below.

  cancel_work_sync(&amp;led_cdev-&gt;set_brightness_work)
  led_set_brightness(led_cdev, LED_OFF)

However, this could be a problem.
Workqueue is going to be canceled but LED device needs to be off.
The worst case is null pointer access due to scheduling a workqueue.

LED module is loaded.
  LED driver private data is allocated by using devm_zalloc().

LED module is unloaded.
  led_classdev_unregister() is called.
    cancel_work_sync()
      led_set_brightness(led_cdev, LED_OFF)
        schedule_work() if LED driver uses brightness_set_blocking()
        In the meantime, driver private data will be freed.

        ..scheduling..

        brightness_set_blocking() callback is invoked.
          For the brightness control, LED driver tries to access private
          data but resource is removed!

To avoid this problem, LED subsystem should turn off the brightness first
and wait for completion.

  led_set_brightness(led_cdev, LED_OFF)
  flush_work(&amp;led_cdev-&gt;set_brightness_work)

It guarantees that LED driver turns off the brightness prior to
resource management.

Cc: linux-leds@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Milo Kim &lt;milo.kim@ti.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: call led_pwm_set() in leds-pwm to enforce default LED_OFF</title>
<updated>2018-12-13T08:21:30+00:00</updated>
<author>
<name>Markus Hofstaetter</name>
<email>markus.hofstaetter@ait.ac.at</email>
</author>
<published>2015-11-11T11:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5cc3e038d083515e6112707f7ffcdf0e5aa8497'/>
<id>urn:sha1:c5cc3e038d083515e6112707f7ffcdf0e5aa8497</id>
<content type='text'>
commit f16703360da7731a057df2ffa902306819c22398 upstream.

Some PWMs are disabled by default or the default pin setting
does not match the LED_OFF state (e.g., active-low leds).
Hence, the driver may end up reporting 0 brightness, but
the leds are actually on using full brightness, because
it never enforces its default configuration.
So enforce it by calling led_pwm_set() after successfully
registering the device.

Tested on a Phytec phyFLEX i.MX6Q board based on kernel
v3.19.5.

Signed-off-by: Markus Hofstaetter &lt;markus.hofstaetter@ait.ac.at&gt;
Tested-by: Markus Hofstaetter &lt;markus.hofstaetter@ait.ac.at&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: pca955x: Correct I2C Functionality</title>
<updated>2018-04-13T17:50:09+00:00</updated>
<author>
<name>Tin Huynh</name>
<email>tnhuynh@apm.com</email>
</author>
<published>2017-05-22T09:19:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7147749b69ffe8b87f53104f770c796d437780b'/>
<id>urn:sha1:a7147749b69ffe8b87f53104f770c796d437780b</id>
<content type='text'>
[ Upstream commit aace34c0bb8ea3c8bdcec865b6a4be4db0a68e33 ]

The driver checks an incorrect flag of functionality of adapter.
When a driver requires i2c_smbus_read_byte_data and
i2c_smbus_write_byte_data, it should check I2C_FUNC_SMBUS_BYTE_DATA
instead I2C_FUNC_I2C.
This patch fixes the problem.

Signed-off-by: Tin Huynh &lt;tnhuynh@apm.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "led: core: Fix brightness setting when setting delay_off=0"</title>
<updated>2018-03-11T15:19:45+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2018-03-08T15:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f3437fbb2d8f780e84f507282d03facb4ccf248'/>
<id>urn:sha1:3f3437fbb2d8f780e84f507282d03facb4ccf248</id>
<content type='text'>
This reverts commit 20ac8f72514b3af8b62c520d55656ded865eff00, which
was commit 2b83ff96f51d0b039c4561b9f95c824d7bddb85c upstream.
The bug that it should fix was only introduced in Linux 4.7, and
in 4.4 it causes a regression.

Reported-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Cc: Matthieu CASTET &lt;matthieu.castet@parrot.com&gt;
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>leds: do not overflow sysfs buffer in led_trigger_show</title>
<updated>2018-03-11T15:19:45+00:00</updated>
<author>
<name>Nathan Sullivan</name>
<email>nathan.sullivan@ni.com</email>
</author>
<published>2016-08-15T22:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dff485e36287be123a844dc9164ba0417cd34552'/>
<id>urn:sha1:dff485e36287be123a844dc9164ba0417cd34552</id>
<content type='text'>
commit 3b9b95363c45365d606ad4bbba16acca75fdf6d3 upstream.

Per the documentation, use scnprintf instead of sprintf to ensure there
is never more than PAGE_SIZE bytes of trigger names put into the
buffer.

Signed-off-by: Nathan Sullivan &lt;nathan.sullivan@ni.com&gt;
Signed-off-by: Zach Brown &lt;zach.brown@ni.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>led: core: Fix brightness setting when setting delay_off=0</title>
<updated>2018-03-03T09:19:43+00:00</updated>
<author>
<name>Matthieu CASTET</name>
<email>matthieu.castet@parrot.com</email>
</author>
<published>2017-12-12T10:10:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=20ac8f72514b3af8b62c520d55656ded865eff00'/>
<id>urn:sha1:20ac8f72514b3af8b62c520d55656ded865eff00</id>
<content type='text'>
[ Upstream commit 2b83ff96f51d0b039c4561b9f95c824d7bddb85c ]

With the current code, the following sequence won't work :
echo timer &gt; trigger

echo 0 &gt;  delay_off
* at this point we call
** led_delay_off_store
** led_blink_set
</content>
</entry>
<entry>
<title>leds: ktd2692: avoid harmless maybe-uninitialized warning</title>
<updated>2017-05-14T11:32:55+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-01-25T22:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=efa58a24e52c8b58f461f03401aeb4d0b2146b9b'/>
<id>urn:sha1:efa58a24e52c8b58f461f03401aeb4d0b2146b9b</id>
<content type='text'>
commit cbe99c538d1776009e8710755bb6e726f7fffa9b upstream.

gcc gets confused about the control flow in ktd2692_parse_dt(), causing
it to warn about what seems like a potential bug:

drivers/leds/leds-ktd2692.c: In function 'ktd2692_probe':
drivers/leds/leds-ktd2692.c:244:15: error: '*((void *)&amp;led_cfg+8)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/leds/leds-ktd2692.c:225:7: error: 'led_cfg.flash_max_microamp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/leds/leds-ktd2692.c:232:3: error: 'led_cfg.movie_max_microamp' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The code is fine, and slightly reworking it in an equivalent way lets
gcc figure that out too, which gets rid of the warning.

Fixes: 77e7915b15bb ("leds: ktd2692: Add missing of_node_put")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi</title>
<updated>2015-11-05T21:15:12+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-05T21:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75f5db39ff14ed95056f2cca3ad98c3cae97170c'/>
<id>urn:sha1:75f5db39ff14ed95056f2cca3ad98c3cae97170c</id>
<content type='text'>
Pull spi updates from Mark Brown:
 "Quite a lot of activity in SPI this cycle, almost all of it in drivers
  with a few minor improvements and tweaks in the core.

   - Updates to pxa2xx to support Intel Broxton and multiple chip selects.
   - Support for big endian in the bcm63xx driver.
   - Multiple slave support for the mt8173
   - New driver for the auxiliary SPI controller in bcm2835 SoCs.
   - Support for Layerscale SoCs in the Freescale DSPI driver"

* tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits)
  spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI
  spi: pxa2xx: Add support for Intel Broxton
  spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals
  spi: pxa2xx: Add output control for multiple Intel LPSS chip selects
  spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific
  spi: Add DSPI support for layerscape family
  spi: ti-qspi: improve -&gt;remove() callback
  spi/spi-xilinx: Fix race condition on last word read
  spi: Drop owner assignment from spi_drivers
  spi: Add THIS_MODULE to spi_driver in SPI core
  spi: Setup the master controller driver before setting the chipselect
  spi: dw: replace magic constant by DW_SPI_DR
  spi: mediatek: mt8173 spi multiple devices support
  spi: mediatek: handle controller_data in mtk_spi_setup
  spi: mediatek: remove mtk_spi_config
  spi: mediatek: Update document devicetree bindings to support multiple devices
  spi: fix kernel-doc warnings about missing return desc in spi.c
  spi: fix kernel-doc warnings about missing return desc in spi.h
  spi: pxa2xx: Align a few defines
  spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select
  ...
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'spi/topic/omap-100k', 'spi/topic/omap-uwire', 'spi/topic/owner', 'spi/topic/pxa' and 'spi/topic/pxa2xx' into spi-next</title>
<updated>2015-11-04T11:02:12+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2015-11-04T11:02:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c84518523f888994c618585021c76fa499d465e'/>
<id>urn:sha1:4c84518523f888994c618585021c76fa499d465e</id>
<content type='text'>
</content>
</entry>
</feed>
