Skip to contentSkip to conversation

regulator: s2mps11: Question about the code updating ramp_delay setting

DISCUSSION Axel Lin 1 participant 1 message Aug 3, 2013

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

Hi Yadwinder,
The code updating ramp_delay setting looks wrong to me.

Current code:

        return regmap_update_bits(rdev->regmap, ramp_reg,
                                  ramp_val << ramp_shift, 1 << ramp_shift);
I'd expect something like below:
        return regmap_update_bits(rdev->regmap, ramp_reg,
                                  ramp_mask << ramp_shift,
                                  ramp_val << ramp_shift);

I don't have the datasheet so I don't know the correct ramp_mask setting here. Can you check if this needs fix?

Thanks,
Axel