diff mbox series

[v2,08/11] dt-bindings: pinctrl: qcom-wcd934x: Add bindings for gpio

Message ID 20191018001849.27205-9-srinivas.kandagatla@linaro.org
State New
Headers show
Series [v2,01/11] ASoC: dt-bindings: add dt bindings for WCD9340/WCD9341 audio codec | expand

Commit Message

Srinivas Kandagatla Oct. 18, 2019, 12:18 a.m. UTC
Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated
gpio controller to control 5 gpios on the chip. This patch adds
required device tree bindings for it.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

---
 .../pinctrl/qcom,wcd934x-pinctrl.yaml         | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml

-- 
2.21.0

Comments

Srinivas Kandagatla Oct. 28, 2019, 12:41 p.m. UTC | #1
Thamks for the review Rob,


On 25/10/2019 22:00, Rob Herring wrote:
> On Fri, Oct 18, 2019 at 01:18:46AM +0100, Srinivas Kandagatla wrote:

>> Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated

>> gpio controller to control 5 gpios on the chip. This patch adds

>> required device tree bindings for it.

>>

>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

>> ---

>>   .../pinctrl/qcom,wcd934x-pinctrl.yaml         | 51 +++++++++++++++++++

>>   1 file changed, 51 insertions(+)

>>   create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml

>>

>> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml

>> new file mode 100644

>> index 000000000000..c8a36cbc4935

>> --- /dev/null

>> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml

>> @@ -0,0 +1,51 @@

>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

>> +%YAML 1.2

>> +---

>> +$id: http://devicetree.org/schemas/pinctrl/qcom,wcd934x-pinctrl.yaml#

>> +$schema: http://devicetree.org/meta-schemas/core.yaml#

>> +

>> +title: WCD9340/WCD9341 GPIO Pin controller

>> +

>> +maintainers:

>> +  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

>> +

>> +description: |

>> +  Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated

>> +  gpio controller to control 5 gpios on the chip.

>> +

>> +properties:

>> +  compatible:

>> +    enum:

>> +      - qcom,wcd9340-pinctrl

>> +      - qcom,wcd9341-pinctrl

>> +

>> +  reg:

>> +    maxItems: 1

>> +

>> +  gpio-controller: true

>> +

>> +  gpio-ranges:

>> +    maxItems: 1

>> +

>> +  '#gpio-cells':

>> +    const: 2

>> +

>> +required:

>> +  - compatible

>> +  - reg

>> +  - gpio-controller

>> +  - gpio-ranges

>> +  - "#gpio-cells"

> 

> additionalProperties: false

> 

>> +

>> +

>> +examples:

>> +  - |

>> +    wcdpinctrl: wcdpinctrl@42 {

> 

> pinctrl@42


I will address above two comments in next version!

Thanks,
srini
> 

>> +        compatible = "qcom,wcd9340-pinctrl";

>> +        reg = <0x042 0x2>;

>> +        gpio-controller;

>> +        gpio-ranges = <&wcdpinctrl 0 0 5>;

>> +        #gpio-cells = <2>;

>> +    };

>> +

>> +...

>> -- 

>> 2.21.0

>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml
new file mode 100644
index 000000000000..c8a36cbc4935
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml
@@ -0,0 +1,51 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,wcd934x-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: WCD9340/WCD9341 GPIO Pin controller
+
+maintainers:
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+  Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated
+  gpio controller to control 5 gpios on the chip.
+
+properties:
+  compatible:
+    enum:
+      - qcom,wcd9340-pinctrl
+      - qcom,wcd9341-pinctrl
+
+  reg:
+    maxItems: 1
+
+  gpio-controller: true
+
+  gpio-ranges:
+    maxItems: 1
+
+  '#gpio-cells':
+    const: 2
+
+required:
+  - compatible
+  - reg
+  - gpio-controller
+  - gpio-ranges
+  - "#gpio-cells"
+
+
+examples:
+  - |
+    wcdpinctrl: wcdpinctrl@42 {
+        compatible = "qcom,wcd9340-pinctrl";
+        reg = <0x042 0x2>;
+        gpio-controller;
+        gpio-ranges = <&wcdpinctrl 0 0 5>;
+        #gpio-cells = <2>;
+    };
+
+...