[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP1dx+yTS5mSQKKMFzXUYeOdDB2D0FNUVJ2vaGxrnOK-ZP=o8g@mail.gmail.com>
Date: Tue, 18 Sep 2012 15:31:29 +0800
From: Dong Aisheng <dong.aisheng@...aro.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Samuel Ortiz <sameo@...ux.intel.com>, linux-next@...r.kernel.org,
linux-kernel@...r.kernel.org, Axel Lin <axel.lin@...il.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: linux-next: manual merge of the mfd tree with Linus' tree
Hi Stephen,
On 18 September 2012 11:19, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> Hi Samuel,
>
> Today's linux-next merge of the mfd tree got a conflict in
> drivers/regulator/anatop-regulator.c between commit 3e2a928472da
> ("regulator: anatop: Fix wrong mask used in anatop_get_voltage_sel") from
> Linus' tree and commit baa64151aecc ("regulator: anatop-regulator:
> Convert to use syscon to access anatop register") from the mfd tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
>
> --
> Cheers,
> Stephen Rothwell sfr@...b.auug.org.au
>
> diff --cc drivers/regulator/anatop-regulator.c
> index ce0fe72,596535d..0000000
> --- a/drivers/regulator/anatop-regulator.c
> +++ b/drivers/regulator/anatop-regulator.c
> @@@ -61,18 -64,17 +64,18 @@@ static int anatop_regmap_set_voltage_se
> return 0;
> }
>
> - static int anatop_get_voltage_sel(struct regulator_dev *reg)
> + static int anatop_regmap_get_voltage_sel(struct regulator_dev *reg)
> {
> struct anatop_regulator *anatop_reg = rdev_get_drvdata(reg);
> - u32 val;
> + u32 val, mask;
>
> if (!anatop_reg->control_reg)
> return -ENOTSUPP;
>
> - val = anatop_read_reg(anatop_reg->mfd, anatop_reg->control_reg);
> + regmap_read(anatop_reg->anatop, anatop_reg->control_reg, &val);
> - val = (val & ((1 << anatop_reg->vol_bit_width) - 1)) >>
> + mask = ((1 << anatop_reg->vol_bit_width) - 1) <<
> anatop_reg->vol_bit_shift;
> + val = (val & mask) >> anatop_reg->vol_bit_shift;
>
> return val - anatop_reg->min_bit_val;
> }
The fix looks ok to me.
Regards
Dong Aisheng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists