<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/leds.h, branch tegra-10.11.4</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: leds-gpio: Change blink_set callback to be able to turn off blinking</title>
<updated>2010-05-26T12:07:55+00:00</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2010-05-22T10:54:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2146325df2c2640059a9e064890c30c6e259b458'/>
<id>2146325df2c2640059a9e064890c30c6e259b458</id>
<content type='text'>
The leds-gpio blink_set() callback follows the same prototype as the
main leds subsystem blink_set() one.

The problem is that to stop blink, normally, a leds driver does it
in the brightness_set() callback when asked to set a new fixed value.

However, with leds-gpio, the platform has no hook to do so, as this
later callback results in a standard GPIO manipulation.

This changes the leds-gpio specific callback to take a new argument
that indicates whether the LED should be blinking or not and in what
state it should be set if not. We also update the dns323 platform
which seems to be the only user of this so far.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The leds-gpio blink_set() callback follows the same prototype as the
main leds subsystem blink_set() one.

The problem is that to stop blink, normally, a leds driver does it
in the brightness_set() callback when asked to set a new fixed value.

However, with leds-gpio, the platform has no hook to do so, as this
later callback results in a standard GPIO manipulation.

This changes the leds-gpio specific callback to take a new argument
that indicates whether the LED should be blinking or not and in what
state it should be set if not. We also update the dns323 platform
which seems to be the only user of this so far.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Futher document blink_set</title>
<updated>2009-06-23T19:21:39+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>rpurdie@linux.intel.com</email>
</author>
<published>2009-06-22T13:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a1dd8c617217322614f0465ae347895c4b58e1ab'/>
<id>a1dd8c617217322614f0465ae347895c4b58e1ab</id>
<content type='text'>
Futher document blink_set function pointer

Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Futher document blink_set function pointer

Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Add options to have GPIO LEDs start on or keep their state</title>
<updated>2009-06-23T19:21:39+00:00</updated>
<author>
<name>Trent Piepho</name>
<email>xyzzy@speakeasy.org</email>
</author>
<published>2009-05-12T22:33:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ed88bae6918fa990cbfe47316bd0f790121aaf00'/>
<id>ed88bae6918fa990cbfe47316bd0f790121aaf00</id>
<content type='text'>
There already is a "default-on" trigger but there are problems with it.

For one, it's a inefficient way to do it and requires led trigger support
to be compiled in.

But the real reason is that is produces a glitch on the LED.  The GPIO is
allocate with the LED *off*, then *later* when the trigger runs it is
turned back on.  If the LED was already on via the GPIO's reset default or
action of the firmware, this produces a glitch where the LED goes from on
to off to on.  While normally this is fast enough that it wouldn't be
noticeable to a human observer, there are still serious problems.

One is that there may be something else on the GPIO line, like a hardware
alarm or watchdog, that is fast enough to notice the glitch.

Another is that the kernel may panic before the LED is turned back on, thus
hanging with the LED in the wrong state.  This is not just speculation, but
actually happened to me with an embedded system that has an LED which
should turn off when the kernel finishes booting, which was left in the
incorrect state due to a bug in the OF LED binding code.

We also let GPIO LEDs get their initial value from whatever the current
state of the GPIO line is.  On some systems the LEDs are put into some
state by the firmware or hardware before Linux boots, and it is desired to
have them keep this state which is otherwise unknown to Linux.

This requires that the underlying GPIO driver support reading the value of
output GPIOs.  Some drivers support this and some do not.

The platform device binding gains a field in the platform data
"default_state" that controls this.  There are three constants defined to
select from on, off, or keeping the current state.  The OpenFirmware
binding uses a property named "default-state" that can be set to "on",
"off", or "keep".  The default if the property isn't present is off.

Signed-off-by: Trent Piepho &lt;xyzzy@speakeasy.org&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Acked-by: Sean MacLennan &lt;smaclennan@pikatech.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There already is a "default-on" trigger but there are problems with it.

For one, it's a inefficient way to do it and requires led trigger support
to be compiled in.

But the real reason is that is produces a glitch on the LED.  The GPIO is
allocate with the LED *off*, then *later* when the trigger runs it is
turned back on.  If the LED was already on via the GPIO's reset default or
action of the firmware, this produces a glitch where the LED goes from on
to off to on.  While normally this is fast enough that it wouldn't be
noticeable to a human observer, there are still serious problems.

One is that there may be something else on the GPIO line, like a hardware
alarm or watchdog, that is fast enough to notice the glitch.

Another is that the kernel may panic before the LED is turned back on, thus
hanging with the LED in the wrong state.  This is not just speculation, but
actually happened to me with an embedded system that has an LED which
should turn off when the kernel finishes booting, which was left in the
incorrect state due to a bug in the OF LED binding code.

We also let GPIO LEDs get their initial value from whatever the current
state of the GPIO line is.  On some systems the LEDs are put into some
state by the firmware or hardware before Linux boots, and it is desired to
have them keep this state which is otherwise unknown to Linux.

This requires that the underlying GPIO driver support reading the value of
output GPIOs.  Some drivers support this and some do not.

The platform device binding gains a field in the platform data
"default_state" that controls this.  There are three constants defined to
select from on, off, or keeping the current state.  The OpenFirmware
binding uses a property named "default-state" that can be set to "on",
"off", or "keep".  The default if the property isn't present is off.

