* [PATCH 0/2] Make TPS65219 poweroff handler conditional
@ 2026-03-10 11:18 Akashdeep Kaur
2026-03-10 11:18 ` [PATCH 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
2026-03-10 11:18 ` [PATCH 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
0 siblings, 2 replies; 5+ messages in thread
From: Akashdeep Kaur @ 2026-03-10 11:18 UTC (permalink / raw)
To: praneeth, nm, afd, vigneshr, kristo, robh, krzk+dt, conor+dt,
aaro.koskinen, andreas, khilman, rogerq, tony, lee,
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.
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 | 18 ++++++++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller
2026-03-10 11:18 [PATCH 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
@ 2026-03-10 11:18 ` Akashdeep Kaur
2026-03-10 11:18 ` [PATCH 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
1 sibling, 0 replies; 5+ messages in thread
From: Akashdeep Kaur @ 2026-03-10 11:18 UTC (permalink / raw)
To: praneeth, nm, afd, vigneshr, kristo, robh, krzk+dt, conor+dt,
aaro.koskinen, andreas, khilman, rogerq, tony, lee,
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 related [flat|nested] 5+ messages in thread
* [PATCH 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller
2026-03-10 11:18 [PATCH 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
2026-03-10 11:18 ` [PATCH 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
@ 2026-03-10 11:18 ` Akashdeep Kaur
2026-03-19 11:24 ` Lee Jones
1 sibling, 1 reply; 5+ messages in thread
From: Akashdeep Kaur @ 2026-03-10 11:18 UTC (permalink / raw)
To: praneeth, nm, afd, vigneshr, kristo, robh, krzk+dt, conor+dt,
aaro.koskinen, andreas, khilman, rogerq, tony, lee,
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 | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index 7275dcdb7c44..beb816707d8f 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -541,13 +541,19 @@ 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;
+ /*
+ * Only register PMIC power-off handler if system-power-controller
+ * property is present.
+ */
+ 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 related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller
2026-03-10 11:18 ` [PATCH 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
@ 2026-03-19 11:24 ` Lee Jones
2026-03-24 10:18 ` Akashdeep Kaur
0 siblings, 1 reply; 5+ messages in thread
From: Lee Jones @ 2026-03-19 11:24 UTC (permalink / raw)
To: Akashdeep Kaur
Cc: 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, vishalm,
sebin.francis, d-gole, k-willis
On Tue, 10 Mar 2026, 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.
>
> 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 | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
> index 7275dcdb7c44..beb816707d8f 100644
> --- a/drivers/mfd/tps65219.c
> +++ b/drivers/mfd/tps65219.c
> @@ -541,13 +541,19 @@ 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;
> + /*
> + * Only register PMIC power-off handler if system-power-controller
> + * property is present.
> + */
> + if (of_device_is_system_power_controller(tps->dev->of_node)) {
The function name `of_device_is_system_power_controller()` is quite
self-descriptive. Is this comment really necessary? The code seems clear
enough without it.
> + 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
>
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller
2026-03-19 11:24 ` Lee Jones
@ 2026-03-24 10:18 ` Akashdeep Kaur
0 siblings, 0 replies; 5+ messages in thread
From: Akashdeep Kaur @ 2026-03-24 10:18 UTC (permalink / raw)
To: Lee Jones
Cc: Bajjuri, Praneeth, Menon, Nishanth, Davis, Andrew,
Raghavendra, Vignesh, kristo@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, aaro.koskinen@iki.fi,
andreas@kemnade.info, khilman@baylibre.com, rogerq@kernel.org,
tony@atomide.com, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, Ramamoorthy, Shree, Mahaveer, Vishal,
Francis, Sebin, Gole, Dhruva, Willis, Kendall
On 19/03/26 16:54, Lee Jones wrote:
> On Tue, 10 Mar 2026, 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.
>>
>> 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 | 18 ++++++++++++------
>> 1 file changed, 12 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
>> index 7275dcdb7c44..beb816707d8f 100644
>> --- a/drivers/mfd/tps65219.c
>> +++ b/drivers/mfd/tps65219.c
>> @@ -541,13 +541,19 @@ static int tps65219_probe(struct i2c_client *client)
...
>> + /*
>> + * Only register PMIC power-off handler if system-power-controller
>> + * property is present.
>> + */
>> + if (of_device_is_system_power_controller(tps->dev->of_node)) {
>
> The function name `of_device_is_system_power_controller()` is quite
> self-descriptive. Is this comment really necessary? The code seems clear
> enough without it.
Hi Lee, yes, i agree, Removed the comment.
Thanks,
Akashdeep Kaur
>
>> + 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
end of thread, other threads:[~2026-03-24 10:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 11:18 [PATCH 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
2026-03-10 11:18 ` [PATCH 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
2026-03-10 11:18 ` [PATCH 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
2026-03-19 11:24 ` Lee Jones
2026-03-24 10:18 ` Akashdeep Kaur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox