<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/leds, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-04T07:55:19Z</updated>
<entry>
<title>leds: heartbeat: fix bug on panic</title>
<updated>2012-07-04T07:55:19Z</updated>
<author>
<name>Alexander Holler</name>
<email>holler@ahsoftware.de</email>
</author>
<published>2012-07-03T06:35:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb31fbeb647ed1910290712c13f11f1db09e5506'/>
<id>urn:sha1:fb31fbeb647ed1910290712c13f11f1db09e5506</id>
<content type='text'>
With commit 49dca5aebfdeadd4bf27b6cb4c60392147dc35a4 I introduced
a bug (visible if CONFIG_PROVE_RCU is enabled) which occures when a panic
has happened:

[ 1526.520230] ===============================
[ 1526.520230] [ INFO: suspicious RCU usage. ]
[ 1526.520230] 3.5.0-rc1+ #12 Not tainted
[ 1526.520230] -------------------------------
[ 1526.520230] /c/kernel-tests/mm/include/linux/rcupdate.h:436 Illegal context switch in RCU read-side critical section!
[ 1526.520230]
[ 1526.520230] other info that might help us debug this:
[ 1526.520230]
[ 1526.520230]
[ 1526.520230] rcu_scheduler_active = 1, debug_locks = 0
[ 1526.520230] 3 locks held by net.agent/3279:
[ 1526.520230]  #0:  (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff82f85962&gt;] do_page_fault+0x193/0x390
[ 1526.520230]  #1:  (panic_lock){+.+...}, at: [&lt;ffffffff82ed2830&gt;] panic+0x37/0x1d3
[ 1526.520230]  #2:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff810b9b28&gt;] rcu_lock_acquire+0x0/0x29
[ 1526.520230]
[ 1526.520230] stack backtrace:
[ 1526.520230] Pid: 3279, comm: net.agent Not tainted 3.5.0-rc1+ #12
[ 1526.520230] Call Trace:
[ 1526.520230]  [&lt;ffffffff810e1570&gt;] lockdep_rcu_suspicious+0x109/0x112
[ 1526.520230]  [&lt;ffffffff810bfe3a&gt;] rcu_preempt_sleep_check+0x45/0x47
[ 1526.520230]  [&lt;ffffffff810bfe5a&gt;] __might_sleep+0x1e/0x19a
[ 1526.520230]  [&lt;ffffffff82f8010e&gt;] down_write+0x26/0x81
[ 1526.520230]  [&lt;ffffffff8276a966&gt;] led_trigger_unregister+0x1f/0x9c
[ 1526.520230]  [&lt;ffffffff8276def5&gt;] heartbeat_reboot_notifier+0x15/0x19
[ 1526.520230]  [&lt;ffffffff82f85bf5&gt;] notifier_call_chain+0x96/0xcd
[ 1526.520230]  [&lt;ffffffff82f85cba&gt;] __atomic_notifier_call_chain+0x8e/0xff
[ 1526.520230]  [&lt;ffffffff81094b7c&gt;] ? kmsg_dump+0x37/0x1eb
[ 1526.520230]  [&lt;ffffffff82f85d3f&gt;] atomic_notifier_call_chain+0x14/0x16
[ 1526.520230]  [&lt;ffffffff82ed28e1&gt;] panic+0xe8/0x1d3
[ 1526.520230]  [&lt;ffffffff811473e2&gt;] out_of_memory+0x15d/0x1d3

So in case of a panic, now just turn of the LED. Other approaches like
scheduling a work to unregister the trigger aren't working because there
isn't much which still runs after a panic occured (except timers).

Signed-off-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Signed-off-by: Bryan Wu &lt;bryan.wu@canonical.com&gt;
</content>
</entry>
<entry>
<title>leds: Make LEDS_ASIC3 and LEDS_RENESAS_TPU depend on LEDS_CLASS=y</title>
<updated>2012-06-12T02:56:25Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-06-08T23:41:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9473c4c16700ec965904f23234fd0f8677ce6231'/>
<id>urn:sha1:9473c4c16700ec965904f23234fd0f8677ce6231</id>
<content type='text'>
Otherwise, I got below build error when CONFIG_LEDS_CLASS=m.

  LD      init/built-in.o
