linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Benjamin Bara <bbara93@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Tony Lindgren <tony@atomide.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	peng.fan@oss.nxp.com, rafael.j.wysocki@intel.com,
	Jerome Neanne <jneanne@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-omap@vger.kernel.org,
	Benjamin Bara <benjamin.bara@skidata.com>
Subject: Re: [PATCH v2 4/6] mfd: tps65219: Specify restart mode
Date: Fri, 18 Aug 2023 17:10:38 +0100	[thread overview]
Message-ID: <20230818161038.GB986605@google.com> (raw)
In-Reply-To: <20230809-pca9450-reboot-v2-4-b98b4f8139d5@skidata.com>

On Wed, 09 Aug 2023, Benjamin Bara wrote:

> From: Benjamin Bara <benjamin.bara@skidata.com>
> 
> The current restart handler registration does not specify whether the
> restart is a cold or a warm one. Instead, cold ones are typically
> registered with a HIGH prio. Now, as do_kernel_restart() knows about the
> type, the priorization is implicitly done (cold restarts are executed
> first) and the reboot_mode kernel parameter (which is currently mostly
> ignored) can be respected.
> 
> Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
> ---
> v2:
> - improve commit message
> ---
>  drivers/mfd/tps65219.c | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
> index 0e0c42e4fdfc..85752b93256e 100644
> --- a/drivers/mfd/tps65219.c
> +++ b/drivers/mfd/tps65219.c
> @@ -278,12 +278,21 @@ static int tps65219_probe(struct i2c_client *client)
>  		}
>  	}
>  
> -	ret = devm_register_restart_handler(tps->dev,
> -					    tps65219_restart_handler,
> -					    tps);
> +	ret = devm_register_cold_restart_handler(tps->dev,
> +						 tps65219_restart_handler,
> +						 tps);
>  
>  	if (ret) {
> -		dev_err(tps->dev, "cannot register restart handler, %d\n", ret);
> +		dev_err(tps->dev, "cannot register cold restart handler, %d\n", ret);
> +		return ret;
> +	}
> +
> +	ret = devm_register_warm_restart_handler(tps->dev,
> +						 tps65219_restart_handler,
> +						 tps);
> +

Sorry, why do we have to now register 2 restart handlers?

Seems like a regression?

> +	if (ret) {
> +		dev_err(tps->dev, "cannot register warm restart handler, %d\n", ret);
>  		return ret;
>  	}
>  
> 
> -- 
> 2.34.1
> 

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2023-08-18 16:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09 19:24 [PATCH v2 0/6] regulator: pca9450: register restart handlers Benjamin Bara
2023-08-09 19:24 ` [PATCH v2 1/6] kernel/reboot: distinguish between cold and warm Benjamin Bara
2023-08-09 19:24 ` [PATCH v2 2/6] mfd: rk8xx: Specify restart mode Benjamin Bara
2023-08-18 16:06   ` Lee Jones
2023-08-09 19:24 ` [PATCH v2 3/6] soc/tegra: pmc: " Benjamin Bara
2023-08-14 22:38   ` Dmitry Osipenko
2023-08-17  8:48     ` Benjamin Bara
2023-08-09 19:24 ` [PATCH v2 4/6] mfd: tps65219: " Benjamin Bara
2023-08-18 16:10   ` Lee Jones [this message]
2023-08-09 19:24 ` [PATCH v2 5/6] kernel/reboot: remove generic " Benjamin Bara
2023-08-09 19:24 ` [PATCH v2 6/6] regulator: pca9450: register restart handlers Benjamin Bara
2023-08-18 16:12 ` [PATCH v2 0/6] " Lee Jones

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=20230818161038.GB986605@google.com \
    --to=lee@kernel.org \
    --cc=bbara93@gmail.com \
    --cc=benjamin.bara@skidata.com \
    --cc=broonie@kernel.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=jneanne@baylibre.com \
    --cc=jonathanh@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=peng.fan@oss.nxp.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).