staging: iio: set proper supply name to devm_regulator_get()

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>
This commit is contained in:
Eva Rachel Retuya 2016-11-01 01:04:30 +08:00 committed by Jonathan Cameron
parent 7f2d496b5e
commit c834e1718a
5 changed files with 5 additions and 5 deletions

View 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)

View 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)

View 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)

View 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)

View 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)