lkml.org 
[lkml]   [2020]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 5/8] regulator: mt6359: Add support for MT6359 regulator
From
Date
Hi,

On Tue, 2020-11-24 at 17:07 +0000, Mark Brown wrote:
> On Mon, Nov 23, 2020 at 11:48:07AM +0800, Hsin-Hsiung Wang wrote:
>
> > +static int mt6359_get_linear_voltage_sel(struct regulator_dev *rdev)
> > +{
> > + struct mt6359_regulator_info *info = rdev_get_drvdata(rdev);
> > + int ret, regval;
> > +
> > + ret = regmap_read(rdev->regmap, info->da_vsel_reg, &regval);
> > + if (ret != 0) {
> > + dev_err(&rdev->dev,
> > + "Failed to get mt6359 Buck %s vsel reg: %d\n",
> > + info->desc.name, ret);
> > + return ret;
> > + }
> > +
> > + ret = (regval >> info->da_vsel_shift) & info->da_vsel_mask;
> > +
> > + return ret;
> > +}
>
> This looks like it could just be regmap_get_voltage_sel_regmap()?
> Otherwise the driver looks good.

Thanks for the review.
MT6359 regulator has sel_reg and status_reg, so we use
mt6359_get_linear_voltage_sel for status_reg instead of
regmap_get_voltage_sel_regmap() which uses sel_reg.

Thanks.
\
 
 \ /
  Last update: 2020-12-15 10:25    [W:0.064 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site