From: Lee Jones <lee@kernel.org>
To: Chrispine Tinega <dev@chrispinetinega.com>
Cc: lgirdwood@gmail.com, broonie@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, jerome.neanne@baylibre.com,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-omap@vger.kernel.org, mfd@lists.linux.dev
Subject: Re: [PATCH v2 3/3] mfd: tps65219: Keep running past the warm threshold when asked
Date: Wed, 2 Dec 2026 12:08:04 +0000 [thread overview]
Message-ID: <179510272267.63755.3004065732984227012@kernel.org> (raw)
In-Reply-To: <20261116185811.1907811-4-dev@chrispinetinega.com>
On Mon, 16 Nov 2026, Chrispine Tinega wrote:
> When the devicetree sets ti,no-warm-shutdown on a TPS65219, set the
> four SENSOR_x_WARM_MASK bits in MASK_CONFIG at probe. The PMIC then
> reports a warm die instead of powering the board down, and powers off
> only at its hot threshold.
>
> The masks are loaded from the PMIC's NVM at every power-up, so they are
> set on every probe.
>
> Signed-off-by: Chrispine Tinega <dev@chrispinetinega.com>
> ---
> Changes in v2:
> - None.
>
> drivers/mfd/tps65219.c | 15 +++++++++++++++
> include/linux/mfd/tps65219.h | 6 +++++-
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
> index e52fbf148..d8e352f35 100644
> --- a/drivers/mfd/tps65219.c
> +++ b/drivers/mfd/tps65219.c
> @@ -507,6 +507,21 @@ static int tps65219_probe(struct i2c_client *client)
> }
> }
>
> + /*
> + * The warm masks are loaded from NVM at every power-up, so they are set
> + * again on every probe. With a sensor unmasked, the PMIC powers down at
> + * the warm threshold; with all masked, only at the hot threshold.
> + */
> + if (chip_id == TPS65219 &&
> + of_property_read_bool(tps->dev->of_node, "ti,no-warm-shutdown")) {
> + ret = regmap_set_bits(tps->regmap, TPS65219_REG_MASK_CONFIG,
> + TPS65219_REG_MASK_SENSOR_WARM_MASK);
> + if (ret) {
> + dev_err(tps->dev, "Failed to mask warm shutdown: %d\n", ret);
> + return ret;
> + }
This should be dev_err_probe(), right?
> + }
> +
> ret = devm_regmap_add_irq_chip(tps->dev, tps->regmap, client->irq,
> IRQF_ONESHOT, 0, pmic->irq_chip,
> &tps->irq_data);
> diff --git a/include/linux/mfd/tps65219.h b/include/linux/mfd/tps65219.h
> index 5a6be84e2..688173044 100644
> --- a/include/linux/mfd/tps65219.h
> +++ b/include/linux/mfd/tps65219.h
> @@ -196,7 +196,11 @@ enum pmic_id {
> #define TPS65219_REG_MASK_UV_BUCK3_UV_MASK BIT(6)
> #define TPS65219_REG_MASK_UV_RETRY_MASK BIT(7)
> /* MASK Config */
> -// SENSOR_N_WARM_MASK already defined in Thermal
> +#define TPS65219_REG_MASK_SENSOR_3_WARM_MASK BIT(0)
> +#define TPS65219_REG_MASK_SENSOR_2_WARM_MASK BIT(1)
> +#define TPS65219_REG_MASK_SENSOR_1_WARM_MASK BIT(2)
> +#define TPS65219_REG_MASK_SENSOR_0_WARM_MASK BIT(3)
> +#define TPS65219_REG_MASK_SENSOR_WARM_MASK GENMASK(3, 0)
> #define TPS65219_REG_MASK_INT_FOR_RV_MASK BIT(4)
> #define TPS65219_REG_MASK_EFFECT_MASK GENMASK(6, 5)
> #define TPS65219_REG_MASK_INT_FOR_PB_MASK BIT(7)
> --
> 2.53.0
>
--
Lee Jones
prev parent reply other threads:[~2026-12-02 12:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 18:58 [PATCH v2 0/3] mfd: tps65219: Let a board run past the warm threshold Chrispine Tinega
2026-11-16 18:58 ` [PATCH v2 1/3] mfd: tps65219: Correct the MASK_EFFECT field of MASK_CONFIG Chrispine Tinega
2026-11-16 18:58 ` [PATCH v2 2/3] regulator: dt-bindings: ti,tps65219: Add ti,no-warm-shutdown Chrispine Tinega
2026-11-23 11:57 ` Krzysztof Kozlowski
2026-11-16 18:58 ` [PATCH v2 3/3] mfd: tps65219: Keep running past the warm threshold when asked Chrispine Tinega
2026-12-02 12:08 ` Lee Jones [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=179510272267.63755.3004065732984227012@kernel.org \
--to=lee@kernel.org \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=dev@chrispinetinega.com \
--cc=devicetree@vger.kernel.org \
--cc=jerome.neanne@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--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
all inboxes | Powered by JetHome®