<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/leds/led-class.c, branch v4.4.2</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: core: Move LED core callbacks out of led-class.c</title>
<updated>2015-11-03T07:59:22+00:00</updated>
<author>
<name>Jacek Anaszewski</name>
<email>j.anaszewski@samsung.com</email>
</author>
<published>2015-09-28T12:38:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=757b06ae04b3b6c8958ab067e879a8865d076d2a'/>
<id>757b06ae04b3b6c8958ab067e879a8865d076d2a</id>
<content type='text'>
Since the API for controlling LED brightness and blinking is defined in
the LED core, move the related timer and work callbacks to the led-core.c,
and initialize them through a new led_core_init API.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the API for controlling LED brightness and blinking is defined in
the LED core, move the related timer and work callbacks to the led-core.c,
and initialize them through a new led_core_init API.

Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Acked-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds/led-class: Add missing put_device()</title>
<updated>2015-08-28T12:06:19+00:00</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2015-07-31T11:36:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e5b5a61fcb3743f1dacf9e20d28f48423cecf0c1'/>
<id>e5b5a61fcb3743f1dacf9e20d28f48423cecf0c1</id>
<content type='text'>
Devices found by class_find_device must be freed with put_device().
Otherwise the reference count will not work properly.

Fixes: a96aa64cb572 ("leds/led-class: Handle LEDs with the same name")
Reported-by: Alan Tull &lt;delicious.quinoa@gmail.com&gt;
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Devices found by class_find_device must be freed with put_device().
Otherwise the reference count will not work properly.

Fixes: a96aa64cb572 ("leds/led-class: Handle LEDs with the same name")
Reported-by: Alan Tull &lt;delicious.quinoa@gmail.com&gt;
Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&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>2015-07-02T02:09:11+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-07-02T02:09:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=13d45f79a2af84de9083310db58b309a61065208'/>
<id>13d45f79a2af84de9083310db58b309a61065208</id>
<content type='text'>
Pull LED subsystem updates from Bryan Wu:
 "In this cycle, we finished to merge patches for LED Flash class
  driver.

  Other than that we have some bug fixes and new drivers for LED
  controllers"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits)
  leds:lp55xx: fix firmware loading error
  leds: fix max77693-led build errors
  leds: fix aat1290 build errors
  leds: aat1290: pass flags parameter to devm_gpiod_get
  leds: ktd2692: pass flags parameter to devm_gpiod_get
  drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c
  leds: aat1290: add support for V4L2 Flash sub-device
  DT: aat1290: Document handling external strobe sources
  leds: max77693: add support for V4L2 Flash sub-device
  media: Add registration helpers for V4L2 flash sub-devices
  v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it
  Documentation: leds: Add description of v4l2-flash sub-device
  leds: add BCM6358 LED driver
  leds: add DT binding for BCM6358 LED controller
  leds: fix brightness changing when software blinking is active
  Documentation: leds-lp5523: describe master fader attributes
  leds: lp5523: add master_fader support
  leds: leds-gpio: Allow compile test if !GPIOLIB
  leds: leds-gpio: Add missing #include &lt;linux/of.h&gt;
  gpiolib: Add missing dummies for the unified device properties interface
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull LED subsystem updates from Bryan Wu:
 "In this cycle, we finished to merge patches for LED Flash class
  driver.

  Other than that we have some bug fixes and new drivers for LED
  controllers"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits)
  leds:lp55xx: fix firmware loading error
  leds: fix max77693-led build errors
  leds: fix aat1290 build errors
  leds: aat1290: pass flags parameter to devm_gpiod_get
  leds: ktd2692: pass flags parameter to devm_gpiod_get
  drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c
  leds: aat1290: add support for V4L2 Flash sub-device
  DT: aat1290: Document handling external strobe sources
  leds: max77693: add support for V4L2 Flash sub-device
  media: Add registration helpers for V4L2 flash sub-devices
  v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it
  Documentation: leds: Add description of v4l2-flash sub-device
  leds: add BCM6358 LED driver
  leds: add DT binding for BCM6358 LED controller
  leds: fix brightness changing when software blinking is active
  Documentation: leds-lp5523: describe master fader attributes
  leds: lp5523: add master_fader support
  leds: leds-gpio: Allow compile test if !GPIOLIB
  leds: leds-gpio: Add missing #include &lt;linux/of.h&gt;
  gpiolib: Add missing dummies for the unified device properties interface
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: fix brightness changing when software blinking is active</title>
<updated>2015-05-25T20:26:47+00:00</updated>
<author>
<name>Stas Sergeev</name>
<email>stsp@list.ru</email>
</author>
<published>2015-05-14T15:24:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=76931edd54f87d1e49536cd068df4783fae24d45'/>
<id>76931edd54f87d1e49536cd068df4783fae24d45</id>
<content type='text'>
The following sequence:
echo timer &gt;/sys/class/leds/&lt;name&gt;/trigger
echo 1 &gt;/sys/class/leds/&lt;name&gt;/brightness
should change the ON brightness for blinking.
The function led_set_brightness() was mistakenly initiating the
delayed blink stop procedure, which resulted in no blinking with
the timer trigger still active.

This patch fixes the problem by changing led_set_brightness()
to not initiate the delayed blink stop when brightness is not 0.

CC: Richard Purdie &lt;rpurdie@rpsys.net&gt;
CC: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
CC: linux-leds@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Acked-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.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>
The following sequence:
echo timer &gt;/sys/class/leds/&lt;name&gt;/trigger
echo 1 &gt;/sys/class/leds/&lt;name&gt;/brightness
should change the ON brightness for blinking.
The function led_set_brightness() was mistakenly initiating the
delayed blink stop procedure, which resulted in no blinking with
the timer trigger still active.

This patch fixes the problem by changing led_set_brightness()
to not initiate the delayed blink stop when brightness is not 0.

CC: Richard Purdie &lt;rpurdie@rpsys.net&gt;
CC: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
CC: linux-leds@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Acked-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;
Signed-off-by: Bryan Wu &lt;cooloney@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger</title>
<updated>2015-05-12T21:58:24+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.toradex.cn/cgit/linux-toradex.git/commit/?id=084609bf727981c7a2e6e69aefe0052c9d793300'/>
<id>084609bf727981c7a2e6e69aefe0052c9d793300</id>
<content type='text'>
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;
Cc: 3.11+ &lt;stable@vger.kernel.org&gt; # 3.11+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
Cc: 3.11+ &lt;stable@vger.kernel.org&gt; # 3.11+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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>
</feed>
