Commit fecfd015 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull LED updates from Pavel Machek:
 "Besides the usual fixes and new drivers, we are changing CLASS_FLASH
  to return success to make it easier to work with V4L2 stuff disabled,
  and we are getting rid of enum that should have been plain integer
  long time ago. I'm slightly nervous about potential warnings, but it
  needed to be fixed at some point"

* tag 'leds-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
  leds: lp50xx: Get rid of redundant explicit casting
  leds: lp50xx: Update headers block to reflect reality
  leds: lp50xx: Get rid of redundant check in lp50xx_enable_disable()
  leds: lp50xx: Reduce level of dereferences
  leds: lp50xx: Switch to new style i2c-driver probe function
  leds: lp50xx: Don't spam logs when probe is deferred
  leds: apu: extend support for PC Engines APU1 with newer firmware
  leds: flash: Fix multicolor no-ops registration by return 0
  leds: flash: Add flash registration with undefined CONFIG_LEDS_CLASS_FLASH
  leds: lgm: Add LED controller driver for LGM SoC
  dt-bindings: leds: Add bindings for Intel LGM SoC
  leds: led-core: Get rid of enum led_brightness
  leds: gpio: Set max brightness to 1
  leds: lm3533: Switch to using the new API kobj_to_dev()
  leds: ss4200: simplify the return expression of register_nasgpio_led()
  leds: Use DEVICE_ATTR_{RW, RO, WO} macros
parents 360db2b4 b0a82efa
Loading
Loading
Loading
Loading
+113 −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-lgm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Intel Lightning Mountain (LGM) SoC LED Serial Shift Output (SSO) Controller driver

maintainers:
  - Zhu, Yi Xin <Yixin.zhu@intel.com>
  - Amireddy Mallikarjuna reddy <mallikarjunax.reddy@intel.com>

properties:
  compatible:
    const: intel,lgm-ssoled

  gpio-controller: true

  '#gpio-cells':
    const: 2

  ngpios:
    minimum: 0
    maximum: 32
    description:
      Number of GPIOs this controller provides.

  intel,sso-update-rate-hz:
    description:
      Blink frequency for SOUTs in Hz.

  led-controller:
    type: object
    description:
      This sub-node must contain a sub-node for each leds.

    additionalProperties: false

    patternProperties:
      "^led@[0-23]$":
        type: object

        properties:
          reg:
            description: Index of the LED.
            minimum: 0
            maximum: 2

          intel,sso-hw-trigger:
            type: boolean
            description: This property indicates Hardware driven/control LED.

          intel,sso-hw-blink:
            type: boolean
            description: This property indicates Enable LED blink by Hardware.

          intel,sso-blink-rate-hz:
            description: LED HW blink frequency.

          retain-state-suspended:
            type: boolean
            description: The suspend state of LED can be retained.

          retain-state-shutdown:
            type: boolean
            description: Retain the state of the LED on shutdown.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - "#gpio-cells"
  - gpio-controller

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/intel,lgm-clk.h>
    #include <dt-bindings/leds/common.h>

    ssogpio: ssogpio@e0d40000 {
      compatible = "intel,sso-led";
      reg = <0xE0D40000 0x2E4>;
      gpio-controller;
      #gpio-cells = <2>;
      ngpios = <32>;
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_ledc>;
      clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>;
      clock-names = "sso", "fpid";
      intel,sso-update-rate-hz = <250000>;

      led-controller {
        #address-cells = <1>;
        #size-cells = <0>;

        led@0 {
          reg = <0>;
          function = "gphy";
          color = <LED_COLOR_ID_GREEN>;
          led-gpio = <&ssogpio 0 0>;
        };

        led@23 {
          reg = <23>;
          function = LED_FUNCTION_POWER;
          color = <LED_COLOR_ID_GREEN>;
          led-gpio = <&ssogpio 23 0>;
        };
      };
    };
+3 −0
Original line number Diff line number Diff line
@@ -934,4 +934,7 @@ source "drivers/leds/flash/Kconfig"
comment "LED Triggers"
source "drivers/leds/trigger/Kconfig"

comment "LED Blink"
source "drivers/leds/blink/Kconfig"

endif # NEW_LEDS
+3 −0
Original line number Diff line number Diff line
@@ -108,3 +108,6 @@ obj-$(CONFIG_LEDS_CLASS_FLASH) += flash/

# LED Triggers
obj-$(CONFIG_LEDS_TRIGGERS)		+= trigger/

# LED Blink
obj-$(CONFIG_LEDS_BLINK)                += blink/
+20 −0
Original line number Diff line number Diff line
menuconfig LEDS_BLINK
	bool "LED Blink support"
	depends on LEDS_CLASS
	help
	  This option enables blink support for the leds class.
	  If unsure, say Y.

if LEDS_BLINK

config LEDS_BLINK_LGM
	tristate "LED support for Intel LGM SoC series"
	depends on LEDS_CLASS
	depends on MFD_SYSCON
	depends on OF
	help
	  Parallel to serial conversion, which is also called SSO controller,
	  can drive external shift register for LED outputs.
	  This enables LED support for Serial Shift Output controller(SSO).

endif # LEDS_BLINK
+2 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_LEDS_BLINK_LGM)	+= leds-lgm-sso.o
Loading