浏览代码

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.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Matt Ranostay 9 年之前
父节点
当前提交
f5241dbdfe
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/iio/adc/ti-ads1015.c

+ 1 - 0
drivers/iio/adc/ti-ads1015.c

@@ -586,6 +586,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;