[PATCH 5/6] regulator: Add driver for MediaTek MT6328 PMIC regulators

Mark Brown broonie at kernel.org
Tue Oct 22 09:31:10 PDT 2024


On Fri, Oct 18, 2024 at 11:10:47AM +0300, Yassine Oudjana wrote:

> +static int mt6328_ldo_table_set_mode(struct regulator_dev *rdev, unsigned int mode)
> +{
> +	int ret, val = 0;
> +	struct mt6328_regulator_info *info = rdev_get_drvdata(rdev);
> +
> +	if (!info->modeset_mask) {
> +		dev_err(&rdev->dev, "regulator %s doesn't support set_mode\n",
> +			info->desc.name);
> +		return -EINVAL;
> +	}

If the regulator doesn't support setting modes it shouldn't have any
mode operations, then the core will take care of handling things
appropriately.

Otherwise this looks good.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20241022/4c4fccf6/attachment-0001.sig>


More information about the Linux-mediatek mailing list