[PATCH v11 11/24] scsi: ufs: mediatek: Handle misc host voltage regulators

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Sep 1 09:11:08 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Use of dev_err() instead of dev_err_probe() for a function that can return -EPROBE_DEFER.
--

commit 46d3c0154cbe65fe31d813b45eaa3cb1732757ae
Author: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>

scsi: ufs: mediatek: Handle misc host voltage regulators

MediaTek SoCs handled by this driver contain a per-SoC specific set of
miscellaneous supplies. Add the necessary driver code to acquire these
supplies using the regulator bulk API and keep them on during suspend.

> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
> index 6bbf53b658f2d..f61727879c3c7 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c

[ ... ]

> @@ -1217,10 +1219,20 @@ static int ufs_mtk_get_supplies(struct ufs_mtk_host *host)
>  {
>  	struct device *dev = host->hba->dev;
>  	const struct ufs_mtk_soc_data *data = of_device_get_match_data(dev);
> +	int ret;
>  
>  	if (!data)
>  		return 0;
>  
> +	if (data->num_reg_names) {
> +		ret = devm_regulator_bulk_get_enable(dev, data->num_reg_names,
> +						     data->reg_names);
> +		if (ret) {
> +			dev_err(dev, "Failed to get misc regulators: %pe\n", ERR_PTR(ret));

[Severity: Low]
Could this spam dmesg during probe deferral?

If the regulators are not yet available when ufs_mtk_probe() calls
ufs_mtk_get_supplies(), devm_regulator_bulk_get_enable() will return
-EPROBE_DEFER. This causes dev_err() to print an error message on every probe
retry.

Would it be better to use dev_err_probe() here instead to quietly handle
-EPROBE_DEFER and avoid the log spam?

> +			return ret;
> +		}
> +	}
> +
>  	if (data->has_avdd09) {
>  		host->reg_avdd09 = devm_regulator_get_optional(dev, "avdd09");
>  		if (IS_ERR(host->reg_avdd09)) {

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260901-mt8196-ufs-v11-0-dbd007704490@collabora.com?part=11



More information about the linux-phy mailing list