linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hsin-hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <srv_heupstream@mediatek.com>,
	Wen Su <wen.su@mediatek.com>
Subject: Re: [PATCH v3 5/8] regulator: mt6359: Add support for MT6359 regulator
Date: Tue, 15 Dec 2020 17:23:08 +0800	[thread overview]
Message-ID: <1608024188.29527.2.camel@mtksdaap41> (raw)
In-Reply-To: <20201124170732.GI4933@sirena.org.uk>

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.

  reply	other threads:[~2020-12-15  9:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23  3:48 [PATCH v3 0/8] Add Support for MediaTek PMIC MT6359 Hsin-Hsiung Wang
2020-11-23  3:48 ` [PATCH v3 1/8] mfd: mt6358: refine interrupt code Hsin-Hsiung Wang
2020-11-27  9:29   ` Lee Jones
2020-11-23  3:48 ` [PATCH v3 2/8] dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC Hsin-Hsiung Wang
2020-11-23  3:48 ` [PATCH v3 3/8] dt-bindings: regulator: Add document for MT6359 regulator Hsin-Hsiung Wang
2020-11-30 16:33   ` Rob Herring
2020-11-23  3:48 ` [PATCH v3 4/8] mfd: Add support for the MediaTek MT6359 PMIC Hsin-Hsiung Wang
2020-11-23  3:48 ` [PATCH v3 5/8] regulator: mt6359: Add support for MT6359 regulator Hsin-Hsiung Wang
2020-11-24 17:07   ` Mark Brown
2020-12-15  9:23     ` Hsin-hsiung Wang [this message]
2020-12-15 11:56       ` Mark Brown
2020-12-16  3:24         ` Hsin-hsiung Wang
2020-11-23  3:48 ` [PATCH v3 6/8] regulator: mt6359: Set the enable time for LDOs Hsin-Hsiung Wang
2020-11-23  3:48 ` [PATCH v3 7/8] regulator: mt6359: Add support for MT6359P regulator Hsin-Hsiung Wang
2020-11-24 17:09   ` Mark Brown
2020-11-27  9:19   ` Lee Jones
2020-11-23  3:48 ` [PATCH v3 8/8] arm64: dts: mt6359: add PMIC MT6359 related nodes Hsin-Hsiung Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1608024188.29527.2.camel@mtksdaap41 \
    --to=hsin-hsiung.wang@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=wen.su@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).