Linux-LEDs Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings
@ 2021-03-24  2:48 Hermes Zhang
  2021-03-24  5:58 ` Alexander Dahl
  0 siblings, 1 reply; 5+ messages in thread
From: Hermes Zhang @ 2021-03-24  2:48 UTC (permalink / raw)
  To: Pavel Machek, Dan Murphy, Rob Herring, Hermes Zhang
  Cc: kernel, linux-leds, devicetree, linux-kernel

From: Hermes Zhang <chenhuiz@axis.com>

Document the device tree bindings of the multiple GPIOs LED driver
Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml.

Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
---

Notes:
    Add maxItems

 .../bindings/leds/leds-multi-gpio.yaml        | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml

diff --git a/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml b/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml
new file mode 100644
index 000000000000..6f2b47487b90
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/leds-multi-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Multiple GPIOs LED driver
+
+maintainers:
+  - Hermes Zhang <chenhuiz@axis.com>
+
+description:
+  This will support some LED made of multiple GPIOs and the brightness of the
+  LED could map to different states of the GPIOs.
+
+properties:
+  compatible:
+    const: multi-gpio-led
+
+  led-gpios:
+    description: Array of one or more GPIOs pins used to control the LED.
+    minItems: 1
+    maxItems: 8  # Should be enough
+
+  led-states:
+    description: |
+      The array list the supported states here which will map to brightness
+      from 0 to maximum. Each item in the array will present all the GPIOs
+      value by bit.
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    minItems: 1
+    maxItems: 16 # Should be enough
+
+required:
+  - compatible
+  - led-gpios
+  - led-states
+
+additionalProperties: false
+
+examples:
+  - |
+    gpios-led {
+      compatible = "multi-gpio-led";
+
+      led-gpios = <&gpio0 23 0x1>,
+                  <&gpio0 24 0x1>;
+      led-states = /bits/ 8 <0x00 0x01 0x02 0x03>;
+    };
+...
-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings
  2021-03-24  2:48 [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings Hermes Zhang
@ 2021-03-24  5:58 ` Alexander Dahl
  2021-03-24  6:04   ` Hermes Zhang
  2021-03-24  8:25   ` Pavel Machek
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Dahl @ 2021-03-24  5:58 UTC (permalink / raw)
  To: Hermes Zhang, Pavel Machek, Dan Murphy, Rob Herring, Hermes Zhang
  Cc: kernel, linux-leds, devicetree, linux-kernel

Hello Hermes,

> Hermes Zhang <chenhui.zhang@axis.com> hat am 24.03.2021 03:48 geschrieben:
> 
>  
> From: Hermes Zhang <chenhuiz@axis.com>
> 
> Document the device tree bindings of the multiple GPIOs LED driver
> Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml.
> 
> Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
> ---
> 
> Notes:
>     Add maxItems

What about the other part of the series? I think you should send both patches together with an introduction message on both. If you only change one patch for a new version spin of the series, just send the other one unchanged.

(It makes no sense to merge the binding as long as the driver is not merged, otherwise you would end up with a binding without driver. So keeping them together should help reviewers and maintainers.)

Greets
Alex

> 
>  .../bindings/leds/leds-multi-gpio.yaml        | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml b/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml
> new file mode 100644
> index 000000000000..6f2b47487b90
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/leds-multi-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Multiple GPIOs LED driver
> +
> +maintainers:
> +  - Hermes Zhang <chenhuiz@axis.com>
> +
> +description:
> +  This will support some LED made of multiple GPIOs and the brightness of the
> +  LED could map to different states of the GPIOs.
> +
> +properties:
> +  compatible:
> +    const: multi-gpio-led
> +
> +  led-gpios:
> +    description: Array of one or more GPIOs pins used to control the LED.
> +    minItems: 1
> +    maxItems: 8  # Should be enough
> +
> +  led-states:
> +    description: |
> +      The array list the supported states here which will map to brightness
> +      from 0 to maximum. Each item in the array will present all the GPIOs
> +      value by bit.
> +    $ref: /schemas/types.yaml#/definitions/uint8-array
> +    minItems: 1
> +    maxItems: 16 # Should be enough
> +
> +required:
> +  - compatible
> +  - led-gpios
> +  - led-states
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    gpios-led {
> +      compatible = "multi-gpio-led";
> +
> +      led-gpios = <&gpio0 23 0x1>,
> +                  <&gpio0 24 0x1>;
> +      led-states = /bits/ 8 <0x00 0x01 0x02 0x03>;
> +    };
> +...
> -- 
> 2.20.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings
  2021-03-24  5:58 ` Alexander Dahl
@ 2021-03-24  6:04   ` Hermes Zhang
  2021-03-24  6:15     ` Alexander Dahl
  2021-03-24  8:25   ` Pavel Machek
  1 sibling, 1 reply; 5+ messages in thread
