public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Akashdeep Kaur <a-kaur@ti.com>
To: Lee Jones <lee@kernel.org>
Cc: <praneeth@ti.com>, <nm@ti.com>, <afd@ti.com>, <vigneshr@ti.com>,
	<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>, <s-ramamoorthy@ti.com>,
	<vishalm@ti.com>, <sebin.francis@ti.com>, <d-gole@ti.com>,
	<k-willis@ti.com>
Subject: Re: [PATCH v2 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller
Date: Wed, 1 Apr 2026 16:54:12 +0530	[thread overview]
Message-ID: <ebac1ef0-8be5-4147-bb29-ce1912905dc8@ti.com> (raw)
In-Reply-To: <20260331101203.GA3795166@google.com>

Hi Lee,

On 31/03/26 15:42, Lee Jones wrote:
> ---
> 
> On Tue, 24 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 | 14 ++++++++------
>>   1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
>> index 7275dcdb7c44..6fa202339a0c 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");
> 
> Couple of nits to fix.
> 
> The `"` should be aligned with the `(` and the `failed` should be capitalised.

Fixed the formatting issues.
> 
>>   	}
>> +
>>   	return 0;
>>   }
>>   
>> -- 
>> 2.34.1
>>
> 
Regards,
Akashdeep Kaur



      reply	other threads:[~2026-04-01 11:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 10:14 [PATCH v2 0/2] Make TPS65219 poweroff handler conditional Akashdeep Kaur
2026-03-24 10:14 ` [PATCH v2 1/2] arm64: dts: ti: k3-am62-lp-sk: Add system-power-controller Akashdeep Kaur
2026-03-24 10:14 ` [PATCH v2 2/2] mfd: tps65219: Make poweroff handler conditional on system-power-controller Akashdeep Kaur
2026-03-31 10:12   ` Lee Jones
2026-04-01 11:24     ` Akashdeep Kaur [this message]

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=ebac1ef0-8be5-4147-bb29-ce1912905dc8@ti.com \
    --to=a-kaur@ti.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=afd@ti.com \
    --cc=andreas@kemnade.info \
    --cc=conor+dt@kernel.org \
    --cc=d-gole@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=k-willis@ti.com \
    --cc=khilman@baylibre.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=s-ramamoorthy@ti.com \
    --cc=sebin.francis@ti.com \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.com \
    --cc=vishalm@ti.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