<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/leds, branch linux-3.14.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger</title>
<updated>2015-08-03T16:29:51+00:00</updated>
<author>
<name>Grygorii Strashko</name>
<email>Grygorii.Strashko@linaro.org</email>
</author>
<published>2015-04-24T11:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d7fef973f424d06d0dad557ab14fb29cc601a233'/>
<id>d7fef973f424d06d0dad557ab14fb29cc601a233</id>
<content type='text'>
commit 084609bf727981c7a2e6e69aefe0052c9d793300 upstream.

Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
hibernation callbacks means those pm functions will not be
called upon hibernation - that leads to system crash on ARM during
freezing if gpio-led is used in combination with CPU led trigger.
It may happen after freeze_noirq stage (GPIO is suspended)
and before syscore_suspend stage (CPU led trigger is suspended)
- usually when disable_nonboot_cpus() is called.

Log:
  PM: noirq freeze of devices complete after 1.425 msecs
  Disabling non-boot CPUs ...
    ^ system may crash or stuck here with message (TI AM572x)

  WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
  44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access

  CPU1: shutdown
    ^ or here

Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
assigns the suspend and hibernation callbacks and move
led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
build warnings.

Fixes: 73e1ab41a80d (leds: Convert led class driver from legacy pm ops to dev_pm_ops)
Signed-off-by: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;
Acked-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 084609bf727981c7a2e6e69aefe0052c9d793300 upstream.

Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
hibernation callbacks means those pm functions will not be
called upon hibernation - that leads to system crash on ARM during
freezing if gpio-led is used in combination with CPU led trigger.
It may happen after freeze_noirq stage (GPIO is suspended)
and before syscore_suspend stage (CPU led trigger is suspended)
- usually when disable_nonboot_cpus() is called.

Log:
  PM: noirq freeze of devices complete after 1.425 msecs
  Disabling non-boot CPUs ...
    ^ system may crash or stuck here with message (TI AM572x)

  WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
  44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access

  CPU1: shutdown
    ^ or here

Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
assigns the suspend and hibernation callbacks and move
led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
build warnings.

Fixes: 73e1ab41a80d (leds: Convert led class driver from legacy pm ops to dev_pm_ops)
Signed-off-by: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;
Acked-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>leds: leds-pwm: properly clean up after probe failure</title>
<updated>2014-06-07T17:28:18+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2014-04-06T22:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7a5db34ad2ea9a97448904a8a9e6e49d82e9d133'/>
<id>7a5db34ad2ea9a97448904a8a9e6e49d82e9d133</id>
<content type='text'>
commit 392369019eb96e914234ea21eda806cb51a1073e upstream.

When probing with DT, we add each LED one at a time.  If we find a LED
without a PWM device (because it is not available yet) we fail the
initialisation, unregister previous LEDs, and then by way of managed
resources, we free the structure.

The problem with this is we may have a scheduled and active work_struct
in this structure, and this results in a nasty kernel oops.

We need to cancel this work_struct properly upon cleanup - and the
cleanup we require is the same cleanup as we do when the LED platform
device is removed.  Rather than writing this same code three times,
move it into a separate function and use it in all three places.

Fixes: c971ff185f64 ("leds: leds-pwm: Defer led_pwm_set() if PWM can sleep")
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 392369019eb96e914234ea21eda806cb51a1073e upstream.

When probing with DT, we add each LED one at a time.  If we find a LED
without a PWM device (because it is not available yet) we fail the
initialisation, unregister previous LEDs, and then by way of managed
resources, we free the structure.

The problem with this is we may have a scheduled and active work_struct
in this structure, and this results in a nasty kernel oops.

We need to cancel this work_struct properly upon cleanup - and the
cleanup we require is the same cleanup as we do when the LED platform
device is removed.  Rather than writing this same code three times,
move it into a separate function and use it in all three places.

