lkml.org 
[lkml]   [2012]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: linux-next: manual merge of the mfd tree with Linus' tree
From
Hi Stephen,

On 18 September 2012 11:19, Stephen Rothwell <sfr@canb.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@canb.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


\
 
 \ /
  Last update: 2012-09-18 10:21    [W:0.040 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site