On Thu, Jun 01, 2017 at 03:25:01PM +0800, [email protected] wrote:
> From: Fenglin Wu <[email protected]>
> 
> QTI TRI_LED module has 3 current sinks for LED driver and each is
> controlled by a PWM channel used for LED dimming or blinking. Add
> the driver to support it.
> 
> Signed-off-by: Fenglin Wu <[email protected]>
> ---
>  .../devicetree/bindings/leds/leds-qti-rgb.txt      |  46 ++

It's preferred to make bindings a separate patch.

>  drivers/leds/Kconfig                               |   8 +
>  drivers/leds/Makefile                              |   1 +
>  drivers/leds/leds-qti-rgb.c                        | 623 
> +++++++++++++++++++++
>  4 files changed, 678 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-qti-rgb.txt
>  create mode 100644 drivers/leds/leds-qti-rgb.c
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-qti-rgb.txt 
> b/Documentation/devicetree/bindings/leds/leds-qti-rgb.txt
> new file mode 100644
> index 0000000..2ca93f9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-qti-rgb.txt
> @@ -0,0 +1,46 @@
> +Qualcomm Technologies, Inc. TRI_LED driver specific bindings
> +
> +This binding document describes the properties of TRI_LED module in
> +Qualcomm Technologies, Inc. PMIC chips.
> +
> +- compatible:
> +     Usage: required
> +     Value type: <string>
> +     Definition: Must be "qcom,leds-rgb".

If the block is called TRI_LED, then use "tri-led" in the name.

> +
> +- reg:
> +     Usage: required
> +     Value type: <prop-encoded-array>
> +     Definition: Register base of the TRI_LED module and length.
> +
> +- pwm-names:
> +     Usage: required
> +     Value type: <stringlist>
> +     Definition: A list of string to label the PWM devices defined in pwms
> +             property which are using for controlling LEDs.
> +             It must be: "red", "green", "blue".
> +
> +- pwms:
> +     Usage: required
> +     Value type: <prop-encoded-array>
> +     Definition: A list of the PWM devices (phandles) used for controlling
> +             LEDs.
> +
> +- qcom,support-blink:
> +     Usage: optional
> +     Value type: <prop-encoded-array>
> +     Definition: An array of integer values to indicate if "red", "green",
> +             "blue" LED support blink control. The values are listed as
> +             the fixed order for "red", "green", "blue" LED.
> +
> +Example:
> +
> +     pmi8998_rgb: rgb@d000{

Need to state somewhere this must be a sub-node of the PMIC and show 
that here.

Also, need a space before {.

> +             compatible = "qcom,leds-rgb";
> +             reg = <0xd000 0x100>;
> +             pwm-names = "red", "green", "blue";
> +             pwms =  <&pmi8998_pwm_5 0 1000000>,
> +                     <&pmi8998_pwm_4 0 1000000>,
> +                     <&pmi8998_pwm_3 0 1000000>;
> +             qcom,support-blink = <1 1 1>;
> +     };

Reply via email to