From: Luca Weiss <luca@z3ntu.xyz> To: linux-leds@vger.kernel.org Cc: Dan Murphy <dmurphy@ti.com>, Heiko Stuebner <heiko@sntech.de>, Icenowy Zheng <icenowy@aosc.io>, Jacek Anaszewski <jacek.anaszewski@gmail.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mark Rutland <mark.rutland@arm.com>, Maxime Ripard <mripard@kernel.org>, Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Luca Weiss <luca@z3ntu.xyz> Subject: [PATCH 2/3] dt-bindings: leds: Add binding for sgm3140 Date: Mon, 9 Mar 2020 21:35:57 +0100 Message-ID: <20200309203558.305725-3-luca@z3ntu.xyz> (raw) In-Reply-To: <20200309203558.305725-1-luca@z3ntu.xyz> Add YAML devicetree binding for SGMICRO SGM3140 charge pump used for camera flash LEDs. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> --- 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. 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 <luca@z3ntu.xyz> + +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. + +required: + - compatible + - flash-gpios + - enable-gpios + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/leds/common.h> + + 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 = <LED_COLOR_ID_WHITE>; + flash-max-timeout-us = <250000>; + }; + }; -- 2.25.1
next prev parent reply index Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-09 20:35 [PATCH 0/3] Add sgm3140 flash led driver Luca Weiss 2020-03-09 20:35 ` [PATCH 1/3] dt-bindings: Add vendor prefix for SG Micro Corp Luca Weiss 2020-03-23 20:54 ` Rob Herring 2020-03-09 20:35 ` Luca Weiss [this message] 2020-03-09 22:22 ` [PATCH 2/3] dt-bindings: leds: Add binding for sgm3140 Sakari Ailus 2020-03-11 12:49 ` Dan Murphy 2020-03-15 10:47 ` Luca Weiss 2020-03-15 10:53 ` Laurent Pinchart 2020-03-23 21:30 ` Dan Murphy 2020-03-23 20:57 ` Rob Herring 2020-03-24 20:02 ` Luca Weiss 2020-03-09 20:35 ` [PATCH 3/3] leds: add sgm3140 driver Luca Weiss 2020-03-09 22:18 ` Sakari Ailus 2020-03-09 22:49 ` Pavel Machek 2020-03-09 22:52 ` Luca Weiss 2020-03-11 13:02 ` Dan Murphy 2020-03-11 21:09 ` Jacek Anaszewski 2020-03-15 10:42 ` Luca Weiss
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200309203558.305725-3-luca@z3ntu.xyz \ --to=luca@z3ntu.xyz \ --cc=devicetree@vger.kernel.org \ --cc=dmurphy@ti.com \ --cc=heiko@sntech.de \ --cc=icenowy@aosc.io \ --cc=jacek.anaszewski@gmail.com \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-leds@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=mripard@kernel.org \ --cc=pavel@ucw.cz \ --cc=robh+dt@kernel.org \ --cc=shawnguo@kernel.org \ --cc=~postmarketos/upstreaming@lists.sr.ht \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-LEDs Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-leds/0 linux-leds/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-leds linux-leds/ https://lore.kernel.org/linux-leds \ linux-leds@vger.kernel.org public-inbox-index linux-leds Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-leds AGPL code for this site: git clone https://public-inbox.org/public-inbox.git