From: Hermes Zhang @ 2021-03-24  6:04 UTC (permalink / raw)
  To: Alexander Dahl, Pavel Machek, Dan Murphy, Rob Herring
  Cc: kernel, linux-leds, devicetree, linux-kernel

> >
> > Notes:
> >     Add maxItems
> 
> What about the other part of the series? I think you should send both
> patches together with an introduction message on both. If you only change
> one patch for a new version spin of the series, just send the other one
> unchanged.
> 
> (It makes no sense to merge the binding as long as the driver is not merged,
> otherwise you would end up with a binding without driver. So keeping them
> together should help reviewers and maintainers.)
> 

Hi Alexander,

The other part is here: https://lore.kernel.org/patchwork/patch/1399875/, so do you mean I need to combine these two as one commit? Or is there anyway to link them together? Thanks.

I'm first time to commit a new driver, sorry for that.

Best Regards,
Hermes

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings
  2021-03-24  6:04   ` Hermes Zhang
@ 2021-03-24  6:15     ` Alexander Dahl
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2021-03-24  6:15 UTC (permalink / raw)
  To: Hermes Zhang, Pavel Machek, Dan Murphy, Rob Herring
  Cc: kernel, linux-leds, devicetree, linux-kernel

Hello,

> Hermes Zhang <hermes.zhang@axis.com> hat am 24.03.2021 07:04 geschrieben:
> 
>  
> > >
> > > Notes:
> > >     Add maxItems
> > 
> > What about the other part of the series? I think you should send both
> > patches together with an introduction message on both. If you only change
> > one patch for a new version spin of the series, just send the other one
> > unchanged.
> > 
> > (It makes no sense to merge the binding as long as the driver is not merged,
> > otherwise you would end up with a binding without driver. So keeping them
> > together should help reviewers and maintainers.)
> > 
> 
> Hi Alexander,
> 
> The other part is here: https://lore.kernel.org/patchwork/patch/1399875/, so do you mean I need to combine these two as one commit? Or is there anyway to link them together? Thanks.

Two commits.

For sending more than one patch in a series call `git format-patch` with the option --cover-letter. Please have a look at documentation on `git format-patch` and `git send-email` again.

You can see how it looks if you look out for other patch series on the from the past, especially those with subjects like "[PATCH 0/x] ...". An e-mail client supporting threaded view helps a lot.

> I'm first time to commit a new driver, sorry for that.

Thanks for trying. No need to be sorry, the tools are hard and expectations are high. In the end it's all about efficiency.

Have a nice day
Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings
  2021-03-24  5:58 ` Alexander Dahl
  2021-03-24  6:04   ` Hermes Zhang
@ 2021-03-24  8:25   ` Pavel Machek
  1 sibling, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2021-03-24  8:25 UTC (permalink / raw)
  To: Alexander Dahl
  Cc: Hermes Zhang, Dan Murphy, Rob Herring, Hermes Zhang, kernel,
	linux-leds, devicetree, linux-kernel


[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]

On Wed 2021-03-24 06:58:21, Alexander Dahl wrote:
> Hello Hermes,
> 
> > Hermes Zhang <chenhui.zhang@axis.com> hat am 24.03.2021 03:48 geschrieben:
> > 
> >  
> > From: Hermes Zhang <chenhuiz@axis.com>
> > 
> > Document the device tree bindings of the multiple GPIOs LED driver
> > Documentation/devicetree/bindings/leds/leds-multi-gpio.yaml.
> > 
> > Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
> > ---
> > 
> > Notes:
> >     Add maxItems
> 
> What about the other part of the series? I think you should send both patches together with an introduction message on both. If you only change one patch for a new version spin of the series, just send the other one unchanged.
>

Please wrap emails after 72 columns or so.

> (It makes no sense to merge the binding as long as the driver is not merged, otherwise you would end up with a binding without driver. So keeping them together should help reviewers and maintainers.)
>

This is actually okay to do if you expect discussion and not a patch
merge. Series works, too.

Best regads,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  2:48 [PATCH v3] dt-binding: leds: Document leds-multi-gpio bindings Hermes Zhang
2021-03-24  5:58 ` Alexander Dahl
2021-03-24  6:04   ` Hermes Zhang
2021-03-24  6:15     ` Alexander Dahl
2021-03-24  8:25   ` Pavel Machek

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