Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8a2a176 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Jacek Anaszewski:

 - Move the out-of-LED-tree led-sead3 driver to the LED subsystem.

 - Add 'invert' sysfs attribute to the heartbeat trigger.

 - Add Device Tree support to the leds-netxbig driver and add related DT
   nodes to the kirkwood-netxbig.dtsi and kirkwood-net5big.dts files.
   Remove static LED setup from the related board files.

 - Remove redundant brightness conversion operation from leds-netxbig.

 - Improve leds-bcm6328 driver: improve default-state handling, add more
   init configuration options, print invalid LED instead of warning only
   about maximum LED value.

 - Add a shutdown function for setting gpio-leds into off state when
   shutting down.

 - Fix DT flash timeout property naming in leds-aat1290.txt.

 - Switch to using devm prefixed version of led_classdev_register()
   (leds-cobalt-qube, leds-hp6xx, leds-ot200, leds-ipaq-micro,
   leds-netxbig, leds-locomo, leds-menf21bmc, leds-net48xx, leds-wrap).

 - Add missing of_node_put (leds-powernv, leds-bcm6358, leds-bcm6328,
   leds-88pm860x).

 - Coding style fixes and cleanups: led-class/led-core, leds-ipaq-micro.

* tag 'leds_for_4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: (27 commits)
  leds: 88pm860x: add missing of_node_put
  leds: bcm6328: add missing of_node_put
  leds: bcm6358: add missing of_node_put
  powerpc/powernv: add missing of_node_put
  leds: leds-wrap.c: Use devm_led_classdev_register
  leds: aat1290: Fix property naming of flash-timeout-us
  leds: leds-net48xx: Use devm_led_classdev_register
  leds: leds-menf21bmc.c: Use devm_led_class_register
  leds: leds-locomo.c: Use devm_led_classdev_register
  leds: leds-gpio: add shutdown function
  Documentation: leds: update DT bindings for leds-bcm6328
  leds-bcm6328: add more init configuration options
  leds-bcm6328: simplify and improve default-state handling
  leds-bcm6328: print invalid LED
  leds: netxbig: set led_classdev max_brightness
  leds: netxbig: convert to use the devm_ functions
  ARM: mvebu: remove static LED setup for netxbig boards
  ARM: Kirkwood: add LED DT entries for netxbig boards
  leds: netxbig: add device tree binding
  leds: triggers: add invert to heartbeat
  ...
parents 5062ecdb ffdc307d
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
Binding for the GPIO extension bus found on some LaCie/Seagate boards
(Example: 2Big/5Big Network v2, 2Big NAS).

Required properties:
- compatible: "lacie,netxbig-gpio-ext".
- addr-gpios: GPIOs representing the address register (LSB -> MSB).
- data-gpios: GPIOs representing the data register (LSB -> MSB).
- enable-gpio: latches the new configuration (address, data) on raising edge.

Example:

netxbig_gpio_ext: netxbig-gpio-ext {
	compatible = "lacie,netxbig-gpio-ext";

	addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
		      &gpio1 16 GPIO_ACTIVE_HIGH
		      &gpio1 17 GPIO_ACTIVE_HIGH>;
	data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
		      &gpio1 13 GPIO_ACTIVE_HIGH
		      &gpio1 14 GPIO_ACTIVE_HIGH>;
	enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
};
+4 −4
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ Required properties of the LED child node:
- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
                       Maximum flash LED supply current can be calculated using
                       following formula: I = 1A * 162kohm / Rset.
- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
                         Maximum flash timeout can be calculated using following
                         formula: T = 8.82 * 10^9 * Ct.

@@ -54,7 +54,7 @@ aat1290 {
		label = "aat1290-flash";
		led-max-microamp = <520833>;
		flash-max-microamp = <1012500>;
		flash-timeout-us = <1940000>;
		flash-max-timeout-us = <1940000>;
	};
};

