Devicetree
 help / color / mirror / Atom feed
From: Eduard Bostina <egbostina@gmail.com>
To: Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Eduard Bostina <egbostina@gmail.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh@kernel.org>
Cc: daniel.baluta@nxp.com, simona.toaca@nxp.com,
	goledhruva@gmail.com, m-chawdhry@ti.com
Subject: [PATCH] dt-bindings: input: Convert TI Palmas Power Button to DT schema
Date: Sun, 19 Jul 2026 14:17:01 +0000	[thread overview]
Message-ID: <20260719141701.3565277-1-egbostina@gmail.com> (raw)

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


                 reply	other threads:[~2026-07-19 14:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260719141701.3565277-1-egbostina@gmail.com \
    --to=egbostina@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=goledhruva@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-chawdhry@ti.com \
    --cc=robh@kernel.org \
    --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