staging: iio: ad7606: set proper supply name to devm_regulator_get()
authorEva Rachel Retuya <[email protected]>
Thu, 20 Oct 2016 13:08:22 +0000 (21:08 +0800)
committerJonathan Cameron <[email protected]>
Sun, 23 Oct 2016 18:34:19 +0000 (19:34 +0100)
The name passed to devm_regulator_get() should match the name of the
supply as specified in the device datasheet. The supply on this device
is called 'AVcc' while currently, the driver uses just 'vcc'.

Use 'avcc' to specify the supply voltage since it is custom to use the
lower-caps version of the datasheet name.

Suggested-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Eva Rachel Retuya <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
drivers/staging/iio/adc/ad7606.c

index 010c6e16fb7c8c05df9fca3abd6e1790430d48b6..f9b354ff820a9502857635148b333837fed39d2b 100644 (file)
@@ -424,7 +424,7 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
        st->oversampling = 1;
        INIT_WORK(&st->poll_work, &ad7606_poll_bh_to_ring);
 
-       st->reg = devm_regulator_get(dev, "vcc");
+       st->reg = devm_regulator_get(dev, "avcc");
        if (!IS_ERR(st->reg)) {
                ret = regulator_enable(st->reg);
                if (ret)