Commit d9b5941b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Pavel Machek:
 "Nothing major is happening here"

* tag 'leds-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
  leds: lp55xx: initialise output direction from dts
  ARM: dts: omap3-n900: Fix lp5523 for multi color
  leds: ktd2692: Drop calling dev_of_node() in ktd2692_parse_dt
  leds: lgm-sso: Get rid of duplicate of_node assignment
  leds: tca6507: Get rid of duplicate of_node assignment
  leds: leds-fsg: Drop FSG3 LED driver
  leds: lp50xx: remove unused variable
  dt-bindings: leds: Replace moonlight with indicator in mt6360 example
  leds: led-core: Update fwnode with device_set_node
  leds: tca6507: use swap() to make code cleaner
  leds: Add mt6360 driver
  dt-bindings: leds: Add bindings for MT6360 LED
parents 4eb766f6 9e87a8da
Loading
Loading
Loading
Loading
+159 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-mt6360.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LED driver for MT6360 PMIC from MediaTek Integrated.

maintainers:
  - Gene Chen <gene_chen@richtek.com>

description: |
  This module is part of the MT6360 MFD device.
  see Documentation/devicetree/bindings/mfd/mt6360.yaml
  Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode,
  and 4-channel RGB LED support Register/Flash/Breath Mode

properties:
  compatible:
    const: mediatek,mt6360-led

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

patternProperties:
  "^(multi-)?led@[0-5]$":
    type: object
    $ref: common.yaml#
    description:
      Properties for a single LED.

    properties:
      reg:
        description: Index of the LED.
        enum:
          - 0 # LED output ISINK1
          - 1 # LED output ISINK2
          - 2 # LED output ISINK3
          - 3 # LED output ISINKML
          - 4 # LED output FLASH1
          - 5 # LED output FLASH2

unevaluatedProperties: false

required:
  - compatible
  - "#address-cells"
  - "#size-cells"

additionalProperties: false

examples:
  - |
   #include <dt-bindings/leds/common.h>
   led-controller {
     compatible = "mediatek,mt6360-led";
     #address-cells = <1>;
     #size-cells = <0>;

     multi-led@0 {
       reg = <0>;
       function = LED_FUNCTION_INDICATOR;
       color = <LED_COLOR_ID_RGB>;
       led-max-microamp = <24000>;
       #address-cells = <1>;
       #size-cells = <0>;
       led@0 {
         reg = <0>;
         color = <LED_COLOR_ID_RED>;
       };
       led@1 {
         reg = <1>;
         color = <LED_COLOR_ID_GREEN>;
       };
       led@2 {
         reg = <2>;
         color = <LED_COLOR_ID_BLUE>;
       };
     };
     led@3 {
       reg = <3>;
       function = LED_FUNCTION_INDICATOR;
       color = <LED_COLOR_ID_WHITE>;
       led-max-microamp = <150000>;
     };
     led@4 {
       reg = <4>;
       function = LED_FUNCTION_FLASH;
       color = <LED_COLOR_ID_WHITE>;
       function-enumerator = <1>;
       led-max-microamp = <200000>;
       flash-max-microamp = <500000>;
       flash-max-timeout-us = <1024000>;
     };
     led@5 {
       reg = <5>;
       function = LED_FUNCTION_FLASH;
       color = <LED_COLOR_ID_WHITE>;
       function-enumerator = <2>;
       led-max-microamp = <200000>;
       flash-max-microamp = <500000>;
       flash-max-timeout-us = <1024000>;
     };
   };

  - |

   led-controller {
     compatible = "mediatek,mt6360-led";
     #address-cells = <1>;
     #size-cells = <0>;

     led@0 {
       reg = <0>;
       function = LED_FUNCTION_INDICATOR;
       color = <LED_COLOR_ID_RED>;
       led-max-microamp = <24000>;
     };
     led@1 {
       reg = <1>;
       function = LED_FUNCTION_INDICATOR;
       color = <LED_COLOR_ID_GREEN>;
       led-max-microamp = <24000>;
     };
     led@2 {
       reg = <2>;
       function = LED_FUNCTION_INDICATOR;
       color = <LED_COLOR_ID_BLUE>;
       led-max-microamp = <24000>;
     };
     led@3 {
       reg = <3>;
       function = LED_FUNCTION_INDICATOR;
       color = <LED_COLOR_ID_WHITE>;
       led-max-microamp = <150000>;
     };
     led@4 {
       reg = <4>;
       function = LED_FUNCTION_FLASH;
       color = <LED_COLOR_ID_WHITE>;
       function-enumerator = <1>;
       led-max-microamp = <200000>;
       flash-max-microamp = <500000>;
       flash-max-timeout-us = <1024000>;
     };
     led@5 {
       reg = <5>;
       function = LED_FUNCTION_FLASH;
       color = <LED_COLOR_ID_WHITE>;
       function-enumerator = <2>;
       led-max-microamp = <200000>;
       flash-max-microamp = <500000>;
       flash-max-timeout-us = <1024000>;
     };
   };
...
+40 −10
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

#include "omap34xx.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

/*
 * Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
@@ -630,63 +631,92 @@
	};

	lp5523: lp5523@32 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "national,lp5523";
		reg = <0x32>;
		clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */
		enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
		enable-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */

		chan0 {
		led@0 {
			reg = <0>;
			chan-name = "lp5523:kb1";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_KBD_BACKLIGHT;
		};

		chan1 {
		led@1 {
			reg = <1>;
			chan-name = "lp5523:kb2";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_KBD_BACKLIGHT;
		};

		chan2 {
		led@2 {
			reg = <2>;
			chan-name = "lp5523:kb3";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_KBD_BACKLIGHT;
		};

		chan3 {
		led@3 {
			reg = <3>;
			chan-name = "lp5523:kb4";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_KBD_BACKLIGHT;
		};

		chan4 {
		led@4 {
			reg = <4>;
			chan-name = "lp5523:b";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_BLUE>;
			function = LED_FUNCTION_STATUS;
		};

		chan5 {
		led@5 {
			reg = <5>;
			chan-name = "lp5523:g";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_STATUS;
		};

		chan6 {
		led@6 {
			reg = <6>;
			chan-name = "lp5523:r";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_RED>;
			function = LED_FUNCTION_STATUS;
		};

		chan7 {
		led@7 {
			reg = <7>;
			chan-name = "lp5523:kb5";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_KBD_BACKLIGHT;
		};

		chan8 {
		led@8 {
			reg = <8>;
			chan-name = "lp5523:kb6";
			led-cur = /bits/ 8 <50>;
			max-cur = /bits/ 8 <100>;
			color = <LED_COLOR_ID_WHITE>;
			function = LED_FUNCTION_KBD_BACKLIGHT;
		};
	};

+0 −7
Original line number Diff line number Diff line
@@ -260,13 +260,6 @@ config LEDS_NET48XX
	  This option enables support for the Soekris net4801 and net4826 error
	  LED.

config LEDS_FSG
	tristate "LED Support for the Freecom FSG-3"
	depends on LEDS_CLASS
	depends on MACH_FSG
	help
	  This option enables support for the LEDs on the Freecom FSG-3.

config LEDS_WRAP
	tristate "LED Support for the WRAP series LEDs"
	depends on LEDS_CLASS
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
obj-$(CONFIG_LEDS_CPCAP)		+= leds-cpcap.o
obj-$(CONFIG_LEDS_DA903X)		+= leds-da903x.o
obj-$(CONFIG_LEDS_DA9052)		+= leds-da9052.o
obj-$(CONFIG_LEDS_FSG)			+= leds-fsg.o
obj-$(CONFIG_LEDS_GPIO)			+= leds-gpio.o
obj-$(CONFIG_LEDS_GPIO_REGISTER)	+= leds-gpio-register.o
obj-$(CONFIG_LEDS_HP6XX)		+= leds-hp6xx.o
+0 −1
Original line number Diff line number Diff line
@@ -477,7 +477,6 @@ static int sso_gpio_gc_init(struct device *dev, struct sso_led_priv *priv)
	gc->ngpio               = priv->gpio.pins;
	gc->parent              = dev;
	gc->owner               = THIS_MODULE;
	gc->of_node             = dev->of_node;

	return devm_gpiochip_add_data(dev, gc, priv);
}
Loading