regulator: max8973: provide enable/disable if external control disabled
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 23 Nov 2012 08:37:42 +0000 (14:07 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 23 Nov 2012 12:16:35 +0000 (21:16 +0900)
If external control is enabled then do not provide regulator
enable/disable apis.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/max8973-regulator.c

index 140ff9d137ecb71893b51ba42554bcf40224e2d4..3ee26387b1211e07ca8f3e9e567aa511aa82b7bd 100644 (file)
@@ -398,7 +398,7 @@ static int __devinit max8973_probe(struct i2c_client *client,
        max->desc.uV_step = MAX8973_VOLATGE_STEP;
        max->desc.n_voltages = MAX8973_BUCK_N_VOLTAGE;
 
-       if (pdata->enable_ext_control) {
+       if (!pdata->enable_ext_control) {
                max->desc.enable_reg = MAX8973_VOUT;
                max->desc.enable_mask = MAX8973_VOUT_ENABLE;
                max8973_dcdc_ops.enable = regulator_enable_regmap;