regulator: max5970: Fix regulator child node name
[linux-block.git] / drivers / regulator / max5970-regulator.c
index bc88a40a88d4cac0bbe61efc4725703b1136654e..8bbcd983a74aa8d8e5db6ae9e9cb7480a9220575 100644 (file)
@@ -29,8 +29,8 @@ struct max5970_regulator {
 };
 
 enum max597x_regulator_id {
-       MAX597X_SW0,
-       MAX597X_SW1,
+       MAX597X_sw0,
+       MAX597X_sw1,
 };
 
 static int max5970_read_adc(struct regmap *regmap, int reg, long *val)
@@ -378,8 +378,8 @@ static int max597x_dt_parse(struct device_node *np,
 }
 
 static const struct regulator_desc regulators[] = {
-       MAX597X_SWITCH(SW0, MAX5970_REG_CHXEN, 0, "vss1"),
-       MAX597X_SWITCH(SW1, MAX5970_REG_CHXEN, 1, "vss2"),
+       MAX597X_SWITCH(sw0, MAX5970_REG_CHXEN, 0, "vss1"),
+       MAX597X_SWITCH(sw1, MAX5970_REG_CHXEN, 1, "vss2"),
 };
 
 static int max597x_regmap_read_clear(struct regmap *map, unsigned int reg,
@@ -392,7 +392,7 @@ static int max597x_regmap_read_clear(struct regmap *map, unsigned int reg,
                return ret;
 
        if (*val)
-               return regmap_write(map, reg, *val);
+               return regmap_write(map, reg, 0);
 
        return 0;
 }