Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1660281

Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module
Date 2017-06-08 00:10 +0200
Message-ID <tPRjk-44i-7@gated-at.bofh.it> (permalink)
References <tNsIq-7Yb-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 01, 2017 at 03:25:01PM +0800, fenglinw@codeaurora.org wrote:
> From: Fenglin Wu <fenglinw@codeaurora.org>
> 
> 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 <fenglinw@codeaurora.org>
> ---
>  .../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>;
> +	};

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module fenglinw@codeaurora.org - 2017-06-01 09:30 +0200
  Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED  module Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-06-04 20:40 +0200
    Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI  TRI_LED module Pavel Machek <pavel@ucw.cz> - 2017-06-05 23:20 +0200
      Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED  module Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-06-06 22:10 +0200
        Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI  TRI_LED module Pavel Machek <pavel@ucw.cz> - 2017-06-06 22:20 +0200
  Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI  TRI_LED module Rob Herring <robh@kernel.org> - 2017-06-08 00:10 +0200

csiph-web