* [PATCH v3 0/2] Make TPS65219 poweroff handler conditional
@ 2026-04-01 11:22 Akashdeep Kaur
2026-04-01 11:22 ` [PATCH v3 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Akashdeep Kaur @ 2026-04-01 11:22 UTC (permalink / raw)
To: lee, praneeth, nm, afd, vigneshr, kristo, robh, krzk+dt,
conor+dt, aaro.koskinen, andreas, khilman, rogerq, tony,
linux-arm-kernel, devicetree, linux-kernel, linux-omap,
s-ramamoorthy
Cc: vishalm, sebin.francis, d-gole, k-willis, a-kaur
This series makes the TPS65219 PMIC poweroff handler registration
conditional based on device tree configuration, following standard
kernel patterns.
Currently, the TPS65219 driver unconditionally registers as the system
poweroff handler. This creates conflicts on platforms where alternative
poweroff mechanisms (such as TF-A firmware or other power controllers)
should handle system shutdown instead.
The standard kernel approach is to use the "system-power-controller"
device tree property to explicitly designate which component is
responsible for system poweroff operations.
Patch 1: Add "system-power-controller" property to AM62-LP-SK device
tree, explicitly designating the TPS65219 PMIC as the system
power controller for this platform. This property was missing
only on AM62-LP-SK among all in-tree TPS65219-based devices.
Patch 2: Update TPS65219 driver to only register poweroff handler when
"system-power-controller" property is present. This allows
other systems using this PMIC to use alternative poweroff
mechanisms.
Impact:
- AM62-LP-SK: No functional change (property added, handler still
registers)
- Other TPS65219-based systems: Poweroff handler registration becomes
opt-in via DT property
Tested on AM62-LP-SK - system poweroff works correctly.
Changes in v3:
- Fixed minor formatting issues in PMIC driver
- Link to v2: https://lore.kernel.org/all/20260324101419.95616-1-a-kaur@ti.com/
Changes in v2:
- Addressed review feedback by removing comment on self explanatory code
- Link to v1: https://lore.kernel.org/all/20260310111846.1084623-1-a-kaur@ti.com/
Signed-off-by: Akashdeep Kaur <a-kaur@ti.com>
---
Akashdeep Kaur (2):
arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller
mfd: tps65219: Make poweroff handler conditional on
system-power-controller
arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 1 +
drivers/mfd/tps65219.c | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller
2026-04-01 11:22 [PATCH v3 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
@ 2026-04-01 11:22 ` Akashdeep Kaur
2026-04-01 11:22 ` [PATCH v3 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
2026-05-05 14:02 ` (subset) [PATCH v3 0/2] Make TPS65219 poweroff handler conditional Nishanth Menon
2 siblings, 0 replies; 5+ messages in thread
From: Akashdeep Kaur @ 2026-04-01 11:22 UTC (permalink / raw)
To: lee, praneeth, nm, afd, vigneshr, kristo, robh, krzk+dt,
conor+dt, aaro.koskinen, andreas, khilman, rogerq, tony,
linux-arm-kernel, devicetree, linux-kernel, linux-omap,
s-ramamoorthy
Cc: vishalm, sebin.francis, d-gole, k-willis, a-kaur
On AM62-LP-SK, the TPS65219 PMIC is the system power controller
responsible for handling system poweroff. Add the "system-power-controller"
property to the PMIC node to explicitly designate it as such.
Among all in-tree device trees using the TPS65219 PMIC (verified via
compatible string), AM62-LP-SK was the only one missing this property.
This patch corrects that omission.
This property will be used by the PMIC driver to conditionally register
the poweroff handler, ensuring only the designated power controller
registers for system poweroff operations.
Signed-off-by: Akashdeep Kaur <a-kaur@ti.com>
---
arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
index 3e2d8f669535..786a7d695b33 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
@@ -206,6 +206,7 @@ tps65219: pmic@30 {
interrupt-parent = <&gic500>;
interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
+ system-power-controller;
regulators {
buck1_reg: buck1 {
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller
2026-04-01 11:22 [PATCH v3 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
2026-04-01 11:22 ` [PATCH v3 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
@ 2026-04-01 11:22 ` Akashdeep Kaur
2026-04-23 11:45 ` (subset) " Lee Jones
2026-05-05 14:02 ` (subset) [PATCH v3 0/2] Make TPS65219 poweroff handler conditional Nishanth Menon
2 siblings, 1 reply; 5+ messages in thread
From: Akashdeep Kaur @ 2026-04-01 11:22 UTC (permalink / raw)
To: lee, praneeth, nm, afd, vigneshr, kristo, robh, krzk+dt,
conor+dt, aaro.koskinen, andreas, khilman, rogerq, tony,
linux-arm-kernel, devicetree, linux-kernel, linux-omap,
s-ramamoorthy
Cc: vishalm, sebin.francis, d-gole, k-willis, a-kaur
Currently, the TPS65219 driver unconditionally registers a poweroff
handler. This causes issues on systems where a different component
(such as TF-A firmware) should handle system poweroff instead.
Make the poweroff handler registration conditional based on the
"system-power-controller" device tree property. This follows the
standard kernel pattern where only the designated power controller
registers for system poweroff operations.
On systems where the property is absent, the PMIC will not register
a poweroff handler, allowing other poweroff mechanisms to function.
Signed-off-by: Akashdeep Kaur <a-kaur@ti.com>
---
drivers/mfd/tps65219.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index 7275dcdb7c44..e52fbf1481fe 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -541,13 +541,15 @@ static int tps65219_probe(struct i2c_client *client)
return ret;
}
- ret = devm_register_power_off_handler(tps->dev,
- tps65219_power_off_handler,
- tps);
- if (ret) {
- dev_err(tps->dev, "failed to register power-off handler: %d\n", ret);
- return ret;
+ if (of_device_is_system_power_controller(tps->dev->of_node)) {
+ ret = devm_register_power_off_handler(tps->dev,
+ tps65219_power_off_handler,
+ tps);
+ if (ret)
+ return dev_err_probe(tps->dev, ret,
+ "Failed to register power-off handler\n");
}
+
return 0;
}
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH v3 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller
2026-04-01 11:22 ` [PATCH v3 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
@ 2026-04-23 11:45 ` Lee Jones
0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2026-04-23 11:45 UTC (permalink / raw)
To: lee, praneeth, nm, afd, vigneshr, kristo, robh, krzk+dt,
conor+dt, aaro.koskinen, andreas, khilman, rogerq, tony,
linux-arm-kernel, devicetree, linux-kernel, linux-omap,
s-ramamoorthy, Akashdeep Kaur
Cc: vishalm, sebin.francis, d-gole, k-willis
On Wed, 01 Apr 2026 16:52:57 +0530, Akashdeep Kaur wrote:
> Currently, the TPS65219 driver unconditionally registers a poweroff
> handler. This causes issues on systems where a different component
> (such as TF-A firmware) should handle system poweroff instead.
>
> Make the poweroff handler registration conditional based on the
> "system-power-controller" device tree property. This follows the
> standard kernel pattern where only the designated power controller
> registers for system poweroff operations.
>
> [...]
Applied, thanks!
[2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller
commit: 0af600b8e3bced37afa267ac9a7f68e15764f502
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH v3 0/2] Make TPS65219 poweroff handler conditional
2026-04-01 11:22 [PATCH v3 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
2026-04-01 11:22 ` [PATCH v3 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
2026-04-01 11:22 ` [PATCH v3 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
@ 2026-05-05 14:02 ` Nishanth Menon
2 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2026-05-05 14:02 UTC (permalink / raw)
To: lee, praneeth, afd, vigneshr, kristo, robh, krzk+dt, conor+dt,
aaro.koskinen, andreas, khilman, rogerq, tony, linux-arm-kernel,
devicetree, linux-kernel, linux-omap, s-ramamoorthy,
Akashdeep Kaur
Cc: Nishanth Menon, vishalm, sebin.francis, d-gole, k-willis
Hi Akashdeep Kaur,
On Wed, 01 Apr 2026 16:52:55 +0530, Akashdeep Kaur wrote:
> This series makes the TPS65219 PMIC poweroff handler registration
> conditional based on device tree configuration, following standard
> kernel patterns.
>
> Currently, the TPS65219 driver unconditionally registers as the system
> poweroff handler. This creates conflicts on platforms where alternative
> poweroff mechanisms (such as TF-A firmware or other power controllers)
> should handle system shutdown instead.
>
> [...]
I have applied the following to branch ti-k3-dts-next on [1].
Thank you!
[1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller
commit: abbc2a8235944a78f0a0003fb95cdf6ec5a150a1
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-05 14:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-01 11:22 [PATCH v3 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
2026-04-01 11:22 ` [PATCH v3 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
2026-04-01 11:22 ` [PATCH v3 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
2026-04-23 11:45 ` (subset) " Lee Jones
2026-05-05 14:02 ` (subset) [PATCH v3 0/2] Make TPS65219 poweroff handler conditional Nishanth Menon
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®