Message ID | 49ebc8e27958cb77cde36e5f95ad530803259907.1607591119.git.mallikarjunax.reddy@linux.intel.com |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [v3,1/2] dt-bindings: leds: Add bindings for Intel LGM SoC | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/dt-meta-schema | success | |
robh/dtbs-check | fail | build log |
On Thu, 10 Dec 2020 17:12:11 +0800, Amireddy Mallikarjuna reddy wrote: > Add DT bindings YAML schema for SSO controller driver > of Lightning Mountain (LGM) SoC. > > Signed-off-by: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> > --- > v1: > - Initial version. > > v2: > - Fix bot errors (wrong indentation). > - Spell out LGM and SSO. > - Remove vendor specific name for LED properites. > - removed deprecating property "label" > - Include 'reg', 'function' & 'color' properties. > > v3: > - Included full names(maintainers). > - changed compatible SoC specific. > - Remove redundant properties. > - Updated vendor prefix and unit suffix to properties. > --- > .../devicetree/bindings/leds/leds-lgm.yaml | 113 ++++++++++++++++++ > 1 file changed, 113 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-lgm.yaml > Reviewed-by: Rob Herring <robh@kernel.org>
On Thu 2020-12-10 17:12:11, Amireddy Mallikarjuna reddy wrote: > Add DT bindings YAML schema for SSO controller driver > of Lightning Mountain (LGM) SoC. > > Signed-off-by: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> Thanks, applied. Pavel
Hi Amireddy, On Thu, Dec 10, 2020 at 10:20 AM Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> wrote: > Parallel to serial conversion, which is also called SSO controller, > can drive external shift register for LED outputs, reset or > general purpose outputs. > > This driver enables LED support for Serial Shift Output Controller (SSO). > > Signed-off-by: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> Thanks for your patch, which is now commit c3987cd2bca34ddf ("leds: lgm: Add LED controller driver for LGM SoC") in v5.12-rc1. > --- /dev/null > +++ b/drivers/leds/blink/Kconfig > @@ -0,0 +1,20 @@ > +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. What is the purpose of the LEDS_BLINK config symbol? Blink support for the leds class is always available, regardless of the value of this symbol, and controlled for individual drivers by filling in the led_classdev.blink_set() callback. > + > +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). What's so special about this driver that it needs a new "blink" subdir? Isn't it an ordinary LED driver? Looking at the code filling in the .blink_set() callback, the hardware blink feature seems to be even optional? > + > +endif # LEDS_BLINK Gr{oetje,eeting}s, Geert
Hi! > > --- /dev/null > > +++ b/drivers/leds/blink/Kconfig > > @@ -0,0 +1,20 @@ > > +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. > > What is the purpose of the LEDS_BLINK config symbol? > Blink support for the leds class is always available, regardless of the > value of this symbol, and controlled for individual drivers by filling > in the led_classdev.blink_set() callback. We don't really need the symbol. > > +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). > > What's so special about this driver that it needs a new "blink" subdir? > Isn't it an ordinary LED driver? > Looking at the code filling in the .blink_set() callback, the hardware > blink feature seems to be even optional? So idea is to start putting drivers into subdirectories, because we have too many of them at the moment. simple/blink/flash/rgb, or something like that. Best regards, Pavel
diff --git a/Documentation/devicetree/bindings/leds/leds-lgm.yaml b/Documentation/devicetree/bindings/leds/leds-lgm.yaml new file mode 100644 index 000000000000..32bbf146c01d --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-lgm.yaml @@ -0,0 +1,113 @@ +# 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>; + }; + }; + };
Add DT bindings YAML schema for SSO controller driver of Lightning Mountain (LGM) SoC. Signed-off-by: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com> --- v1: - Initial version. v2: - Fix bot errors (wrong indentation). - Spell out LGM and SSO. - Remove vendor specific name for LED properites. - removed deprecating property "label" - Include 'reg', 'function' & 'color' properties. v3: - Included full names(maintainers). - changed compatible SoC specific. - Remove redundant properties. - Updated vendor prefix and unit suffix to properties. --- .../devicetree/bindings/leds/leds-lgm.yaml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-lgm.yaml