From: Andrew Davis <afd@ti.com>
To: Santosh Shilimkar <ssantosh@kernel.org>,
Sebastian Reichel <sre@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
Andrew Davis <afd@ti.com>
Subject: [PATCH] power: reset: keystone: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
Date: Mon, 2 Mar 2026 13:33:35 -0600 [thread overview]
Message-ID: <20260302193335.274095-1-afd@ti.com> (raw)
Function register_restart_handler() is deprecated. Using this new API
removes our need to keep and manage a struct notifier_block.
Signed-off-by: Andrew Davis <afd@ti.com>
---
drivers/power/reset/keystone-reset.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/power/reset/keystone-reset.c b/drivers/power/reset/keystone-reset.c
index d9268d150e1f9..b016f016cbd84 100644
--- a/drivers/power/reset/keystone-reset.c
+++ b/drivers/power/reset/keystone-reset.c
@@ -48,8 +48,7 @@ static inline int rsctrl_enable_rspll_write(void)
RSCTRL_KEY_MASK, RSCTRL_KEY);
}
-static int rsctrl_restart_handler(struct notifier_block *this,
- unsigned long mode, void *cmd)
+static int rsctrl_restart_handler(struct sys_off_data *data)
{
/* enable write access to RSTCTRL */
rsctrl_enable_rspll_write();
@@ -61,11 +60,6 @@ static int rsctrl_restart_handler(struct notifier_block *this,
return NOTIFY_DONE;
}
-static struct notifier_block rsctrl_restart_nb = {
- .notifier_call = rsctrl_restart_handler,
- .priority = 128,
-};
-
static const struct of_device_id rsctrl_of_match[] = {
{.compatible = "ti,keystone-reset", },
{},
@@ -140,7 +134,8 @@ static int rsctrl_probe(struct platform_device *pdev)
return ret;
}
- ret = register_restart_handler(&rsctrl_restart_nb);
+ ret = register_sys_off_handler(SYS_OFF_MODE_RESTART, 128,
+ rsctrl_restart_handler, NULL);
if (ret)
dev_err(dev, "cannot register restart handler (err=%d)\n", ret);
--
2.39.2
next reply other threads:[~2026-03-02 19:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 19:33 Andrew Davis [this message]
2026-03-02 23:07 ` [PATCH] power: reset: keystone: Use register_sys_off_handler(SYS_OFF_MODE_RESTART) Sebastian Reichel
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=20260302193335.274095-1-afd@ti.com \
--to=afd@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
--cc=ssantosh@kernel.org \
/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