Re: [PATCH 15/33] regulator: ab8500-ext: Add support for AB9540regulators

From: Mark Brown
Date: Mon Apr 01 2013 - 08:22:41 EST


On Thu, Mar 28, 2013 at 04:11:15PM +0000, Lee Jones wrote:

> +static struct regulator_ops ab9540_ext_regulator_ops = {
> + .enable = ab8500_ext_regulator_enable,
> + .disable = ab8500_ext_regulator_disable,
> + .is_enabled = ab8500_ext_regulator_is_enabled,
> + .set_mode = ab8500_ext_regulator_set_mode,
> + .get_mode = ab8500_ext_regulator_get_mode,
> + .get_voltage = ab8500_ext_fixed_get_voltage,
> + .list_voltage = ab8500_ext_list_voltage,
> +};
> +

> + if (is_ab9540(ab8500) &&
> + ((info->desc.id == AB8500_EXT_SUPPLY1) ||
> + (info->desc.id == AB8500_EXT_SUPPLY2) ||
> + (info->desc.id == AB8500_EXT_SUPPLY3)))
> + info->desc.ops = &ab9540_ext_regulator_ops;
> +

This appears to be identical to the ab8500, why do we need a separate
set of ops?

Attachment: signature.asc
Description: Digital signature