[PATCH 01/01] regulator: support max8649
Mark Brown
broonie at opensource.wolfsonmicro.com
Tue Jan 26 06:04:20 EST 2010
On Tue, Jan 26, 2010 at 01:26:08AM -0500, Haojian Zhuang wrote:
This all looks good except...
> +static int max8649_enable_time(struct regulator_dev *rdev)
> +{
...
> + return (voltage / step);
I'd expect the time taken to enable to be the voltage multipled by the
step size rather than divided by the step size?
> +static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
> +{
> + struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
> +
> + switch (mode) {
> + case REGULATOR_MODE_FAST:
> + max8649_set_bits(info->i2c, info->vol_reg, MAX8649_FORCE_PWM,
> + MAX8649_FORCE_PWM);
> + break;
> + case REGULATOR_MODE_NORMAL:
> + max8649_set_bits(info->i2c, info->vol_reg,
> + MAX8649_FORCE_PWM, 0);
> + break;
This should really have a default case which rejects other modes.
More information about the linux-arm-kernel
mailing list