Subject: Re: [PATCH v12 2/5] regulator: Add support for MediaTek MT6373 SPMI PMIC Regulators

From: Mark Brown <[email-masked]>
Date: Tue, 12 May 2026 11:04:40 +0900

On Mon, May 11, 2026 at 12:13:52PM +0200, AngeloGioacchino Del Regno wrote:

> +static int mt6373_buck_unlock(struct regmap *map, bool unlock)
> +{
> +	u16 buf = unlock ? MT6373_BUCK_TOP_UNLOCK_VALUE : 0;
> +
> +	return regmap_bulk_write(map, MT6373_BUCK_TOP_KEY_PROT_LO, &buf, sizeof(buf));

regmap_bulk_write() takes a number of registers.

> +static irqreturn_t mt6373_oc_isr(int irq, void *data)
> +{
> +	struct regulator_dev *rdev = (struct regulator_dev *)data;
> +	struct mt6373_regulator_info *info = rdev_get_drvdata(rdev);
> +
> +	disable_irq_nosync(info->virq);
> +
> +	if (regulator_is_enabled_regmap(rdev))
> +		regulator_notifier_call_chain(rdev, REGULATOR_EVENT_OVER_CURRENT, NULL);

If the hardware is reporting an error we should report an error.

> +		INIT_DELAYED_WORK(&info->oc_work, mt6373_oc_irq_enable_work);

What stops this work on driver removal/unbind?