drivers/built-in.o: In function `asic3_led_probe':
clkdev.c:(.devinit.text+0x4680): undefined reference to `led_classdev_register'
drivers/built-in.o: In function `r_tpu_probe':
clkdev.c:(.devinit.text+0x4838): undefined reference to `led_classdev_register'
drivers/built-in.o: In function `asic3_led_remove':
clkdev.c:(.devexit.text+0x564): undefined reference to `led_classdev_unregister'
drivers/built-in.o: In function `r_tpu_remove':
clkdev.c:(.devexit.text+0x5a0): undefined reference to `led_classdev_unregister'
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Bryan Wu &lt;bryan.wu@canonical.com&gt;
</content>
</entry>
<entry>
<title>leds: fixed a coding style issue.</title>
<updated>2012-06-12T02:56:24Z</updated>
<author>
<name>Jeffrin Jose</name>
<email>ahiliation@yahoo.co.in</email>
</author>
<published>2012-06-03T12:11:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9cd5ec5e5447f99ffb33ce39c1fcd0e3306e11d1'/>
<id>urn:sha1:9cd5ec5e5447f99ffb33ce39c1fcd0e3306e11d1</id>
<content type='text'>
Fixed a coding style issue relating to trailing
white space error found by checkpatch.pl tool in drivers/leds/led-class.c

Signed-off-by: Jeffrin Jose &lt;ahiliation@yahoo.co.in&gt;
Signed-off-by: Bryan Wu &lt;bryan.wu@canonical.com&gt;
</content>
</entry>
<entry>
<title>leds: don't disable blinking when writing the same value to delay_on or delay_off</title>
<updated>2012-06-12T02:56:24Z</updated>
<author>
<name>Rafal Prylowski</name>
<email>prylowski@metasoft.pl</email>
</author>
<published>2012-05-28T15:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fbd8716da4c69ddbb76c022f3f4a0d50723c68f'/>
<id>urn:sha1:3fbd8716da4c69ddbb76c022f3f4a0d50723c68f</id>
<content type='text'>
Function led_set_software_blink() assumes that blink timer is still running,
but commit 488bc35bf40df89d37486c1826b178a2fba36ce7 introduced disabling
of blink timer before each call to led_set_software_blink().

Correct led_software_blink():
1) remove protection against reprogramming blink timer to the same values,
   because it only disables blinking now,
2) remove unnecessary call to led_stop_software_blink().

Signed-off-by: Rafal Prylowski &lt;prylowski@metasoft.pl&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Bryan Wu &lt;bryan.wu@canonical.com&gt;
</content>
</entry>
<entry>
<title>leds: add LM3533 LED driver</title>
<updated>2012-05-29T23:22:32Z</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2012-05-29T22:07:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=401dea7f7ade662b77c33ce2498fb5b4f97cb29c'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drivers/leds/leds-pca955x.c: fix race condition while setting brightness on several LEDs</title>
<updated>2012-05-29T23:22:32Z</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2012-05-29T22:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7e11d8ba807d451857b5c68abe249c7fc2b980f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>leds: add new transient trigger for one shot timer activation</title>
<updated>2012-05-29T23:22:32Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkhan@gmail.com</email>
</author>
<published>2012-05-29T22:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=44e1e9f8e70506728b02a18e6d03599a6485d67f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>leds: heartbeat: stop on shutdown</title>
<updated>2012-05-29T23:22:32Z</updated>
<author>
<name>Alexander Holler</name>
<email>holler@ahsoftware.de</email>
</author>
<published>2012-05-29T22:07:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49dca5aebfdeadd4bf27b6cb4c60392147dc35a4'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>drivers/leds/leds-lm3530.c: simplify als configuration on initialization</title>
<updated>2012-05-29T23:22:32Z</updated>
<author>
<name>Kim, Milo</name>
<email>Milo.Kim@ti.com</email>
</author>
<published>2012-05-29T22:07:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6335f8fa974bc284da0f55877935538e1d7b55eb'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>leds: change ledtrig-timer to use activated flag</title>
<updated>2012-05-29T23:22:31Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkhan@gmail.com</email>
</author>
<published>2012-05-29T22:07:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1381187991a196a8a7d046e97bd50eec6c37e8df'/>
<id>urn:sha1: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>
</entry>
</feed>