Fixes: c971ff185f64 ("leds: leds-pwm: Defer led_pwm_set() if PWM can sleep")
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds</title>
<updated>2014-01-29T02:53:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-01-29T02:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=268943fb7529a15254a5247372119ba4bd735e94'/>
<id>268943fb7529a15254a5247372119ba4bd735e94</id>
<content type='text'>
Pull LED subsystem update from Bryan Wu:
 "Basically this cycle is mostly cleanup for LED subsystem"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: s3c24xx: Remove hardware.h inclusion
  leds: replace list_for_each with list_for_each_entry
  leds: kirkwood: Cleanup in header files
  leds: pwm: Remove a warning on non-DT platforms
  leds: leds-pwm: fix duty time overflow.
  leds: leds-mc13783: Remove unneeded mc13xxx_{un}lock
  leds: leds-mc13783: Remove duplicate field in platform data
  drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'
  leds: lp5523: Support LED MUX configuration on running a pattern
  leds: lp5521/5523: Fix multiple engine usage bug
  LEDS: tca6507 - fix up some comments.
  LEDS: tca6507: add device-tree support for GPIO configuration.
  LEDS: tca6507 - fix bugs in parsing of device-tree configuration.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull LED subsystem update from Bryan Wu:
 "Basically this cycle is mostly cleanup for LED subsystem"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: s3c24xx: Remove hardware.h inclusion
  leds: replace list_for_each with list_for_each_entry
  leds: kirkwood: Cleanup in header files
  leds: pwm: Remove a warning on non-DT platforms
  leds: leds-pwm: fix duty time overflow.
  leds: leds-mc13783: Remove unneeded mc13xxx_{un}lock
  leds: leds-mc13783: Remove duplicate field in platform data
  drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'
  leds: lp5523: Support LED MUX configuration on running a pattern
  leds: lp5521/5523: Fix multiple engine usage bug
  LEDS: tca6507 - fix up some comments.
  LEDS: tca6507: add device-tree support for GPIO configuration.
  LEDS: tca6507 - fix bugs in parsing of device-tree configuration.
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: s3c24xx: Remove hardware.h inclusion</title>
<updated>2014-01-28T01:28:53+00:00</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2014-01-03T06:30:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3cb6f44aedf519dce4a9106dec675b94d675c539'/>
<id>3cb6f44aedf519dce4a9106dec675b94d675c539</id>
<content type='text'>
The contents of this header file is not referenced in the led driver.
Remove its inclusion. While at it, re-arrange the headers as per the
category.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The contents of this header file is not referenced in the led driver.
Remove its inclusion. While at it, re-arrange the headers as per the
category.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: replace list_for_each with list_for_each_entry</title>
<updated>2014-01-28T01:28:52+00:00</updated>
<author>
<name>ZHAO Gang</name>
<email>gamerh2o@gmail.com</email>
</author>
<published>2013-12-28T15:00:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=11e043b53c3d4fbcbf91761b8dfd885da6fc8eff'/>
<id>11e043b53c3d4fbcbf91761b8dfd885da6fc8eff</id>
<content type='text'>
Use the more convenient macro.

Signed-off-by: ZHAO Gang &lt;gamerh2o@gmail.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the more convenient macro.

Signed-off-by: ZHAO Gang &lt;gamerh2o@gmail.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: pwm: Remove a warning on non-DT platforms</title>
<updated>2014-01-28T01:28:51+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2013-12-12T00:11:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=33fc94506bae75341f083b79e6c2a0ff086a8810'/>
<id>33fc94506bae75341f083b79e6c2a0ff086a8810</id>
<content type='text'>
This removes a warning on non-DT-enabled platforms:

drivers/leds/leds-pwm.c: In function 'led_pwm_create_of':
drivers/leds/leds-pwm.c:88:22: warning: unused variable 'node'

Really caused by the local variable that is assigned to and then never
used. Just do away with the local var, it's not needed.

Technically this code path can never be entered without DT enabled,
since there's an earlier check about number of children in the calling
function, but the compiler can't see that.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes a warning on non-DT-enabled platforms:

drivers/leds/leds-pwm.c: In function 'led_pwm_create_of':
drivers/leds/leds-pwm.c:88:22: warning: unused variable 'node'

Really caused by the local variable that is assigned to and then never
used. Just do away with the local var, it's not needed.

Technically this code path can never be entered without DT enabled,
since there's an earlier check about number of children in the calling
function, but the compiler can't see that.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: leds-pwm: fix duty time overflow.</title>
<updated>2014-01-28T01:28:50+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>Li.Xiubo@freescale.com</email>
</author>
<published>2013-12-11T09:19:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fc1aee038b609dc33067ca9dd477b16ea893cae0'/>
<id>fc1aee038b609dc33067ca9dd477b16ea893cae0</id>
<content type='text'>
Overflow maybe occurs when calculates the duty time. For instance,
the period time is 990000000ns, and the max_brightness is 127, when
setting the brightness to 12, the duty value will be 25906026ns, but
it should be 93543307ns.

Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Overflow maybe occurs when calculates the duty time. For instance,
the period time is 990000000ns, and the max_brightness is 127, when
setting the brightness to 12, the duty value will be 25906026ns, but
it should be 93543307ns.

Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: leds-mc13783: Remove unneeded mc13xxx_{un}lock</title>
<updated>2014-01-28T01:28:50+00:00</updated>
<author>
<name>Alexander Shiyan</name>
<email>shc_work@mail.ru</email>
</author>
<published>2013-12-07T06:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3df22c06b9ca7df02e095595994d229811305825'/>
<id>3df22c06b9ca7df02e095595994d229811305825</id>
<content type='text'>
LED registers are used only in this driver, so no additional
locking is needed. Read-Modify-Write cycle in workqueue is already
protected by regmap.

Signed-off-by: Alexander Shiyan &lt;shc_work@mail.ru&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LED registers are used only in this driver, so no additional
locking is needed. Read-Modify-Write cycle in workqueue is already
protected by regmap.

Signed-off-by: Alexander Shiyan &lt;shc_work@mail.ru&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: leds-mc13783: Remove duplicate field in platform data</title>
<updated>2014-01-28T01:28:49+00:00</updated>
<author>
<name>Alexander Shiyan</name>
<email>shc_work@mail.ru</email>
</author>
<published>2013-12-07T06:22:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=01a7a063e8cf4bc09af2c02d28c12f3d72bf9649'/>
<id>01a7a063e8cf4bc09af2c02d28c12f3d72bf9649</id>
<content type='text'>
LED platform data are overwhelmed by excessive field "max_cur"
which just replicates few bits of "led_control" field.
This patch removes this field and adds a definition for the
current settings in the header.

Signed-off-by: Alexander Shiyan &lt;shc_work@mail.ru&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LED platform data are overwhelmed by excessive field "max_cur"
which just replicates few bits of "led_control" field.
This patch removes this field and adds a definition for the
current settings in the header.

Signed-off-by: Alexander Shiyan &lt;shc_work@mail.ru&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'</title>
<updated>2014-01-28T01:28:49+00:00</updated>
<author>
<name>Chen Gang</name>
<email>gang.chen.5i5j@gmail.com</email>
</author>
<published>2013-12-09T04:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=33ca15325ff371be7f20be7534f5aa5b6a00b558'/>
<id>33ca15325ff371be7f20be7534f5aa5b6a00b558</id>
<content type='text'>
Need check CONFIG_GPIOLIB whether defined, just like another area has
done within this file. Or can not pass compiling when CONFIG_GPIOLIB
disabled.

The related error (with allmodconfig for metag):

    CC [M]  drivers/leds/leds-tca6507.o
  drivers/leds/leds-tca6507.c: In function 'tca6507_led_dt_init':
  drivers/leds/leds-tca6507.c:731: error: 'struct tca6507_platform_data' has no member named 'gpio_base'

Signed-off-by: Chen Gang &lt;gang.chen.5i5j@gmail.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Need check CONFIG_GPIOLIB whether defined, just like another area has
done within this file. Or can not pass compiling when CONFIG_GPIOLIB
disabled.

The related error (with allmodconfig for metag):

    CC [M]  drivers/leds/leds-tca6507.o
  drivers/leds/leds-tca6507.c: In function 'tca6507_led_dt_init':
  drivers/leds/leds-tca6507.c:731: error: 'struct tca6507_platform_data' has no member named 'gpio_base'

Signed-off-by: Chen Gang &lt;gang.chen.5i5j@gmail.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
