Commit c834e171 authored by Eva Rachel Retuya's avatar Eva Rachel Retuya Committed by Jonathan Cameron

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 7f2d496b
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment