All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graeme Gregory <gg@slimlogic.co.uk>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH RFC/RFT] regulator: palmas: Clear PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits in palmas_set_mode_smps
Date: Thu, 07 Jun 2012 11:58:31 +0100	[thread overview]
Message-ID: <4FD08957.5080901@slimlogic.co.uk> (raw)
In-Reply-To: <1339060101.5274.5.camel@phoenix>

That looks like a C&P error on my part.

Thanks for noticing.

Acked-by: Graeme Gregory <gg@slimlogic.co.uk>

On 07/06/12 10:08, Axel Lin wrote:
> Current code actually clears more bits than PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> Hi Graeme,
>
> I'm wandering if we need to clear the status bits.
> Current code actually clears bit[7:4] and bit[1:0] and set bit[7:6] to bit[3:2].
> Looks like we only need to clear PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bit[1:0] bits here.
> and this change makes the intent more clear.
>
> I don't have this hardware,
> I'd appreciate if you can test this patch if you think this change ok.
>
> Regards,
> Axel
>  drivers/regulator/palmas-regulator.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
> index 92f475c..ae0951a 100644
> --- a/drivers/regulator/palmas-regulator.c
> +++ b/drivers/regulator/palmas-regulator.c
> @@ -257,8 +257,7 @@ static int palmas_set_mode_smps(struct regulator_dev *dev, unsigned int mode)
>  	unsigned int reg;
>  
>  	palmas_smps_read(pmic->palmas, palmas_regs_info[id].ctrl_addr, &reg);
> -	reg &= ~PALMAS_SMPS12_CTRL_STATUS_MASK;
> -	reg >>= PALMAS_SMPS12_CTRL_STATUS_SHIFT;
> +	reg &= ~PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK;
>  
>  	switch (mode) {
>  	case REGULATOR_MODE_NORMAL:


  reply	other threads:[~2012-06-07 10:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  9:08 [PATCH RFC/RFT] regulator: palmas: Clear PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits in palmas_set_mode_smps Axel Lin
2012-06-07 10:58 ` Graeme Gregory [this message]
2012-06-07 23:29 ` Mark Brown

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=4FD08957.5080901@slimlogic.co.uk \
    --to=gg@slimlogic.co.uk \
    --cc=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.