<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/leds, branch v3.5-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>leds: add LM3533 LED driver</title>
<updated>2012-05-29T23:22:32+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2012-05-29T22:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=401dea7f7ade662b77c33ce2498fb5b4f97cb29c'/>
<id>401dea7f7ade662b77c33ce2498fb5b4f97cb29c</id>
<content type='text'>
Add sub-driver for the LEDs on National Semiconductor / TI LM3533 lighting
power chips.

The chip provides 256 brightness levels, hardware accelerated blinking as
well as ambient-light-sensor and pwm input control.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Rob Landley &lt;rob@landley.net&gt;
Cc: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Cc: Jonathan Cameron &lt;jic23@cam.ac.uk&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add sub-driver for the LEDs on National Semiconductor / TI LM3533 lighting
power chips.

The chip provides 256 brightness levels, hardware accelerated blinking as
well as ambient-light-sensor and pwm input control.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Rob Landley &lt;rob@landley.net&gt;
Cc: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Cc: Jonathan Cameron &lt;jic23@cam.ac.uk&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/leds/leds-pca955x.c: fix race condition while setting brightness on several LEDs</title>
<updated>2012-05-29T23:22:32+00:00</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2012-05-29T22:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e7e11d8ba807d451857b5c68abe249c7fc2b980f'/>
<id>e7e11d8ba807d451857b5c68abe249c7fc2b980f</id>
<content type='text'>
When issuing the following command:

  for I in 0 1 2 3 4 5 6 7; do
    echo 0 &gt; /sys/class/leds/pca955x\:${I}/brightness;
  done

It is possible that all the pca955x_read_ls calls are done sequentially
before any pca955x_write_ls call is done.  This updates the LS only to
the last LED update in its set.

Fix this by using a global lock for the pca995x device during
pca955x_led_work.  Also used a struct for shared data betreen all LEDs.

[akpm@linux-foundation.org: revert unintentional rename of pca955x_ledsel()]
Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When issuing the following command:

  for I in 0 1 2 3 4 5 6 7; do
    echo 0 &gt; /sys/class/leds/pca955x\:${I}/brightness;
  done

It is possible that all the pca955x_read_ls calls are done sequentially
before any pca955x_write_ls call is done.  This updates the LS only to
the last LED update in its set.

Fix this by using a global lock for the pca995x device during
pca955x_led_work.  Also used a struct for shared data betreen all LEDs.

[akpm@linux-foundation.org: revert unintentional rename of pca955x_ledsel()]
Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: add new transient trigger for one shot timer activation</title>
<updated>2012-05-29T23:22:32+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkhan@gmail.com</email>
</author>
<published>2012-05-29T22:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=44e1e9f8e70506728b02a18e6d03599a6485d67f'/>
<id>44e1e9f8e70506728b02a18e6d03599a6485d67f</id>
<content type='text'>
The leds timer trigger does not currently have an interface to activate a
one shot timer.  The current support allows for setting two timers, one
for specifying how long a state to be on, and the second for how long the
state to be off.  The delay_on value specifies the time period an LED
should stay in on state, followed by a delay_off value that specifies how
long the LED should stay in off state.  The on and off cycle repeats until
the trigger gets deactivated.  There is no provision for one time
activation to implement features that require an on or off state to be
held just once and then stay in the original state forever.

Without one shot timer interface, user space can still use timer trigger
to set a timer to hold a state, however when user space application
crashes or goes away without deactivating the timer, the hardware will be
left in that state permanently.

As a specific example of this use-case, let's look at vibrate feature on
phones.  Vibrate function on phones is implemented using PWM pins on SoC
or PMIC.  There is a need to activate one shot timer to control the
vibrate feature, to prevent user space crashes leaving the phone in
vibrate mode permanently causing the battery to drain.

This trigger exports three properties, activate, state, and duration When
transient trigger is activated these properties are set to default values.

- duration allows setting timer value in msecs. The initial value is 0.
- activate allows activating and deactivating the timer specified by
  duration as needed. The initial and default value is 0.  This will allow
  duration to be set after trigger activation.
- state allows user to specify a transient state to be held for the specified
  duration.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Jonas Bonn &lt;jonas@southpole.se&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The leds timer trigger does not currently have an interface to activate a
one shot timer.  The current support allows for setting two timers, one
for specifying how long a state to be on, and the second for how long the
state to be off.  The delay_on value specifies the time period an LED
should stay in on state, followed by a delay_off value that specifies how
long the LED should stay in off state.  The on and off cycle repeats until
the trigger gets deactivated.  There is no provision for one time
activation to implement features that require an on or off state to be
held just once and then stay in the original state forever.

Without one shot timer interface, user space can still use timer trigger
to set a timer to hold a state, however when user space application
crashes or goes away without deactivating the timer, the hardware will be
left in that state permanently.

As a specific example of this use-case, let's look at vibrate feature on
phones.  Vibrate function on phones is implemented using PWM pins on SoC
or PMIC.  There is a need to activate one shot timer to control the
vibrate feature, to prevent user space crashes leaving the phone in
vibrate mode permanently causing the battery to drain.

This trigger exports three properties, activate, state, and duration When
transient trigger is activated these properties are set to default values.

- duration allows setting timer value in msecs. The initial value is 0.
- activate allows activating and deactivating the timer specified by
  duration as needed. The initial and default value is 0.  This will allow
  duration to be set after trigger activation.
