Skip to contentSkip to conversation

iio: adc: ti-ads1015: add indio_dev->dev.of_node reference

PATCH In review Matt Ranostay 3 participants 3 messages Jul 1, 2016 – Jul 3, 2016 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: adc: ti-ads1015: add indio_dev->dev.of_node reference

Add the pointer to the device tree node of the ADC so that iio consumers can reference the respective channels.

---
 drivers/iio/adc/ti-ads1015.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/ti-ads1015.c +1 -0
index 8be192a84893..6f75a4aa67c1 100644
@@ -585,6 +585,7 @@ static int ads1015_probe(struct i2c_client *client,
 	mutex_init(&data->lock);
 
 	indio_dev->dev.parent = &client->dev;
+	indio_dev->dev.of_node = client->dev.of_node;
 	indio_dev->name = ADS1015_DRV_NAME;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Matt Ranostay

Add the pointer to the device tree node of the ADC so that iio consumers can reference the respective channels.

Quoted 23 lines
---
 drivers/iio/adc/ti-ads1015.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/ti-ads1015.c +1 -1
index 8be192a84893..6f75a4aa67c1 100644
@@ -585,6 +585,7 @@ static int ads1015_probe(struct i2c_client *client,
        mutex_init(&data->lock);
 
        indio_dev->dev.parent = &client->dev;
+       indio_dev->dev.of_node = client->dev.of_node;
        indio_dev->name = ADS1015_DRV_NAME;
        indio_dev->modes = INDIO_DIRECT_MODE;
 
--

2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#2 lore raw
Quoted 8 lines · Daniel Baluta
Quoted 5 lines · Matt Ranostay

Add the pointer to the device tree node of the ADC so that iio consumers can reference the respective channels.

I've applied this to the togreg branch of iio.git. Arguably it was never right before so no regression, but if you want a backport to stable we can probably argue it as trivial and useful.

Thanks,

Jonathan

Quoted 26 lines
Quoted 26 lines


---
 drivers/iio/adc/ti-ads1015.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/ti-ads1015.c +1 -1
index 8be192a84893..6f75a4aa67c1 100644
@@ -585,6 +585,7 @@ static int ads1015_probe(struct i2c_client *client,
        mutex_init(&data->lock);
 
        indio_dev->dev.parent = &client->dev;
+       indio_dev->dev.of_node = client->dev.of_node;
        indio_dev->name = ADS1015_DRV_NAME;
        indio_dev->modes = INDIO_DIRECT_MODE;
 
--

2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html