+10 −0
Original line number Diff line number Diff line
@@ -29,6 +29,14 @@ Required properties:
Optional properties:
  - brcm,serial-leds : Boolean, enables Serial LEDs.
    Default : false
  - brcm,serial-mux : Boolean, enables Serial LEDs multiplexing.
    Default : false
  - brcm,serial-clk-low : Boolean, makes clock signal active low.
    Default : false
  - brcm,serial-dat-low : Boolean, makes data signal active low.
    Default : false
  - brcm,serial-shift-inv : Boolean, inverts Serial LEDs shift direction.
    Default : false

Each LED is represented as a sub-node of the brcm,bcm6328-leds device.

@@ -110,6 +118,8 @@ Scenario 2 : BCM63268 with Serial/GPHY0 LEDs
		#size-cells = <0>;
		reg = <0x10001900 0x24>;
		brcm,serial-leds;
		brcm,serial-dat-low;
		brcm,serial-shift-inv;

		gphy0_spd0@0 {
			reg = <0>;
+92 −0
Original line number Diff line number Diff line
Binding for the CPLD LEDs (GPIO extension bus) found on some LaCie/Seagate
boards (Example: 2Big/5Big Network v2, 2Big NAS).

Required properties:
- compatible: "lacie,netxbig-leds".
- gpio-ext: Phandle for the gpio-ext bus.

Optional properties:
- timers: Timer array. Each timer entry is represented by three integers:
  Mode (gpio-ext bus), delay_on and delay_off.

Each LED is represented as a sub-node of the netxbig-leds device.

Required sub-node properties:
- mode-addr: Mode register address on gpio-ext bus.
- mode-val: Mode to value mapping. Each entry is represented by two integers:
  A mode and the corresponding value on the gpio-ext bus.
- bright-addr: Brightness register address on gpio-ext bus.
- max-brightness: Maximum brightness value.

Optional sub-node properties:
- label: Name for this LED. If omitted, the label is taken from the node name.
- linux,default-trigger: Trigger assigned to the LED.

Example:

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

	gpio-ext = &gpio_ext;

	timers = <NETXBIG_LED_TIMER1 500 500
		  NETXBIG_LED_TIMER2 500 1000>;

	blue-power {
		label = "netxbig:blue:power";
		mode-addr = <0>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 1
			    NETXBIG_LED_TIMER1 3
			    NETXBIG_LED_TIMER2 7>;
		bright-addr = <1>;
		max-brightness = <7>;
	};
	red-power {
		label = "netxbig:red:power";
		mode-addr = <0>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 2
			    NETXBIG_LED_TIMER1 4>;
		bright-addr = <1>;
		max-brightness = <7>;
	};
	blue-sata0 {
		label = "netxbig:blue:sata0";
		mode-addr = <3>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 7
			    NETXBIG_LED_SATA 1
			    NETXBIG_LED_TIMER1 3>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
	red-sata0 {
		label = "netxbig:red:sata0";
		mode-addr = <3>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 2
			    NETXBIG_LED_TIMER1 4>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
	blue-sata1 {
		label = "netxbig:blue:sata1";
		mode-addr = <4>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 7
			    NETXBIG_LED_SATA 1
			    NETXBIG_LED_TIMER1 3>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
	red-sata1 {
		label = "netxbig:red:sata1";
		mode-addr = <4>;
		mode-val = <NETXBIG_LED_OFF 0
			    NETXBIG_LED_ON 2
			    NETXBIG_LED_TIMER1 4>;
		bright-addr = <2>;
		max-brightness = <7>;
	};
};
+60 −0
Original line number Diff line number Diff line
@@ -86,6 +86,66 @@
			 clock-frequency = <32768>;
	       };
	};

	netxbig-leds {
		blue-sata2 {
			label = "netxbig:blue:sata2";
			mode-addr = <5>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata2 {
			label = "netxbig:red:sata2";
			mode-addr = <5>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		blue-sata3 {
			label = "netxbig:blue:sata3";
			mode-addr = <6>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata3 {
			label = "netxbig:red:sata3";
			mode-addr = <6>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		blue-sata4 {
			label = "netxbig:blue:sata4";
			mode-addr = <7>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata4 {
			label = "netxbig:red:sata4";
			mode-addr = <7>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
	};
};

&mdio {
Loading