From: Krzysztof Kozlowski <krzk@kernel.org>
To: MyungJoo Ham <myungjoo.ham@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH v2 01/13] dt-bindings: extcon: ptn5150: Convert binding to DT schema
Date: Mon, 17 Aug 2020 08:59:57 +0200 [thread overview]
Message-ID: <20200817070009.4631-2-krzk@kernel.org> (raw)
In-Reply-To: <20200817070009.4631-1-krzk@kernel.org>
Convert the ptn-5150 extcon driver bindings to DT schema format using
json-schema. The differences with original bindings document:
- Use "gpios" suffix for the "int" and "vbus" gpio,
- Skip generic "pinctrl" property as it is not really required.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
.../bindings/extcon/extcon-ptn5150.txt | 27 ----------
.../bindings/extcon/extcon-ptn5150.yaml | 53 +++++++++++++++++++
2 files changed, 53 insertions(+), 27 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt
create mode 100644 Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt
deleted file mode 100644
index 936fbdf12815..000000000000
--- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-* PTN5150 CC (Configuration Channel) Logic device
-
-PTN5150 is a small thin low power CC logic chip supporting the USB Type-C
-connector application with CC control logic detection and indication functions.
-It is interfaced to the host controller using an I2C interface.
-
-Required properties:
-- compatible: should be "nxp,ptn5150"
-- reg: specifies the I2C slave address of the device
-- int-gpio: should contain a phandle and GPIO specifier for the GPIO pin
- connected to the PTN5150's INTB pin.
-- vbus-gpio: should contain a phandle and GPIO specifier for the GPIO pin which
- is used to control VBUS.
-- pinctrl-names : a pinctrl state named "default" must be defined.
-- pinctrl-0 : phandle referencing pin configuration of interrupt and vbus
- control.
-
-Example:
- ptn5150@1d {
- compatible = "nxp,ptn5150";
- reg = <0x1d>;
- int-gpio = <&msmgpio 78 GPIO_ACTIVE_HIGH>;
- vbus-gpio = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&ptn5150_default>;
- status = "okay";
- };
diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
new file mode 100644
index 000000000000..f6316f12028b
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PTN5150 CC (Configuration Channel) Logic device
+
+maintainers:
+ - Krzysztof Kozlowski <krzk@kernel.org>
+
+description: |
+ PTN5150 is a small thin low power CC logic chip supporting the USB Type-C
+ connector application with CC control logic detection and indication
+ functions. It is interfaced to the host controller using an I2C interface.
+
+properties:
+ compatible:
+ const: nxp,ptn5150
+
+ int-gpios:
+ description:
+ GPIO pin (input) connected to the PTN5150's INTB pin.
+
+ reg:
+ maxItems: 1
+
+ vbus-gpios:
+ description:
+ GPIO pin (output) used to control VBUS.
+
+required:
+ - compatible
+ - int-gpios
+ - reg
+ - vbus-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ptn5150@1d {
+ compatible = "nxp,ptn5150";
+ reg = <0x1d>;
+ int-gpios = <&msmgpio 78 GPIO_ACTIVE_HIGH>;
+ vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>;
+ };
+ };
--
2.17.1
next prev parent reply other threads:[~2020-08-17 7:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200817070046epcas1p4c047a86ccef2e5604f31e674782c9c6c@epcas1p4.samsung.com>
2020-08-17 6:59 ` [PATCH v2 00/13] extcon: ptn5150: Improvements and fixes Krzysztof Kozlowski
2020-08-17 6:59 ` Krzysztof Kozlowski [this message]
2020-08-17 6:59 ` [PATCH v2 02/13] dt-bindings: extcon: ptn5150: Use generic "interrupts" property Krzysztof Kozlowski
2020-08-17 6:59 ` [PATCH v2 03/13] dt-bindings: extcon: ptn5150: Make 'vbus-gpios' optional Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 04/13] extcon: ptn5150: Fix usage of atomic GPIO with sleeping GPIO chips Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 05/13] extcon: ptn5150: Use generic "interrupts" property Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 06/13] extcon: ptn5150: Simplify getting vbus-gpios with flags Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 07/13] extcon: ptn5150: Lower the noisiness of probe Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 08/13] extcon: ptn5150: Check current USB mode when probing Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 09/13] extcon: ptn5150: Make 'vbus-gpios' optional Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 10/13] extcon: ptn5150: Reduce the amount of logs on deferred probe Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 11/13] extcon: ptn5150: Convert to module_i2c_driver Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 12/13] extcon: ptn5150: Convert to .probe_new Krzysztof Kozlowski
2020-08-17 7:00 ` [PATCH v2 13/13] MAINTAINERS: Add entry for NXP PTN5150A CC driver Krzysztof Kozlowski
2020-08-19 6:19 ` [PATCH v2 00/13] extcon: ptn5150: Improvements and fixes vijai kumar
2020-08-24 10:36 ` Ramuthevar, Vadivel MuruganX
2020-08-24 10:38 ` Krzysztof Kozlowski
2020-08-25 2:06 ` Ramuthevar, Vadivel MuruganX
2020-08-24 11:28 ` Chanwoo Choi
2020-08-26 21:56 ` Suman Anna
2020-08-27 2:40 ` Chanwoo Choi
2020-08-24 11:27 ` Chanwoo Choi
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=20200817070009.4631-2-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=robh+dt@kernel.org \
--cc=vijaikumar.kanagarajan@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.