devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/5] Documentation: bindings/mfd: sensehat: Raspberry Pi Sense HAT device tree binding
       [not found] <20211029215516.801593-1-cmirabil@redhat.com>
@ 2021-10-29 21:55 ` Charles Mirabile
  2021-11-02 12:51   ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Mirabile @ 2021-10-29 21:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Charles Mirabile, Lee Jones, Rob Herring, devicetree,
	Serge Schneider, Stefan Wahren, Nicolas Saenz Julienne,
	linux-rpi-kernel, fedora-rpi, Mwesigwa Guma, Joel Savitz

This patch adds the device tree binding
for the Sense HAT in yaml form.

Signed-off-by: Charles Mirabile <cmirabil@redhat.com>
Signed-off-by: Mwesigwa Guma <mguma@redhat.com>
Signed-off-by: Joel Savitz <jsavitz@redhat.com>
---
 .../bindings/mfd/raspberrypi,sensehat.yaml    | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml

diff --git a/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml
new file mode 100644
index 000000000000..e00cd02a3752
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+$id: http://devicetree.org/schemas/mfd/raspberrypi,sensehat.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Raspberry Pi Sensehat
+
+maintainers:
+  - Charles Mirabile <cmirabil@redhat.com>
+  - Mwesigwa Guma <mguma@redhat.com>
+  - Joel Savitz <jsavitz@redhat.com>
+
+description: |
+  The Raspberry Pi Sensehat is an addon board originally developed
+  for the Raspberry Pi that has a joystick and an 8x8 RGB LED display
+  as well as several environmental sensors. It connects via i2c and
+  a gpio for irq.
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+        - raspberrypi,sensehat
+        - rpi,rpisense
+
+  reg:
+    items:
+      - description: i2c bus address
+
+  keys-int-gpios:
+    items:
+      - description: gpio pin for joystick interrupt
+
+required:
+  - compatible
+  - reg
+  - keys-int-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      sensehat@46 {
+        compatible = "raspberrypi,sensehat";
+        reg = <0x46>;
+        keys-int-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+      };
+    };
-- 
2.31.1


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

* Re: [PATCH 4/5] Documentation: bindings/mfd: sensehat: Raspberry Pi Sense HAT device tree binding
  2021-10-29 21:55 ` [PATCH 4/5] Documentation: bindings/mfd: sensehat: Raspberry Pi Sense HAT device tree binding Charles Mirabile
@ 2021-11-02 12:51   ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2021-11-02 12:51 UTC (permalink / raw)
  To: Charles Mirabile
  Cc: linux-kernel, Lee Jones, devicetree, Serge Schneider,
	Stefan Wahren, Nicolas Saenz Julienne, linux-rpi-kernel,
	fedora-rpi, Mwesigwa Guma, Joel Savitz

On Fri, Oct 29, 2021 at 05:55:15PM -0400, Charles Mirabile wrote:
> This patch adds the device tree binding
> for the Sense HAT in yaml form.

For the subject, follow the format of the subsystem (run git log 
--oneline) and no need to say 'binding' multiple times:

dt-bindings: mfd: Add Raspberry Pi Sense HAT schema

> 
> Signed-off-by: Charles Mirabile <cmirabil@redhat.com>
> Signed-off-by: Mwesigwa Guma <mguma@redhat.com>
> Signed-off-by: Joel Savitz <jsavitz@redhat.com>
> ---
>  .../bindings/mfd/raspberrypi,sensehat.yaml    | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml
> new file mode 100644
> index 000000000000..e00cd02a3752
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/raspberrypi,sensehat.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +$id: http://devicetree.org/schemas/mfd/raspberrypi,sensehat.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Raspberry Pi Sensehat
> +
> +maintainers:
> +  - Charles Mirabile <cmirabil@redhat.com>
> +  - Mwesigwa Guma <mguma@redhat.com>
> +  - Joel Savitz <jsavitz@redhat.com>
> +
> +description: |

'|' is not needed if there is no formatting to preserve.

> +  The Raspberry Pi Sensehat is an addon board originally developed
> +  for the Raspberry Pi that has a joystick and an 8x8 RGB LED display
> +  as well as several environmental sensors. It connects via i2c and
> +  a gpio for irq.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - enum:

Don't need oneOf when there is only one entry.

> +        - raspberrypi,sensehat
> +        - rpi,rpisense

'rpi' is not a vendor prefix.

What's the fallback for anyways?

> +
> +  reg:
> +    items:
> +      - description: i2c bus address
> +
> +  keys-int-gpios:
> +    items:
> +      - description: gpio pin for joystick interrupt

For an interrupt, use 'interrupts'.

> +
> +required:
> +  - compatible
> +  - reg
> +  - keys-int-gpios
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +      sensehat@46 {
> +        compatible = "raspberrypi,sensehat";
> +        reg = <0x46>;
> +        keys-int-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
> +      };
> +    };
> -- 
> 2.31.1
> 
> 

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

end of thread, other threads:[~2021-11-02 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20211029215516.801593-1-cmirabil@redhat.com>
2021-10-29 21:55 ` [PATCH 4/5] Documentation: bindings/mfd: sensehat: Raspberry Pi Sense HAT device tree binding Charles Mirabile
2021-11-02 12:51   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).