From: Lee Jones <lee@kernel.org>
To: lee@kernel.org
Cc: linux-kernel@vger.kernel.org,
"André Draszik" <andre.draszik@linaro.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Bartosz Golaszewski" <brgl@kernel.org>,
"Charles Keepax" <ckeepax@opensource.cirrus.com>,
"ChiYuan Huang" <cy_huang@richtek.com>,
"Chris Morgan" <macromorgan@hotmail.com>,
"Douglas Anderson" <dianders@chromium.org>,
"Eduardo Candelaria" <jedu@slimlogic.co.uk>,
"Esteban Blanc" <eblanc@baylibre.com>,
"Graeme Gregory" <gg@slimlogic.co.uk>,
"Gyungoh Yoo" <jack.yoo@maxim-ic.com>,
"Jerome Neanne" <jneanne@baylibre.com>,
"Jiale Yao" <yaojiale02@163.com>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
"Laxman Dewangan" <ldewangan@nvidia.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Linus Walleij" <linusw@kernel.org>,
"Mal Nadar" <m.nirmaladevi@ltts.com>,
"Mark Brown" <broonie@kernel.org>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
"Stephen Warren" <swarren@nvidia.com>,
"Uday Khare" <udaykhare77@gmail.com>,
"Wentao Liang" <vulab@iscas.ac.cn>,
linux-gpio@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH 00/10] regulator: Fix teardown races, reference counting, and error handling
Date: Wed, 4 Nov 2026 18:20:50 +0000 [thread overview]
Message-ID: <20261104182148.1176116-1-lee@kernel.org> (raw)
These issues were reported by Sashiko.
This series addresses ten bugs across the regulator core and regulator
drivers:
- Clear the caller's handle pointer (*handle = NULL) in
regulator_irq_helper_cancel() instead of assigning NULL to the local
variable.
- Remove the redundant arizona_ldo1_remove() callback that caused a
premature and double gpiod_put() on config.ena_gpiod (whose lifetime
is owned by the regulator core).
- Flush rdev->disable_work with flush_delayed_work() before releasing
rdev->supply in regulator_unregister().
- Cancel micsupp->check_cp_work on device teardown in arizona-micsupp
using devm_work_autocancel().
- Take a dedicated device reference for rdev->supply in set_supply() and
retain the local lookup reference throughout regulator_resolve_supply().
- Initialise rdev->last_off with ktime_get_boottime() in
set_machine_constraints() to match _regulator_do_enable() and
_regulator_do_disable().
- Propagate GPIO lookup errors (such as -EPROBE_DEFER) from
bq257xx_reg_dt_parse_gpio() instead of leaving an ERR_PTR in
pdata->otg_en_gpio.
- Fix the LDO4 n_voltages count in tps6594-regulator so selectors 0x3f
through 0x74 are reachable.
- Guard against a NULL idata pointer for BBAT, SDBY, and VRTC in
max8907_regulator_probe().
- Check the pm_runtime_resume_and_get() return value in
rt6190_out_enable().
Cc: "André Draszik" <andre.draszik@linaro.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>
Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: ChiYuan Huang <cy_huang@richtek.com>
Cc: Chris Morgan <macromorgan@hotmail.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Eduardo Candelaria <jedu@slimlogic.co.uk>
Cc: Esteban Blanc <eblanc@baylibre.com>
Cc: Graeme Gregory <gg@slimlogic.co.uk>
Cc: Gyungoh Yoo <jack.yoo@maxim-ic.com>
Cc: Jerome Neanne <jneanne@baylibre.com>
Cc: Jiale Yao <yaojiale02@163.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>
Cc: Mal Nadar <m.nirmaladevi@ltts.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Uday Khare <udaykhare77@gmail.com>
Cc: Wentao Liang <vulab@iscas.ac.cn>
Cc: linux-gpio@vger.kernel.org
Cc: patches@opensource.cirrus.com
Lee Jones (10):
regulator: irq_helpers: Clear caller handle in
regulator_irq_helper_cancel()
regulator: arizona-ldo1: Avoid double gpiod_put() on enable GPIO
regulator: core: Flush delayed disable_work before releasing supply in
regulator_unregister()
regulator: arizona-micsupp: Cancel check_cp_work on device teardown
regulator: core: Hold supply device reference until constraints are
resolved in regulator_resolve_supply()
regulator: core: Use ktime_get_boottime() in set_machine_constraints()
regulator: bq257xx: Propagate GPIO error in
bq257xx_reg_dt_parse_gpio()
regulator: tps6594-regulator: Fix LDO4 n_voltages in tps6594_ldo_regs
regulator: max8907: Avoid NULL idata dereference in
max8907_regulator_probe()
regulator: rt6190: Check pm_runtime_resume_and_get() return value in
rt6190_out_enable()
drivers/regulator/arizona-ldo1.c | 16 ----------------
drivers/regulator/arizona-micsupp.c | 6 +++++-
drivers/regulator/bq257xx-regulator.c | 20 ++++++++++++--------
drivers/regulator/core.c | 22 ++++++++++++----------
drivers/regulator/irq_helpers.c | 2 +-
drivers/regulator/max8907-regulator.c | 3 ++-
drivers/regulator/rt6190-regulator.c | 4 +++-
drivers/regulator/tps6594-regulator.c | 2 +-
8 files changed, 36 insertions(+), 39 deletions(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.56.0.385.gac671c819a-goog
next reply other threads:[~2026-11-04 18:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 18:20 Lee Jones [this message]
2026-11-04 18:20 ` [PATCH 01/10] regulator: irq_helpers: Clear caller handle in regulator_irq_helper_cancel() Lee Jones
2026-11-04 18:20 ` [PATCH 02/10] regulator: arizona-ldo1: Avoid double gpiod_put() on enable GPIO Lee Jones
2026-11-04 18:20 ` [PATCH 03/10] regulator: core: Flush delayed disable_work before releasing supply in regulator_unregister() Lee Jones
2026-11-04 18:20 ` [PATCH 04/10] regulator: arizona-micsupp: Cancel check_cp_work on device teardown Lee Jones
2026-11-04 18:20 ` [PATCH 05/10] regulator: core: Hold supply device reference until constraints are resolved in regulator_resolve_supply() Lee Jones
2026-11-04 18:20 ` [PATCH 06/10] regulator: core: Use ktime_get_boottime() in set_machine_constraints() Lee Jones
2026-11-04 18:20 ` [PATCH 07/10] regulator: bq257xx: Propagate GPIO error in bq257xx_reg_dt_parse_gpio() Lee Jones
2026-11-04 18:20 ` [PATCH 08/10] regulator: tps6594-regulator: Fix LDO4 n_voltages in tps6594_ldo_regs Lee Jones
2026-11-04 18:20 ` [PATCH 09/10] regulator: max8907: Avoid NULL idata dereference in max8907_regulator_probe() Lee Jones
2026-11-04 18:21 ` [PATCH 10/10] regulator: rt6190: Check pm_runtime_resume_and_get() return value in rt6190_out_enable() 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=20261104182148.1176116-1-lee@kernel.org \
--to=lee@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=cy_huang@richtek.com \
--cc=dianders@chromium.org \
--cc=eblanc@baylibre.com \
--cc=gg@slimlogic.co.uk \
--cc=jack.yoo@maxim-ic.com \
--cc=jedu@slimlogic.co.uk \
--cc=jneanne@baylibre.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=ldewangan@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.nirmaladevi@ltts.com \
--cc=macromorgan@hotmail.com \
--cc=mazziesaccount@gmail.com \
--cc=patches@opensource.cirrus.com \
--cc=swarren@nvidia.com \
--cc=udaykhare77@gmail.com \
--cc=vulab@iscas.ac.cn \
--cc=yaojiale02@163.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®