<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/leds/led-class.c, branch v4.1</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>leds: Don't treat the LED name as a format string</title>
<updated>2015-03-30T21:26:32+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@iki.fi</email>
</author>
<published>2015-03-26T23:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ccdc45075aeaaa144af4177b85570eb26c2f5a8b'/>
<id>ccdc45075aeaaa144af4177b85570eb26c2f5a8b</id>
<content type='text'>
The LED name was wrongly interpreted as format string. Stop doing that.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The LED name was wrongly interpreted as format string. Stop doing that.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Use log level warn instead of info when telling about a name clash</title>
<updated>2015-03-30T21:26:25+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@iki.fi</email>
</author>
<published>2015-03-26T23:42:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6f06c7f87cf54fa0fa6f95963d7c0d436eb56f43'/>
<id>6f06c7f87cf54fa0fa6f95963d7c0d436eb56f43</id>
<content type='text'>
The LED names are expected to be unique in the system. Use KERN_WARNING log
level to notify the user about the matter.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The LED names are expected to be unique in the system. Use KERN_WARNING log
level to notify the user about the matter.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds/led-class: Handle LEDs with the same name</title>
<updated>2015-03-30T18:55:57+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2015-03-30T17:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a96aa64cb5723d941de879a9cd1fea025d6acb1b'/>
<id>a96aa64cb5723d941de879a9cd1fea025d6acb1b</id>
<content type='text'>
The current code expected that every LED had an unique name. This is a
legit expectation when the device tree can no be modified or extended.
But with device tree overlays this requirement can be easily broken.

This patch finds out if the name is already in use and adds the suffix
_1, _2... if not.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.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 current code expected that every LED had an unique name. This is a
legit expectation when the device tree can no be modified or extended.
But with device tree overlays this requirement can be easily broken.

This patch finds out if the name is already in use and adds the suffix
_1, _2... if not.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Introduce devres helper for led_classdev_register</title>
<updated>2015-03-09T20:43:41+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@sonymobile.com</email>
</author>
<published>2015-02-24T00:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ca1bb4ee4c3a017bb66840d11d5efdf4e8f3f66d'/>
<id>ca1bb4ee4c3a017bb66840d11d5efdf4e8f3f66d</id>
<content type='text'>
(cooloney@gmail.com: add _unregister function into the document)

Suggested-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@sonymobile.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>
(cooloney@gmail.com: add _unregister function into the document)

Suggested-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@sonymobile.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Add LED Flash class extension to the LED subsystem</title>
<updated>2015-01-26T22:59:08+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2015-01-09T15:22:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7aea8389a77abf9fde254aca2434a605c7704f58'/>
<id>7aea8389a77abf9fde254aca2434a605c7704f58</id>
<content type='text'>
Some LED devices support two operation modes - torch and flash.
This patch provides support for flash LED devices in the LED subsystem
by introducing new sysfs attributes and kernel internal interface.
The attributes being introduced are: flash_brightness, flash_strobe,
flash_timeout, max_flash_timeout, max_flash_brightness, flash_fault,
flash_sync_strobe and available_sync_leds. All the flash related
features are placed in a separate module.

The modifications aim to be compatible with V4L2 framework requirements
related to the flash devices management. The design assumes that V4L2
sub-device can take of the LED class device control and communicate
with it through the kernel internal interface. When V4L2 Flash sub-device
file is opened, the LED class device sysfs interface is made
unavailable.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some LED devices support two operation modes - torch and flash.
This patch provides support for flash LED devices in the LED subsystem
by introducing new sysfs attributes and kernel internal interface.
The attributes being introduced are: flash_brightness, flash_strobe,
flash_timeout, max_flash_timeout, max_flash_brightness, flash_fault,
flash_sync_strobe and available_sync_leds. All the flash related
features are placed in a separate module.

The modifications aim to be compatible with V4L2 framework requirements
related to the flash devices management. The design assumes that V4L2
sub-device can take of the LED class device control and communicate
with it through the kernel internal interface. When V4L2 Flash sub-device
file is opened, the LED class device sysfs interface is made
unavailable.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Use setup_timer</title>
<updated>2015-01-14T18:40:20+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2014-12-26T14:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=137fe48d3956a1acfe1851d07ef1fc30fa405e84'/>
<id>137fe48d3956a1acfe1851d07ef1fc30fa405e84</id>
<content type='text'>
Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression t,f,d;
@@

-init_timer(&amp;t);
+setup_timer(&amp;t,f,d);
-t.function = f;
-t.data = d;
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression t,f,d;
@@

-init_timer(&amp;t);
+setup_timer(&amp;t,f,d);
-t.function = f;
-t.data = d;
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Add support for setting brightness in a synchronous way</title>
<updated>2014-11-14T22:29:35+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2014-11-14T10:50:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4d71a4a12b130ad033219e6f58c74a64059415eb'/>
<id>4d71a4a12b130ad033219e6f58c74a64059415eb</id>
<content type='text'>
There are use cases when setting a LED brightness has to
have immediate effect (e.g. setting a torch LED brightness).
This patch extends LED subsystem to support such operations.
The LED subsystem internal API __led_set_brightness is changed
to led_set_brightness_async and new led_set_brightness_sync API
is added.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.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>
There are use cases when setting a LED brightness has to
have immediate effect (e.g. setting a torch LED brightness).
This patch extends LED subsystem to support such operations.
The LED subsystem internal API __led_set_brightness is changed
to led_set_brightness_async and new led_set_brightness_sync API
is added.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: implement sysfs interface locking mechanism</title>
<updated>2014-11-14T22:29:35+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2014-09-22T15:21:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=acd899e4f3066b6662f6047da5b795cc762093cb'/>
<id>acd899e4f3066b6662f6047da5b795cc762093cb</id>
<content type='text'>
Add a mechanism for locking LED subsystem sysfs interface.
This patch prepares ground for addition of LED Flash Class
extension, whose API will be integrated with V4L2 Flash API.
Such a fusion enforces introducing a locking scheme, which
will secure consistent access to the LED Flash Class device.

The mechanism being introduced allows for disabling LED
subsystem sysfs interface by calling led_sysfs_disable function
and enabling it by calling led_sysfs_enable. The functions
alter the LED_SYSFS_DISABLE flag state and must be called
under mutex lock. The state of the lock is checked with use
of led_sysfs_is_disabled function. Such a design allows for
providing immediate feedback to the user space on whether
the LED Flash Class device is available or is under V4L2 Flash
sub-device control.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.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>
Add a mechanism for locking LED subsystem sysfs interface.
This patch prepares ground for addition of LED Flash Class
extension, whose API will be integrated with V4L2 Flash API.
Such a fusion enforces introducing a locking scheme, which
will secure consistent access to the LED Flash Class device.

The mechanism being introduced allows for disabling LED
subsystem sysfs interface by calling led_sysfs_disable function
and enabling it by calling led_sysfs_enable. The functions
alter the LED_SYSFS_DISABLE flag state and must be called
under mutex lock. The state of the lock is checked with use
of led_sysfs_is_disabled function. Such a design allows for
providing immediate feedback to the user space on whether
the LED Flash Class device is available or is under V4L2 Flash
sub-device control.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Improve and export led_update_brightness</title>
<updated>2014-09-12T21:01:54+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2014-08-20T13:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3ef7de5304edf60d0b8674dd7cdacc104e15a93c'/>
<id>3ef7de5304edf60d0b8674dd7cdacc104e15a93c</id>
<content type='text'>
led_update_brightness helper function used to be exploited only locally
in the led-class.c module, where its result was being passed to the
brightness_show sysfs callback. With the introduction of v4l2-flash
subdevice the same functionality becomes required for reading current
brightness from a LED device. This patch adds checking of return value
of the brightness_get callback and moves the led_update_brightness()
function to the LED subsystem public API.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.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>
led_update_brightness helper function used to be exploited only locally
in the led-class.c module, where its result was being passed to the
brightness_show sysfs callback. With the introduction of v4l2-flash
subdevice the same functionality becomes required for reading current
brightness from a LED device. This patch adds checking of return value
of the brightness_get callback and moves the led_update_brightness()
function to the LED subsystem public API.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: avoid using DEVICE_ATTR macro for max_brightness attribute</title>
<updated>2014-09-11T23:55:26+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2014-08-07T12:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3841961269f76db243339a94005729f10829911e'/>
<id>3841961269f76db243339a94005729f10829911e</id>
<content type='text'>
Make definition of the brightness related sysfs attributes
consistent. The modification entails change of the function
name: led_max_brightness_show -&gt; max_brightness_show

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.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>
Make definition of the brightness related sysfs attributes
consistent. The modification entails change of the function
name: led_max_brightness_show -&gt; max_brightness_show

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
