Re: [PATCH 5/6] regulator: Add driver for MediaTek MT6328 PMIC regulators
From: Mark Brown
Date: Tue Oct 22 2024 - 12:31:41 EST
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.
Attachment:
signature.asc
Description: PGP signature