Commit edc837da authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Jacek Anaszewski:
 "In this merge window we'd like to announce a change on the list of LED
  subsystem maintainers - Bryan Wu decided to step back and handed over
  the maintainership to me (Jacek Anaszewski), which entailed an update
  of LED subsystem git tree URL.

  Besides the changes in MAINTAINERS we have:

   - optimizations and improvements to existing LED class drivers

   - improvements to the common LEDs DT documentation

   - modifications of kirkwood-* dts files, to be in sync with patches
     for leds-ns2 driver, that move LEDs mode mapping outside of the
     driver"

* tag 'leds_for_4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: Export OF module alias information in missing drivers
  leds:lp55xx: use the private data instead of updating I2C device platform data
  leds: syscon: Correct check for syscon_node_to_regmap() errors
  leds: leds-fsg: Use devm_led_classdev_register
  MAINTAINERS: Change LED subsystem git tree URL
  leds/led-class: Add missing put_device()
  ARM: Kirkwood: add modes-map property to ns2-leds nodes
  leds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check
  leds: leds-ns2: depends on MACH_ARMADA_370
  leds: leds-ns2: handle can_sleep GPIOs
  leds: leds-ns2: move LED modes mapping outside of the driver
  leds: lp8860: Constify reg_default tables
  leds: Drop owner assignment from i2c_driver
  leds: Allow compile test of LEDS_AAT1290 and LEDS_KTD2692 if !GPIOLIB
  leds: Allow compile test of GPIO consumers if !GPIOLIB
  DT: leds: Improve description of flash LEDs related properties
parents e5aeced6 4d59ed85
Loading
Loading
Loading
Loading
+18 −9
Original line number Diff line number Diff line
@@ -29,14 +29,23 @@ Optional properties for child nodes:
     "ide-disk" - LED indicates disk activity
     "timer" - LED flashes at a fixed, configurable rate

- max-microamp : maximum intensity in microamperes of the LED
		 (torch LED for flash devices)
- flash-max-microamp : maximum intensity in microamperes of the
                       flash LED; it is mandatory if the LED should
		       support the flash mode
- flash-timeout-us : timeout in microseconds after which the flash
                     LED is turned off
- led-max-microamp : Maximum LED supply current in microamperes. This property
                     can be made mandatory for the board configurations
                     introducing a risk of hardware damage in case an excessive
                     current is set.
                     For flash LED controllers with configurable current this
                     property is mandatory for the LEDs in the non-flash modes
                     (e.g. torch or indicator).

Required properties for flash LED child nodes:
- flash-max-microamp : Maximum flash LED supply current in microamperes.
- flash-max-timeout-us : Maximum timeout in microseconds after which the flash
                         LED is turned off.

For controllers that have no configurable current the flash-max-microamp
property can be omitted.
For controllers that have no configurable timeout the flash-max-timeout-us
property can be omitted.

Examples:

@@ -49,7 +58,7 @@ system-status {
camera-flash {
	label = "Flash";
	led-sources = <0>, <1>;
	max-microamp = <50000>;
	led-max-microamp = <50000>;
	flash-max-microamp = <320000>;
	flash-timeout-us = <500000>;
	flash-max-timeout-us = <500000>;
};
+9 −0
Original line number Diff line number Diff line
@@ -8,6 +8,9 @@ Each LED is represented as a sub-node of the ns2-leds device.
Required sub-node properties:
- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
- modes-map: A mapping between LED modes (off, on or SATA activity blinking) and
  the corresponding cmd-gpio/slow-gpio values. All the GPIO values combinations
  should be given in order to avoid having an unknown mode at driver probe time.

Optional sub-node properties:
- label: Name for this LED. If omitted, the label is taken from the node name.
@@ -15,6 +18,8 @@ Optional sub-node properties:

Example:

#include <dt-bindings/leds/leds-ns2.h>

ns2-leds {
	compatible = "lacie,ns2-leds";

@@ -22,5 +27,9 @@ ns2-leds {
		label = "ns2:blue:sata";
		slow-gpio = <&gpio0 29 0>;
		cmd-gpio = <&gpio0 30 0>;
		modes-map = <NS_V2_LED_OFF  0 1
			     NS_V2_LED_ON   1 0
			     NS_V2_LED_ON   0 0
			     NS_V2_LED_SATA 1 1>;
	};
};
+1 −2
Original line number Diff line number Diff line
@@ -6042,11 +6042,10 @@ F: Documentation/scsi/53c700.txt
F:	drivers/scsi/53c700*

LED SUBSYSTEM
M:	Bryan Wu <cooloney@gmail.com>
M:	Richard Purdie <rpurdie@rpsys.net>
M:	Jacek Anaszewski <j.anaszewski@samsung.com>
L:	linux-leds@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git
S:	Maintained
F:	drivers/leds/
F:	include/linux/leds.h
+5 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

/dts-v1/;

#include <dt-bindings/leds/leds-ns2.h>
#include "kirkwood-netxbig.dtsi"

/ {
@@ -28,6 +29,10 @@
			label = "d2net_v2:blue:sata";
			slow-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
			cmd-gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>;
			modes-map = <NS_V2_LED_OFF  1 0
				     NS_V2_LED_ON   0 1
				     NS_V2_LED_ON   1 1
				     NS_V2_LED_SATA 0 0>;
		};
	};

+5 −0
Original line number Diff line number Diff line
/dts-v1/;

#include <dt-bindings/leds/leds-ns2.h>
#include "kirkwood-ns2-common.dtsi"

/ {
@@ -27,6 +28,10 @@
			label = "ns2:blue:sata";
			slow-gpio = <&gpio0 29 0>;
			cmd-gpio = <&gpio0 30 0>;
			modes-map = <NS_V2_LED_OFF  1 0
				     NS_V2_LED_ON   0 1
				     NS_V2_LED_ON   1 1
				     NS_V2_LED_SATA 0 0>;
		};
	};
};
Loading