Signed-off-by: Trent Piepho &lt;xyzzy@speakeasy.org&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Acked-by: Sean MacLennan &lt;smaclennan@pikatech.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Further document parameters for blink_set()</title>
<updated>2009-06-23T19:20:35+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2009-06-11T13:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=92722b1bb1ebcba767f9c6ee499992ee33367268'/>
<id>92722b1bb1ebcba767f9c6ee499992ee33367268</id>
<content type='text'>
The documentation for the parameters of blink_set() was a bit hard
to find so put some where I'd expected to find it.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documentation for the parameters of blink_set() was a bit hard
to find so put some where I'd expected to find it.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Add suspend/resume state flags to leds-gpio</title>
<updated>2009-04-06T15:06:26+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>rpurdie@linux.intel.com</email>
</author>
<published>2009-02-17T15:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=defb512d2576992c63ba1c18c24eea31cfeaa26e'/>
<id>defb512d2576992c63ba1c18c24eea31cfeaa26e</id>
<content type='text'>
Add an option to preserve LED state when suspending/resuming to the LED
gpio driver. Based on a suggestion from Robert Jarzmik.

Tested-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an option to preserve LED state when suspending/resuming to the LED
gpio driver. Based on a suggestion from Robert Jarzmik.

Tested-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: allow led-drivers to use a variable range of brightness values</title>
<updated>2009-04-06T15:06:25+00:00</updated>
<author>
<name>Guennadi Liakhovetski</name>
<email>lg@denx.de</email>
</author>
<published>2009-01-10T18:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1bd465e6b0e2b559db47420fea686507a01cfab0'/>
<id>1bd465e6b0e2b559db47420fea686507a01cfab0</id>
<content type='text'>
This patch allows drivers to override the default maximum brightness value
of 255.  We take care to preserve backwards-compatibility as much as
possible, so that user-space ABI doesn't change for existing drivers.
LED trigger code has also been updated to use the per-LED maximum.

Signed-off-by: Guennadi Liakhovetski &lt;lg@denx.de&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch allows drivers to override the default maximum brightness value
of 255.  We take care to preserve backwards-compatibility as much as
possible, so that user-space ABI doesn't change for existing drivers.
LED trigger code has also been updated to use the per-LED maximum.

Signed-off-by: Guennadi Liakhovetski &lt;lg@denx.de&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Add suspend/resume to the core class</title>
<updated>2009-01-08T17:55:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>rpurdie@linux.intel.com</email>
</author>
<published>2009-01-08T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=859cb7f2a4244ea6da206d3fe9cc8a6810947a68'/>
<id>859cb7f2a4244ea6da206d3fe9cc8a6810947a68</id>
<content type='text'>
Add suspend/resume to the core class and remove all the now unneeded
code from various drivers. Originally the class code couldn't support
suspend/resume but since class_device can there is no reason for
each driver doing its own suspend/resume anymore.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add suspend/resume to the core class and remove all the now unneeded
code from various drivers. Originally the class code couldn't support
suspend/resume but since class_device can there is no reason for
each driver doing its own suspend/resume anymore.
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Make header variable naming consistent</title>
<updated>2009-01-08T12:38:57+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2008-11-17T14:35:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e2387d6c20752ccdb2895ba5de664fa39652f4cc'/>
<id>e2387d6c20752ccdb2895ba5de664fa39652f4cc</id>
<content type='text'>
There is one place where the struct led_classdev as the function
argument is named differently. Fix it.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is one place where the struct led_classdev as the function
argument is named differently. Fix it.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Make default trigger fields const</title>
<updated>2008-10-20T21:34:12+00:00</updated>
<author>
<name>Trent Piepho</name>
<email>tpiepho@freescale.com</email>
</author>
<published>2008-10-13T09:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=326bb8a5a12c6298a6bf6c74af490b1858b2f12c'/>
<id>326bb8a5a12c6298a6bf6c74af490b1858b2f12c</id>
<content type='text'>
The default_trigger fields of struct gpio_led and thus struct
led_classdev are pretty much always assigned from a string literal,
which means the string can't be modified.  Which is fine, since there is
no reason to modify the string and in fact it never is.

But they should be marked const to prevent such code from being added,
to prevent warnings if -Wwrite-strings is used, when assigned from a
constant string other than a string literal (which produces a warning
under current kernel compiler flags), and for general good coding
practices.

Signed-off-by: Trent Piepho &lt;tpiepho@freescale.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default_trigger fields of struct gpio_led and thus struct
led_classdev are pretty much always assigned from a string literal,
which means the string can't be modified.  Which is fine, since there is
no reason to modify the string and in fact it never is.

But they should be marked const to prevent such code from being added,
to prevent warnings if -Wwrite-strings is used, when assigned from a
constant string other than a string literal (which produces a warning
under current kernel compiler flags), and for general good coding
practices.

Signed-off-by: Trent Piepho &lt;tpiepho@freescale.com&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Add support for Philips PCA955x I2C LED drivers</title>
<updated>2008-07-23T08:49:56+00:00</updated>
<author>
<name>Nate Case</name>
<email>ncase@xes-inc.com</email>
</author>
<published>2008-07-16T21:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f46e9203d9a100bae216cc06e17f2e77351aa8d8'/>
<id>f46e9203d9a100bae216cc06e17f2e77351aa8d8</id>
<content type='text'>
This driver supports the PCA9550, PCA9551, PCA9552, and PCA9553
LED driver chips.

Signed-off-by: Nate Case &lt;ncase@xes-inc.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@rpsys.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This driver supports the PCA9550, PCA9551, PCA9552, and PCA9553
LED driver chips.

Signed-off-by: Nate Case &lt;ncase@xes-inc.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Richard Purdie &lt;rpurdie@rpsys.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
