staging: iio: set proper supply name to devm_regulator_get()
authorEva Rachel Retuya <eraretuya@gmail.com>
Mon, 31 Oct 2016 17:04:30 +0000 (01:04 +0800)
committerJonathan Cameron <jic23@kernel.org>
Sat, 5 Nov 2016 16:07:13 +0000 (16:07 +0000)
The name passed to devm_regulator_get() should match the name of the
supply as specified in the device datasheet. This makes it clear what
power supply is being referred to in case of presence of other
regulators.

Currently, the supply name specified on the affected devices is 'vcc'.
Use lowercase version of the datasheet name to specify the supply
voltage.

Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7192.c
drivers/staging/iio/adc/ad7780.c
drivers/staging/iio/frequency/ad9832.c
drivers/staging/iio/frequency/ad9834.c
drivers/staging/iio/impedance-analyzer/ad5933.c

index bfa12ceb1e1ff60e4f7f21c6b159c387374d3ace..41fb32de5992ba2a1409e0d87e188fdc9998d539 100644 (file)
@@ -633,7 +633,7 @@ static int ad7192_probe(struct spi_device *spi)
 
        st = iio_priv(indio_dev);
 
-       st->reg = devm_regulator_get(&spi->dev, "vcc");
+       st->reg = devm_regulator_get(&spi->dev, "avdd");
        if (!IS_ERR(st->reg)) {
                ret = regulator_enable(st->reg);
                if (ret)
index c9a0c2aa602f7903425278742c40f3a1104a4d0c..a88236e74cdbffa6c103d92f46dc7d48c44c4a3b 100644 (file)
@@ -173,7 +173,7 @@ static int ad7780_probe(struct spi_device *spi)
 
        ad_sd_init(&st->sd, indio_dev, spi, &ad7780_sigma_delta_info);
 
-       st->reg = devm_regulator_get(&spi->dev, "vcc");
+       st->reg = devm_regulator_get(&spi->dev, "avdd");
        if (!IS_ERR(st->reg)) {
                ret = regulator_enable(st->reg);
                if (ret)
index 358400b22d33356d606dead1a1de0b2fcd424ebd..744c8ee9c5a6b752fec7b03afffdcd1e95c4e622 100644 (file)
@@ -212,7 +212,7 @@ static int ad9832_probe(struct spi_device *spi)
                return -ENODEV;
        }
 
-       reg = devm_regulator_get(&spi->dev, "vcc");
+       reg = devm_regulator_get(&spi->dev, "avdd");
        if (!IS_ERR(reg)) {
                ret = regulator_enable(reg);
                if (ret)
index 6366216e4f3783cabbf8c2270c0f54caa9a5b448..ca3cea68d8d7c204e3eec174a966fce1eba1e75b 100644 (file)
@@ -329,7 +329,7 @@ static int ad9834_probe(struct spi_device *spi)
                return -ENODEV;
        }
 
-       reg = devm_regulator_get(&spi->dev, "vcc");
+       reg = devm_regulator_get(&spi->dev, "avdd");
        if (!IS_ERR(reg)) {
                ret = regulator_enable(reg);
                if (ret)
index 5eecf1cb1028892796872ad592daf3a5e4d89e3c..62f61bcc0003e1977d532c89fad0deec8edf2641 100644 (file)
@@ -723,7 +723,7 @@ static int ad5933_probe(struct i2c_client *client,
        if (!pdata)
                pdata = &ad5933_default_pdata;
 
-       st->reg = devm_regulator_get(&client->dev, "vcc");
+       st->reg = devm_regulator_get(&client->dev, "vdd");
        if (!IS_ERR(st->reg)) {
                ret = regulator_enable(st->reg);
                if (ret)