Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751656AbdFGWIW (ORCPT ); Wed, 7 Jun 2017 18:08:22 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:33174 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751515AbdFGWIT (ORCPT ); Wed, 7 Jun 2017 18:08:19 -0400 Date: Wed, 7 Jun 2017 17:08:17 -0500 From: Rob Herring To: fenglinw@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Purdie , Jacek Anaszewski , Pavel Machek , Mark Rutland , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, subbaram@quicinc.com, aghayal@qti.qualcomm.com, wruan@quicinc.com, kgunda@qti.qualcomm.com Subject: Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module Message-ID: <20170607220817.psmcljxaqlwrqxnm@rob-hp-laptop> References: <20170601072723.12760-1-fenglinw@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170601072723.12760-1-fenglinw@codeaurora.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2688 Lines: 81 On Thu, Jun 01, 2017 at 03:25:01PM +0800, fenglinw@codeaurora.org wrote: > From: Fenglin Wu > > 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 > --- > .../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: > + 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: > + Definition: Register base of the TRI_LED module and length. > + > +- pwm-names: > + Usage: required > + Value type: > + 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: > + Definition: A list of the PWM devices (phandles) used for controlling > + LEDs. > + > +- qcom,support-blink: > + Usage: optional > + Value type: > + 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>; > + };