Commit b541eaff authored by Matt Ranostay's avatar Matt Ranostay Committed by Jonathan Cameron

iio: adc: add missing of_node references to iio_dev

Adding missing indio_dev->dev.of_node references to allow iio consumers
to access the device channels.
Signed-off-by: default avatarMatt Ranostay <mranostay@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent f5241dbd
...@@ -437,6 +437,7 @@ static int ad7266_probe(struct spi_device *spi) ...@@ -437,6 +437,7 @@ static int ad7266_probe(struct spi_device *spi)
st->spi = spi; st->spi = spi;
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &ad7266_info; indio_dev->info = &ad7266_info;
......
...@@ -505,6 +505,7 @@ static int ad7291_probe(struct i2c_client *client, ...@@ -505,6 +505,7 @@ static int ad7291_probe(struct i2c_client *client,
indio_dev->num_channels = ARRAY_SIZE(ad7291_channels); indio_dev->num_channels = ARRAY_SIZE(ad7291_channels);
indio_dev->dev.parent = &client->dev; indio_dev->dev.parent = &client->dev;
indio_dev->dev.of_node = client->dev.of_node;
indio_dev->info = &ad7291_info; indio_dev->info = &ad7291_info;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
......
...@@ -315,6 +315,7 @@ static int ad7298_probe(struct spi_device *spi) ...@@ -315,6 +315,7 @@ static int ad7298_probe(struct spi_device *spi)
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = ad7298_channels; indio_dev->channels = ad7298_channels;
indio_dev->num_channels = ARRAY_SIZE(ad7298_channels); indio_dev->num_channels = ARRAY_SIZE(ad7298_channels);
......
...@@ -227,6 +227,7 @@ static int ad7476_probe(struct spi_device *spi) ...@@ -227,6 +227,7 @@ static int ad7476_probe(struct spi_device *spi)
/* Establish that the iio_dev is a child of the spi device */ /* Establish that the iio_dev is a child of the spi device */
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->chip_info->channel; indio_dev->channels = st->chip_info->channel;
......
...@@ -375,6 +375,7 @@ static int ad7791_probe(struct spi_device *spi) ...@@ -375,6 +375,7 @@ static int ad7791_probe(struct spi_device *spi)
spi_set_drvdata(spi, indio_dev); spi_set_drvdata(spi, indio_dev);
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->info->channels; indio_dev->channels = st->info->channels;
......
...@@ -784,6 +784,7 @@ static int ad7793_probe(struct spi_device *spi) ...@@ -784,6 +784,7 @@ static int ad7793_probe(struct spi_device *spi)
spi_set_drvdata(spi, indio_dev); spi_set_drvdata(spi, indio_dev);
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->chip_info->channels; indio_dev->channels = st->chip_info->channels;
......
...@@ -264,6 +264,7 @@ static int ad7887_probe(struct spi_device *spi) ...@@ -264,6 +264,7 @@ static int ad7887_probe(struct spi_device *spi)
/* Estabilish that the iio_dev is a child of the spi device */ /* Estabilish that the iio_dev is a child of the spi device */
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->info = &ad7887_info; indio_dev->info = &ad7887_info;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
......
...@@ -288,6 +288,7 @@ static int ad7923_probe(struct spi_device *spi) ...@@ -288,6 +288,7 @@ static int ad7923_probe(struct spi_device *spi)
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = info->channels; indio_dev->channels = info->channels;
indio_dev->num_channels = info->num_channels; indio_dev->num_channels = info->num_channels;
......
...@@ -806,6 +806,7 @@ static int ad799x_probe(struct i2c_client *client, ...@@ -806,6 +806,7 @@ static int ad799x_probe(struct i2c_client *client,
st->client = client; st->client = client;
indio_dev->dev.parent = &client->dev; indio_dev->dev.parent = &client->dev;
indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = id->name; indio_dev->name = id->name;
indio_dev->info = st->chip_config->info; indio_dev->info = st->chip_config->info;
......
...@@ -455,6 +455,7 @@ static int hi8435_probe(struct spi_device *spi) ...@@ -455,6 +455,7 @@ static int hi8435_probe(struct spi_device *spi)
mutex_init(&priv->lock); mutex_init(&priv->lock);
idev->dev.parent = &spi->dev; idev->dev.parent = &spi->dev;
idev->dev.of_node = spi->dev.of_node;
idev->name = spi_get_device_id(spi)->name; idev->name = spi_get_device_id(spi)->name;
idev->modes = INDIO_DIRECT_MODE; idev->modes = INDIO_DIRECT_MODE;
idev->info = &hi8435_info; idev->info = &hi8435_info;
......
...@@ -691,6 +691,7 @@ static int ina2xx_probe(struct i2c_client *client, ...@@ -691,6 +691,7 @@ static int ina2xx_probe(struct i2c_client *client,
indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE; indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE;
indio_dev->dev.parent = &client->dev; indio_dev->dev.parent = &client->dev;
indio_dev->dev.of_node = client->dev.of_node;
indio_dev->channels = ina2xx_channels; indio_dev->channels = ina2xx_channels;
indio_dev->num_channels = ARRAY_SIZE(ina2xx_channels); indio_dev->num_channels = ARRAY_SIZE(ina2xx_channels);
indio_dev->name = id->name; indio_dev->name = id->name;
......
...@@ -426,6 +426,7 @@ static int max1027_probe(struct spi_device *spi) ...@@ -426,6 +426,7 @@ static int max1027_probe(struct spi_device *spi)
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->info = &max1027_info; indio_dev->info = &max1027_info;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->info->channels; indio_dev->channels = st->info->channels;
......
...@@ -1646,6 +1646,7 @@ static int max1363_probe(struct i2c_client *client, ...@@ -1646,6 +1646,7 @@ static int max1363_probe(struct i2c_client *client,
/* Establish that the iio_dev is a child of the i2c device */ /* Establish that the iio_dev is a child of the i2c device */
indio_dev->dev.parent = &client->dev; indio_dev->dev.parent = &client->dev;
indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = id->name; indio_dev->name = id->name;
indio_dev->channels = st->chip_info->channels; indio_dev->channels = st->chip_info->channels;
indio_dev->num_channels = st->chip_info->num_channels; indio_dev->num_channels = st->chip_info->num_channels;
......
...@@ -308,6 +308,7 @@ static int mcp320x_probe(struct spi_device *spi) ...@@ -308,6 +308,7 @@ static int mcp320x_probe(struct spi_device *spi)
adc->spi = spi; adc->spi = spi;
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &mcp320x_info; indio_dev->info = &mcp320x_info;
......
...@@ -352,6 +352,7 @@ static int mcp3422_probe(struct i2c_client *client, ...@@ -352,6 +352,7 @@ static int mcp3422_probe(struct i2c_client *client,
mutex_init(&adc->lock); mutex_init(&adc->lock);
indio_dev->dev.parent = &client->dev; indio_dev->dev.parent = &client->dev;
indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = dev_name(&client->dev); indio_dev->name = dev_name(&client->dev);
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &mcp3422_info; indio_dev->info = &mcp3422_info;
......
...@@ -433,6 +433,7 @@ static int nau7802_probe(struct i2c_client *client, ...@@ -433,6 +433,7 @@ static int nau7802_probe(struct i2c_client *client,
i2c_set_clientdata(client, indio_dev); i2c_set_clientdata(client, indio_dev);
indio_dev->dev.parent = &client->dev; indio_dev->dev.parent = &client->dev;
indio_dev->dev.of_node = client->dev.of_node;
indio_dev->name = dev_name(&client->dev); indio_dev->name = dev_name(&client->dev);
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &nau7802_info; indio_dev->info = &nau7802_info;
......
...@@ -186,6 +186,7 @@ static int adc081c_probe(struct i2c_client *client, ...@@ -186,6 +186,7 @@ static int adc081c_probe(struct i2c_client *client,
return err; return err;
iio->dev.parent = &client->dev; iio->dev.parent = &client->dev;
iio->dev.of_node = client->dev.of_node;
iio->name = dev_name(&client->dev); iio->name = dev_name(&client->dev);
iio->modes = INDIO_DIRECT_MODE; iio->modes = INDIO_DIRECT_MODE;
iio->info = &adc081c_info; iio->info = &adc081c_info;
......
...@@ -194,6 +194,7 @@ static int adc0832_probe(struct spi_device *spi) ...@@ -194,6 +194,7 @@ static int adc0832_probe(struct spi_device *spi)
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->info = &adc0832_info; indio_dev->info = &adc0832_info;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
......
...@@ -150,6 +150,7 @@ static int adc128_probe(struct spi_device *spi) ...@@ -150,6 +150,7 @@ static int adc128_probe(struct spi_device *spi)
spi_set_drvdata(spi, indio_dev); spi_set_drvdata(spi, indio_dev);
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &adc128_info; indio_dev->info = &adc128_info;
......
...@@ -421,6 +421,7 @@ static int ads8688_probe(struct spi_device *spi) ...@@ -421,6 +421,7 @@ static int ads8688_probe(struct spi_device *spi)
indio_dev->name = spi_get_device_id(spi)->name; indio_dev->name = spi_get_device_id(spi)->name;
indio_dev->dev.parent = &spi->dev; indio_dev->dev.parent = &spi->dev;
indio_dev->dev.of_node = spi->dev.of_node;
indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = st->chip_info->channels; indio_dev->channels = st->chip_info->channels;
indio_dev->num_channels = st->chip_info->num_channels; indio_dev->num_channels = st->chip_info->num_channels;
......
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