linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 1/2] dt-bindings: gpio: Add Spreadtrum GPIO controller documentation
@ 2018-02-24  2:07 Baolin Wang
  2018-02-24  2:07 ` [PATCH v5 2/2] gpio: Add GPIO driver for Spreadtrum SC9860 platform Baolin Wang
  2018-03-02  9:58 ` [PATCH v5 1/2] dt-bindings: gpio: Add Spreadtrum GPIO controller documentation Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Baolin Wang @ 2018-02-24  2:07 UTC (permalink / raw)
  To: linus.walleij, robh+dt, mark.rutland
  Cc: devicetree, linux-kernel, linux-gpio, broonie, baolin.wang,
	andy.shevchenko

This patch adds the device tree bindings for the Spreadtrum
GPIO controller. The gpios will be supported by the GPIO
generic library.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes since v4:
 - No updates.

Changes since v3:
 - Add acked tag from Rob.

Changes since v2:
 - No updates.

Changes since v1:
 - No updates.
---
 .../devicetree/bindings/gpio/gpio-sprd.txt         |   28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-sprd.txt

diff --git a/Documentation/devicetree/bindings/gpio/gpio-sprd.txt b/Documentation/devicetree/bindings/gpio/gpio-sprd.txt
new file mode 100644
index 0000000..eca97d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-sprd.txt
@@ -0,0 +1,28 @@
+Spreadtrum GPIO controller bindings
+
+The controller's registers are organized as sets of sixteen 16-bit
+registers with each set controlling a bank of up to 16 pins. A single
+interrupt is shared for all of the banks handled by the controller.
+
+Required properties:
+- compatible: Should be "sprd,sc9860-gpio".
+- reg: Define the base and range of the I/O address space containing
+the GPIO controller registers.
+- gpio-controller: Marks the device node as a GPIO controller.
+- #gpio-cells: Should be <2>. The first cell is the gpio number and
+the second cell is used to specify optional parameters.
+- interrupt-controller: Marks the device node as an interrupt controller.
+- #interrupt-cells: Should be <2>. Specifies the number of cells needed
+to encode interrupt source.
+- interrupts: Should be the port interrupt shared by all the gpios.
+
+Example:
+	ap_gpio: gpio@40280000 {
+		compatible = "sprd,sc9860-gpio";
+		reg = <0 0x40280000 0 0x1000>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+	};
-- 
1.7.9.5

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

end of thread, other threads:[~2018-03-02 10:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-24  2:07 [PATCH v5 1/2] dt-bindings: gpio: Add Spreadtrum GPIO controller documentation Baolin Wang
2018-02-24  2:07 ` [PATCH v5 2/2] gpio: Add GPIO driver for Spreadtrum SC9860 platform Baolin Wang
2018-03-02 10:02   ` Linus Walleij
2018-03-02  9:58 ` [PATCH v5 1/2] dt-bindings: gpio: Add Spreadtrum GPIO controller documentation Linus Walleij

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).