mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bhargav Joshi <j.bhargav.u@gmail.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>,
	 Chanwoo Choi <cw00.choi@samsung.com>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Roger Quadros <rogerq@ti.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	 goledhruva@gmail.com, m-chawdhry@ti.com,
	daniel.baluta@gmail.com,  simona.toaca@nxp.com,
	j.bhargav.u@gmail.com
Subject: [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema
Date: Tue, 21 Jul 2026 01:51:39 +0530	[thread overview]
Message-ID: <20260721-ti-extcon-palmas-v1-1-cd4071f0b9d9@gmail.com> (raw)

Convert Texas Instruments Palmas USB Comparator from legacy text to DT
schema.

Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
 .../devicetree/bindings/extcon/extcon-palmas.txt   | 22 -------
 .../bindings/extcon/ti,extcon-palmas.yaml          | 74 ++++++++++++++++++++++
 2 files changed, 74 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt b/Documentation/devicetree/bindings/extcon/extcon-palmas.txt
deleted file mode 100644
index f61d5af44a27..000000000000
--- a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-EXTCON FOR PALMAS/TWL CHIPS
-
-PALMAS USB COMPARATOR
-Required Properties:
- - compatible: should contain one of:
-   * "ti,palmas-usb-vid".
-   * "ti,twl6035-usb-vid".
-   * "ti,palmas-usb" (DEPRECATED - use "ti,palmas-usb-vid").
-   * "ti,twl6035-usb" (DEPRECATED - use "ti,twl6035-usb-vid").
-
-Optional Properties:
- - ti,wakeup : To enable the wakeup comparator in probe
- - ti,enable-id-detection: Perform ID detection. If id-gpio is specified
-		it performs id-detection using GPIO else using OTG core.
- - ti,enable-vbus-detection: Perform VBUS detection.
- - id-gpio: gpio for GPIO ID detection. See gpio binding.
- - debounce-delay-ms: debounce delay for GPIO ID pin in milliseconds.
-
-palmas-usb {
-       compatible = "ti,twl6035-usb", "ti,palmas-usb";
-       ti,wakeup;
-};
diff --git a/Documentation/devicetree/bindings/extcon/ti,extcon-palmas.yaml b/Documentation/devicetree/bindings/extcon/ti,extcon-palmas.yaml
new file mode 100644
index 000000000000..0bcd8df79414
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/ti,extcon-palmas.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/extcon/ti,extcon-palmas.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments PALMAS USB COMPARATOR
+
+maintainers:
+  - Roger Quadros <rogerq@ti.com>
+  - Bhargav Joshi <j.bhargav.u@gmail.com>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - ti,palmas-usb-vid
+          - ti,twl6035-usb-vid
+      - enum:
+          - ti,palmas-usb
+          - ti,twl6035-usb
+        deprecated: true
+
+  ti,wakeup:
+    type: boolean
+    description:
+      To enable the wakeup comparator in probe.
+
+  ti,enable-id-detection:
+    type: boolean
+    description:
+      Perform ID detection. If id-gpios is specified it performs ID detection
+      using GPIO, otherwise using the OTG core.
+
+  ti,enable-vbus-detection:
+    type: boolean
+    description:
+      Perform VBUS detection.
+
+  id-gpios:
+    maxItems: 1
+
+  id-gpio:
+    maxItems: 1
+    deprecated: true
+
+  vbus-gpios:
+    maxItems: 1
+
+  vbus-gpio:
+    maxItems: 1
+    deprecated: true
+
+  debounce-delay-ms:
+    description:
+      Debounce delay for GPIO ID pin in milliseconds.
+    default: 20
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    palmas_usb {
+        compatible = "ti,palmas-usb-vid";
+        ti,wakeup;
+        ti,enable-id-detection;
+        ti,enable-vbus-detection;
+        id-gpios = <&palmas_gpio 0 GPIO_ACTIVE_HIGH>;
+    };

---
base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
change-id: 20260721-ti-extcon-palmas-2eeed9a6ddb3

Best regards,
-- 
Bhargav


             reply	other threads:[~2026-07-20 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 20:21 Bhargav Joshi [this message]
2026-07-21 14:07 ` Rob Herring (Arm)

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=20260721-ti-extcon-palmas-v1-1-cd4071f0b9d9@gmail.com \
    --to=j.bhargav.u@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=daniel.baluta@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=goledhruva@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-chawdhry@ti.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=robh@kernel.org \
    --cc=rogerq@ti.com \
    --cc=simona.toaca@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®