Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp26983ybh; Mon, 9 Mar 2020 15:23:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtsYkf+WgV7tnEXFHmcmq8rkAh7EjlE/xYJDaVo0jglvMXMY6U9k6wqZ8+94uV6nalobD0H X-Received: by 2002:a9d:1a4:: with SMTP id e33mr9189500ote.343.1583792610125; Mon, 09 Mar 2020 15:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583792610; cv=none; d=google.com; s=arc-20160816; b=UN+NI/u6n0nPyXX9LQFJZdE3B9Iod9WyPtuGyVzf3A8uijDgtRcQAFS7eiBcvibFS/ IufbSQLq9rXPdkBNkttTd0zKmqHO+hArv0laBE2ZD9qdK/Gtmtee61+sSsyq8N485dPU NuyLeKKnzL9ZloOVXGdcbI2Tg6tJg7rHTkFnJaBuqGBx9lbt32UFp0bHDYePlCH/erwz h3qj9ahaBzBic4cfPtI8iFeuUnByi9bPPhKkiGiVsbrnbQazXyvk43H8Aflv6lreNEsM uSHM316JxbqzKU6dDXPT5sK2JGzCr96wPGISDO89MJTLSHDZS5lUqfwCWsV19jFWqqzW MTPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8GoV8vPog9vzTvNEmMHTbvXkRoaaboCNQYcO++x0M/U=; b=ollWAbqNiqC+hfPEAlRSucpN72fE/2vPnJpUYi+NjvVR9XuEXc5W9S8Wig0xQhz0LJ dCEtl7x+xQtCMBry7JncrVXmy6cMFc2TiBmzkxf4jjJpLQCM5F4dnYL3U1nqugVywOlq HR4Q5gwPit2KFJWDleo7yLqILX9yfP/hypzqvB4hdg9QeKfRcsf/CRwfancvh66w+4Wc pVeHnrYsuMeiupRFtTclucB5IH1Iad1kuoXyKvzPh+kethYYyDQ4HK2w/dKTMXu6q/GM E9H1l0Ja4vu8pJgM/sqIZkcg9ZbREDpxxOEj3KTRUcI+l4DtskuAtAj7H7p3kIU/z/va qC5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e63si5023961oib.19.2020.03.09.15.23.15; Mon, 09 Mar 2020 15:23:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbgCIWWs (ORCPT + 99 others); Mon, 9 Mar 2020 18:22:48 -0400 Received: from retiisi.org.uk ([95.216.213.190]:51732 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbgCIWWr (ORCPT ); Mon, 9 Mar 2020 18:22:47 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 1EEAE634C87; Tue, 10 Mar 2020 00:22:00 +0200 (EET) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1jBQme-0001Fq-BM; Tue, 10 Mar 2020 00:22:00 +0200 Date: Tue, 10 Mar 2020 00:22:00 +0200 From: Sakari Ailus To: Luca Weiss Cc: linux-leds@vger.kernel.org, Dan Murphy , Heiko Stuebner , Icenowy Zheng , Jacek Anaszewski , Laurent Pinchart , Mark Rutland , Maxime Ripard , Pavel Machek , Rob Herring , Shawn Guo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH 2/3] dt-bindings: leds: Add binding for sgm3140 Message-ID: <20200309222200.GE2619@valkosipuli.retiisi.org.uk> References: <20200309203558.305725-1-luca@z3ntu.xyz> <20200309203558.305725-3-luca@z3ntu.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200309203558.305725-3-luca@z3ntu.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Luca, On Mon, Mar 09, 2020 at 09:35:57PM +0100, Luca Weiss wrote: > Add YAML devicetree binding for SGMICRO SGM3140 charge pump used for > camera flash LEDs. > > Signed-off-by: Luca Weiss > --- > Changes since RFC: > - new patch > > I'm not sure about the completeness of this binding as it doesn't > mention the led subnode at all. I guess you'll need one --- the driver expects it as well. > The only existing led yaml binding is leds/leds-max77650.yaml which > mentions the subnode but duplicates properties from documented in > leds/common.txt. > > .../bindings/leds/leds-sgm3140.yaml | 53 +++++++++++++++++++ > 1 file changed, 53 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-sgm3140.yaml > > diff --git a/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml b/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml > new file mode 100644 > index 000000000000..be9384573d02 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/leds-sgm3140.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: SGMICRO SGM3140 500mA Buck/Boost Charge Pump LED Driver > + > +maintainers: > + - Luca Weiss > + > +description: | > + The SGM3140 is a current-regulated charge pump which can regulate two current > + levels for Flash and Torch modes. > + > + It is controlled with two GPIO pins. > + > + The data sheet can be found at: > + http://www.sg-micro.com/uploads/soft/20190626/1561535688.pdf > + > +properties: > + compatible: > + const: sgmicro,sgm3140 > + > + enable-gpios: > + maxItems: 1 > + description: A connection to the 'EN' pin. > + > + flash-gpios: > + maxItems: 1 > + description: A connection to the 'FLASH' pin. How about a regulator supply? I guess the chip is meant to be connected to a li-ion cell but still... > + > +required: > + - compatible > + - flash-gpios > + - enable-gpios > + > +examples: > + - | > + #include > + #include > + > + sgm3140 { > + compatible = "sgmicro,sgm3140"; > + flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ > + enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */ > + > + sgm3140_flash: led { > + function = LED_FUNCTION_FLASH; > + color = ; > + flash-max-timeout-us = <250000>; > + }; > + }; -- Regards, Sakari Ailus