Devicetree
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: input: Convert TI Palmas Power Button to DT schema
@ 2026-07-19 14:17 Eduard Bostina
  0 siblings, 0 replies; only message in thread
From: Eduard Bostina @ 2026-07-19 14:17 UTC (permalink / raw)
  To: Conor Dooley, devicetree, Dmitry Torokhov, Eduard Bostina,
	Krzysztof Kozlowski, linux-input, linux-kernel, Rob Herring
  Cc: daniel.baluta, simona.toaca, goledhruva, m-chawdhry

Convert the Texas Instruments Palmas power button bindings
to DT schema.

During the conversion, 'wakeup-source' was added.
It was missing from the original text binding but is actively
used by in-tree boards.

Signed-off-by: Eduard Bostina <egbostina@gmail.com>
---
 .../bindings/input/ti,palmas-pwrbutton.txt    | 35 -----------
 .../bindings/input/ti,palmas-pwrbutton.yaml   | 58 +++++++++++++++++++
 2 files changed, 58 insertions(+), 35 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.txt
 create mode 100644 Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.yaml

diff --git a/Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.txt b/Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.txt
deleted file mode 100644
index c829e18e1a05..000000000000
--- a/Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Texas Instruments Palmas family power button module
-
-This module is part of the Palmas family of PMICs. For more details
-about the whole chip see:
-Documentation/devicetree/bindings/mfd/palmas.txt.
-
-This module provides a simple power button event via an Interrupt.
-
-Required properties:
-- compatible: should be one of the following
-   - "ti,palmas-pwrbutton": For Palmas compatible power on button
-- interrupts: Interrupt number of power button submodule on device.
-
-Optional Properties:
-
-- ti,palmas-long-press-seconds: Duration in seconds which the power
-  button should be kept pressed for Palmas to power off automatically.
-  NOTE: This depends on OTP support and POWERHOLD signal configuration
-  on platform. Valid values are 6, 8, 10 and 12.
-- ti,palmas-pwron-debounce-milli-seconds: Duration in milliseconds
-  which the power button should be kept pressed for Palmas to register
-  a press for debouncing purposes. NOTE: This depends on specific
-  Palmas variation capability. Valid values are 15, 100, 500 and 1000.
-
-Example:
-
-&palmas {
-	palmas_pwr_button: pwrbutton {
-		compatible = "ti,palmas-pwrbutton";
-		interrupt-parent = <&tps659038>;
-		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
-		ti,palmas-long-press-seconds = <12>;
-		ti,palmas-pwron-debounce-milli-seconds = <15>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.yaml b/Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.yaml
new file mode 100644
index 000000000000..9f64caaac00d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/ti,palmas-pwrbutton.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/ti,palmas-pwrbutton.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments Palmas Power Button
+
+maintainers:
+  - Eduard Bostina <egbostina@gmail.com>
+
+description:
+  This module is part of the Palmas PMIC. It provides a simple power button
+  event via an interrupt.
+
+properties:
+  compatible:
+    const: ti,palmas-pwrbutton
+
+  interrupts:
+    maxItems: 1
+
+  ti,palmas-long-press-seconds:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 6, 8, 10, 12 ]
+    description: |
+      Duration in seconds which the power button should be kept pressed
+      for Palmas to power off automatically. NOTE: This depends on OTP
+      support and POWERHOLD signal configuration on platform.
+
+  ti,palmas-pwron-debounce-milli-seconds:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 15, 100, 500, 1000 ]
+    description: |
+      Duration in milliseconds which the power button should be kept
+      pressed for Palmas to register a press for debouncing purposes.
+      NOTE: This depends on specific Palmas variation capability.
+
+  wakeup-source: true
+
+required:
+  - compatible
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    pmic {
+        power-button {
+            compatible = "ti,palmas-pwrbutton";
+            interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+            ti,palmas-long-press-seconds = <12>;
+            ti,palmas-pwron-debounce-milli-seconds = <15>;
+        };
+    };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-19 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 14:17 [PATCH] dt-bindings: input: Convert TI Palmas Power Button to DT schema Eduard Bostina

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