- state allows user to specify a transient state to be held for the specified
  duration.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Jonas Bonn &lt;jonas@southpole.se&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: heartbeat: stop on shutdown</title>
<updated>2012-05-29T23:22:32+00:00</updated>
<author>
<name>Alexander Holler</name>
<email>holler@ahsoftware.de</email>
</author>
<published>2012-05-29T22:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=49dca5aebfdeadd4bf27b6cb4c60392147dc35a4'/>
<id>49dca5aebfdeadd4bf27b6cb4c60392147dc35a4</id>
<content type='text'>
A halted kernel should not show a heartbeat.

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Cc: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A halted kernel should not show a heartbeat.

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Cc: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/leds/leds-lm3530.c: simplify als configuration on initialization</title>
<updated>2012-05-29T23:22:32+00:00</updated>
<author>
<name>Kim, Milo</name>
<email>Milo.Kim@ti.com</email>
</author>
<published>2012-05-29T22:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6335f8fa974bc284da0f55877935538e1d7b55eb'/>
<id>6335f8fa974bc284da0f55877935538e1d7b55eb</id>
<content type='text'>
For better code readability, ALS code is moved to new a function -
lm3530_als_configure()

Signed-off-by: Milo(Woogyom) Kim &lt;milo.kim@ti.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Shreshtha Kumar SAHU &lt;shreshthakumar.sahu@stericsson.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For better code readability, ALS code is moved to new a function -
lm3530_als_configure()

Signed-off-by: Milo(Woogyom) Kim &lt;milo.kim@ti.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Shreshtha Kumar SAHU &lt;shreshthakumar.sahu@stericsson.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: change ledtrig-timer to use activated flag</title>
<updated>2012-05-29T23:22:31+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkhan@gmail.com</email>
</author>
<published>2012-05-29T22:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1381187991a196a8a7d046e97bd50eec6c37e8df'/>
<id>1381187991a196a8a7d046e97bd50eec6c37e8df</id>
<content type='text'>
Change existing timer trigger to use the new -&gt;activated flag to set
activate successful status in activate routine and check it in deactivate
routine to do cleanup.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change existing timer trigger to use the new -&gt;activated flag to set
activate successful status in activate routine and check it in deactivate
routine to do cleanup.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: change existing triggers to use activated flag</title>
<updated>2012-05-29T23:22:31+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkhan@gmail.com</email>
</author>
<published>2012-05-29T22:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=03c091e5b726ada6aaf9af1d0e973679099101e4'/>
<id>03c091e5b726ada6aaf9af1d0e973679099101e4</id>
<content type='text'>
Change existing triggers backlight, gpio, and heartbeat to use the new
-&gt;activated flag to set activate successful status in their activate
routines and check it in their deactivate routines to do cleanup.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change existing triggers backlight, gpio, and heartbeat to use the new
-&gt;activated flag to set activate successful status in their activate
routines and check it in their deactivate routines to do cleanup.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Use kcalloc instead of kzalloc to allocate array</title>
<updated>2012-05-29T23:22:31+00:00</updated>
<author>
<name>Thomas Meyer</name>
<email>thomas@m3y3r.de</email>
</author>
<published>2012-05-29T22:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1daef6d27b558d0bde72302ba7062b746887a643'/>
<id>1daef6d27b558d0bde72302ba7062b746887a643</id>
<content type='text'>
The advantage of kcalloc is that will prevent integer overflows which
could result from the multiplication of number of elements and size and it
is also a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The advantage of kcalloc is that will prevent integer overflows which
could result from the multiplication of number of elements and size and it
is also a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: simple_strtoul() cleanup</title>
<updated>2012-05-29T23:22:31+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkhan@gmail.com</email>
</author>
<published>2012-05-29T22:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=872b86be0a285b11b03614456b67fdaf78e86f3d'/>
<id>872b86be0a285b11b03614456b67fdaf78e86f3d</id>
<content type='text'>
led-class.c and ledtrig-timer.c still use simple_strtoul().  Change them
to use kstrtoul() instead of obsolete simple_strtoul().

Also fix the existing int ret declaration to be ssize_t to match the
return type for _store functions in ledtrig-timer.c.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
led-class.c and ledtrig-timer.c still use simple_strtoul().  Change them
to use kstrtoul() instead of obsolete simple_strtoul().

Also fix the existing int ret declaration to be ssize_t to match the
return type for _store functions in ledtrig-timer.c.

Signed-off-by: Shuah Khan &lt;shuahkhan@gmail.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: driver for DA9052/53 PMIC v2</title>
<updated>2012-05-29T23:22:31+00:00</updated>
<author>
<name>David Dajun Chen</name>
<email>dchen@diasemi.com</email>
</author>
<published>2012-05-29T22:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5ba736311bf6fea25c97e868b7de6d3de8800aba'/>
<id>5ba736311bf6fea25c97e868b7de6d3de8800aba</id>
<content type='text'>
LED Driver for Dialog Semiconductor DA9052/53 PMICs.

[akpm@linux-foundation.org: make led_reg static]
Signed-off-by: David Dajun Chen &lt;dchen@diasemi.com&gt;
Signed-off-by: Ashish Jangam &lt;ashish.jangam@kpitcummins.com&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LED Driver for Dialog Semiconductor DA9052/53 PMICs.

[akpm@linux-foundation.org: make led_reg static]
Signed-off-by: David Dajun Chen &lt;dchen@diasemi.com&gt;
Signed-off-by: Ashish Jangam &lt;ashish.jangam@kpitcummins.com&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
