From: Dhruva Gole <d-gole@ti.com>
To: Andrew Davis <afd@ti.com>
Cc: Sebastian Reichel <sre@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
<linux-pm@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] power: reset: brcmstb: Use devm_register_sys_off_handler()
Date: Tue, 11 Jun 2024 11:47:53 +0530 [thread overview]
Message-ID: <20240611061753.chm6egv24yxwdj3v@dhruva> (raw)
In-Reply-To: <20240610142836.168603-4-afd@ti.com>
On Jun 10, 2024 at 09:28:35 -0500, Andrew Davis wrote:
> 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/brcmstb-reboot.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/power/reset/brcmstb-reboot.c b/drivers/power/reset/brcmstb-reboot.c
> index 94ea317f61ef4..59ed1513cfb30 100644
> --- a/drivers/power/reset/brcmstb-reboot.c
> +++ b/drivers/power/reset/brcmstb-reboot.c
> @@ -29,8 +29,7 @@ struct reset_reg_mask {
>
> static const struct reset_reg_mask *reset_masks;
>
> -static int brcmstb_restart_handler(struct notifier_block *this,
> - unsigned long mode, void *cmd)
> +static int brcmstb_restart_handler(struct sys_off_data *data)
> {
> int rc;
> u32 tmp;
> @@ -65,11 +64,6 @@ static int brcmstb_restart_handler(struct notifier_block *this,
> return NOTIFY_DONE;
> }
>
> -static struct notifier_block brcmstb_restart_nb = {
> - .notifier_call = brcmstb_restart_handler,
> - .priority = 128,
> -};
> -
> static const struct reset_reg_mask reset_bits_40nm = {
> .rst_src_en_mask = BIT(0),
> .sw_mstr_rst_mask = BIT(0),
> @@ -100,7 +94,8 @@ static int brcmstb_reboot_probe(struct platform_device *pdev)
> rst_src_en = args[0];
> sw_mstr_rst = args[1];
>
> - rc = register_restart_handler(&brcmstb_restart_nb);
> + rc = devm_register_sys_off_handler(&pdev->dev, SYS_OFF_MODE_RESTART,
> + 128, brcmstb_restart_handler, NULL);
Reviewed-by: Dhruva Gole <d-gole@ti.com>
--
Best regards,
Dhruva
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-06-11 6:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 14:28 [PATCH 1/5] power: reset: brcmstb: Use normal driver register function Andrew Davis
2024-06-10 14:28 ` [PATCH 2/5] power: reset: brcmstb: Use device_get_match_data() for matching Andrew Davis
2024-06-16 12:32 ` Florian Fainelli
2024-06-10 14:28 ` [PATCH 3/5] power: reset: brcmstb: Use syscon_regmap_lookup_by_phandle_args() helper Andrew Davis
2024-06-11 6:15 ` Dhruva Gole
2024-06-16 12:30 ` Florian Fainelli
2024-06-10 14:28 ` [PATCH 4/5] power: reset: brcmstb: Use devm_register_sys_off_handler() Andrew Davis
2024-06-11 6:17 ` Dhruva Gole [this message]
2024-06-16 12:31 ` Florian Fainelli
2024-06-10 14:28 ` [PATCH 5/5] power: reset: brcmstb: Do not go into infinite loop if reset fails Andrew Davis
2024-06-11 6:21 ` Dhruva Gole
2024-06-16 12:33 ` Florian Fainelli
2024-06-11 6:09 ` [PATCH 1/5] power: reset: brcmstb: Use normal driver register function Dhruva Gole
2024-06-16 12:31 ` Florian Fainelli
2024-08-28 22:17 ` 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=20240611061753.chm6egv24yxwdj3v@dhruva \
--to=d-gole@ti.com \
--cc=afd@ti.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=florian.fainelli@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@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