Devicetree
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema
@ 2026-07-20 20:21 Bhargav Joshi
  2026-07-20 20:33 ` sashiko-bot
  2026-07-21 14:07 ` Rob Herring (Arm)
  0 siblings, 2 replies; 3+ messages in thread
From: Bhargav Joshi @ 2026-07-20 20:21 UTC (permalink / raw)
  To: MyungJoo Ham, Chanwoo Choi, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Roger Quadros
  Cc: linux-kernel, devicetree, goledhruva, m-chawdhry, daniel.baluta,
	simona.toaca, j.bhargav.u

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


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

* Re: [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema
  2026-07-20 20:21 [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema Bhargav Joshi
@ 2026-07-20 20:33 ` sashiko-bot
  2026-07-21 14:07 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-20 20:33 UTC (permalink / raw)
  To: Bhargav Joshi; +Cc: conor+dt, devicetree, robh

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The device tree node name in the example uses an underscore (`palmas_usb`), which violates standard DT naming conventions. It should use a hyphen (e.g., `palmas-usb` or a generic name like `usb-comparator`). This change introduces a `dtc` warning (`node_name_chars_strict`) during `make dt_binding_check` that was not present in the original text binding.
--

--- Patch [1]: [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema ---
commit bda055e9092743c0cf88faae7d326b21581d09bb
Author: Bhargav Joshi <j.bhargav.u@gmail.com>

dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema
    
This commit converts the Texas Instruments Palmas USB Comparator binding from
the legacy text format to a modern DT schema.

> 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 0000000000000..0bcd8df79414a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/extcon/ti,extcon-palmas.yaml

[ ... ]

> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    palmas_usb {

[Severity: Low]
Is the underscore in this node name intentional? 

The original text binding used a hyphen (palmas-usb). Using an underscore
violates standard device tree naming conventions and will trigger a dtc 
node_name_chars_strict warning during make dt_binding_check.

Would it be better to stick with the original palmas-usb or use a generic
node name like usb-comparator?

> +        compatible = "ti,palmas-usb-vid";
> +        ti,wakeup;
> +        ti,enable-id-detection;
> +        ti,enable-vbus-detection;
> +        id-gpios = <&palmas_gpio 0 GPIO_ACTIVE_HIGH>;
> +    };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260721-ti-extcon-palmas-v1-1-cd4071f0b9d9@gmail.com?part=1

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

* Re: [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema
  2026-07-20 20:21 [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema Bhargav Joshi
  2026-07-20 20:33 ` sashiko-bot
@ 2026-07-21 14:07 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2026-07-21 14:07 UTC (permalink / raw)
  To: Bhargav Joshi
  Cc: Krzysztof Kozlowski, m-chawdhry, devicetree, MyungJoo Ham,
	Conor Dooley, Roger Quadros, linux-kernel, daniel.baluta,
	simona.toaca, goledhruva, Chanwoo Choi


On Tue, 21 Jul 2026 01:51:39 +0530, Bhargav Joshi wrote:
> 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(-)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

end of thread, other threads:[~2026-07-21 14:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 20:21 [PATCH] dt-bindings: extcon: ti,extcon-palmas: Convert to DT schema Bhargav Joshi
2026-07-20 20:33 ` sashiko-bot
2026-07-21 14:07 ` Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox