All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] iio: Fix missing parent device initalization
@ 2017-02-11 12:34 Lars-Peter Clausen
  2017-02-11 12:34 ` [PATCH 1/8] iio: stx104: Set parent device Lars-Peter Clausen
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Add parent device initialization to drivers that are currently missing it.
Setting the parent device makes sure that the IIO device shows up at the
right level in the device hierachy.

The following coccinelle semantic patch was used to find the offending
drivers:
// <smpl>
@r1@
identifier indio_dev;
position p;
@@
indio_dev->dev.parent = ...;
...
(
iio_device_register@p(indio_dev)
|
devm_iio_device_register@p(..., indio_dev)
)

@@
position p != r1.p;
identifier indio_dev;
@@
(
*iio_device_register@p(indio_dev)
|
*devm_iio_device_register@p(..., indio_dev)
)
// </smpl>

- Lars

Lars-Peter Clausen (8):
  iio: stx104: Set parent device
  iio: quad-8: Set parent device
  iio: cio-dac: Set parent device
  iio: max30100: Set parent device
  iio: max30102: Set parent device
  iio: lmp91000: Set parent device
  iio: pulsedlight-lidar-lite-v2: Set parent device
  iio: maxim_thermocouple: Set parent device

 drivers/iio/adc/stx104.c                          | 1 +
 drivers/iio/counter/104-quad-8.c                  | 1 +
 drivers/iio/dac/cio-dac.c                         | 1 +
 drivers/iio/health/max30100.c                     | 1 +
 drivers/iio/health/max30102.c                     | 1 +
 drivers/iio/potentiostat/lmp91000.c               | 1 +
 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 +
 drivers/iio/temperature/maxim_thermocouple.c      | 1 +
 8 files changed, 8 insertions(+)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/8] iio: stx104: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-11 12:58   ` William Breathitt Gray
  2017-02-11 12:34 ` [PATCH 2/8] iio: quad-8: " Lars-Peter Clausen
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/adc/stx104.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/stx104.c b/drivers/iio/adc/stx104.c
index be2de48..2df84fa5 100644
--- a/drivers/iio/adc/stx104.c
+++ b/drivers/iio/adc/stx104.c
@@ -318,6 +318,7 @@ static int stx104_probe(struct device *dev, unsigned int id)
 	}
 
 	indio_dev->name = dev_name(dev);
+	indio_dev->dev.parent = dev;
 
 	priv = iio_priv(indio_dev);
 	priv->base = base[id];
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/8] iio: quad-8: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
  2017-02-11 12:34 ` [PATCH 1/8] iio: stx104: Set parent device Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-11 12:59   ` William Breathitt Gray
  2017-02-11 12:34 ` [PATCH 3/8] iio: cio-dac: " Lars-Peter Clausen
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/counter/104-quad-8.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/counter/104-quad-8.c b/drivers/iio/counter/104-quad-8.c
index a5913e9..e381ca6 100644
--- a/drivers/iio/counter/104-quad-8.c
+++ b/drivers/iio/counter/104-quad-8.c
@@ -551,6 +551,7 @@ static int quad8_probe(struct device *dev, unsigned int id)
 	indio_dev->num_channels = ARRAY_SIZE(quad8_channels);
 	indio_dev->channels = quad8_channels;
 	indio_dev->name = dev_name(dev);
+	indio_dev->dev.parent = dev;
 
 	priv = iio_priv(indio_dev);
 	priv->base = base[id];
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/8] iio: cio-dac: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
  2017-02-11 12:34 ` [PATCH 1/8] iio: stx104: Set parent device Lars-Peter Clausen
  2017-02-11 12:34 ` [PATCH 2/8] iio: quad-8: " Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-11 12:59   ` William Breathitt Gray
  2017-02-11 12:34 ` [PATCH 4/8] iio: max30100: " Lars-Peter Clausen
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/cio-dac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/dac/cio-dac.c b/drivers/iio/dac/cio-dac.c
index 5a743e2..a046422 100644
--- a/drivers/iio/dac/cio-dac.c
+++ b/drivers/iio/dac/cio-dac.c
@@ -119,6 +119,7 @@ static int cio_dac_probe(struct device *dev, unsigned int id)
 	indio_dev->channels = cio_dac_channels;
 	indio_dev->num_channels = CIO_DAC_NUM_CHAN;
 	indio_dev->name = dev_name(dev);
+	indio_dev->dev.parent = dev;
 
 	priv = iio_priv(indio_dev);
 	priv->base = base[id];
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/8] iio: max30100: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
                   ` (2 preceding siblings ...)
  2017-02-11 12:34 ` [PATCH 3/8] iio: cio-dac: " Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-19 12:00   ` Jonathan Cameron
  2017-02-11 12:34 ` [PATCH 5/8] iio: max30102: " Lars-Peter Clausen
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/health/max30100.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
index 9648c69..10b3e0d 100644
--- a/drivers/iio/health/max30100.c
+++ b/drivers/iio/health/max30100.c
@@ -449,6 +449,7 @@ static int max30100_probe(struct i2c_client *client,
 	indio_dev->available_scan_masks = max30100_scan_masks;
 	indio_dev->modes = (INDIO_BUFFER_SOFTWARE | INDIO_DIRECT_MODE);
 	indio_dev->setup_ops = &max30100_buffer_setup_ops;
+	indio_dev->dev.parent = &client->dev;
 
 	data = iio_priv(indio_dev);
 	data->indio_dev = indio_dev;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/8] iio: max30102: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
                   ` (3 preceding siblings ...)
  2017-02-11 12:34 ` [PATCH 4/8] iio: max30100: " Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-19 12:01   ` Jonathan Cameron
  2017-02-11 12:34 ` [PATCH 6/8] iio: lmp91000: " Lars-Peter Clausen
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/health/max30102.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
index 377518c..839b875 100644
--- a/drivers/iio/health/max30102.c
+++ b/drivers/iio/health/max30102.c
@@ -410,6 +410,7 @@ static int max30102_probe(struct i2c_client *client,
 	indio_dev->available_scan_masks = max30102_scan_masks;
 	indio_dev->modes = (INDIO_BUFFER_SOFTWARE | INDIO_DIRECT_MODE);
 	indio_dev->setup_ops = &max30102_buffer_setup_ops;
+	indio_dev->dev.parent = &client->dev;
 
 	data = iio_priv(indio_dev);
 	data->indio_dev = indio_dev;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/8] iio: lmp91000: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
                   ` (4 preceding siblings ...)
  2017-02-11 12:34 ` [PATCH 5/8] iio: max30102: " Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-14 15:39   ` Matt Ranostay
  2017-02-11 12:34 ` [PATCH 7/8] iio: pulsedlight-lidar-lite-v2: " Lars-Peter Clausen
  2017-02-11 12:34 ` [PATCH 8/8] iio: maxim_thermocouple: " Lars-Peter Clausen
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/potentiostat/lmp91000.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
index e227143..afa8de3 100644
--- a/drivers/iio/potentiostat/lmp91000.c
+++ b/drivers/iio/potentiostat/lmp91000.c
@@ -325,6 +325,7 @@ static int lmp91000_probe(struct i2c_client *client,
 	indio_dev->channels = lmp91000_channels;
 	indio_dev->num_channels = ARRAY_SIZE(lmp91000_channels);
 	indio_dev->name = LMP91000_DRV_NAME;
+	indio_dev->dev.parent = &client->dev;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 	i2c_set_clientdata(client, indio_dev);
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 7/8] iio: pulsedlight-lidar-lite-v2: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
                   ` (5 preceding siblings ...)
  2017-02-11 12:34 ` [PATCH 6/8] iio: lmp91000: " Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-14 15:40   ` Matt Ranostay
  2017-02-11 12:34 ` [PATCH 8/8] iio: maxim_thermocouple: " Lars-Peter Clausen
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
index 20c16a0..36c1ddc 100644
--- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
+++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
@@ -278,6 +278,7 @@ static int lidar_probe(struct i2c_client *client,
 	indio_dev->name = LIDAR_DRV_NAME;
 	indio_dev->channels = lidar_channels;
 	indio_dev->num_channels = ARRAY_SIZE(lidar_channels);
+	indio_dev->dev.parent = &client->dev;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
 	i2c_set_clientdata(client, indio_dev);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 8/8] iio: maxim_thermocouple: Set parent device
  2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
                   ` (6 preceding siblings ...)
  2017-02-11 12:34 ` [PATCH 7/8] iio: pulsedlight-lidar-lite-v2: " Lars-Peter Clausen
@ 2017-02-11 12:34 ` Lars-Peter Clausen
  2017-02-19 12:04   ` Jonathan Cameron
  7 siblings, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2017-02-11 12:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio, Lars-Peter Clausen

Initialize the parent of the IIO device to the device that registered it.
This makes sure that the IIO device appears the right level in the device
hierarchy.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/temperature/maxim_thermocouple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c
index f962f31..5572142 100644
--- a/drivers/iio/temperature/maxim_thermocouple.c
+++ b/drivers/iio/temperature/maxim_thermocouple.c
@@ -231,6 +231,7 @@ static int maxim_thermocouple_probe(struct spi_device *spi)
 	indio_dev->available_scan_masks = chip->scan_masks;
 	indio_dev->num_channels = chip->num_channels;
 	indio_dev->modes = INDIO_DIRECT_MODE;
+	indio_dev->dev.parent = &spi->dev;
 
 	data = iio_priv(indio_dev);
 	data->spi = spi;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/8] iio: stx104: Set parent device
  2017-02-11 12:34 ` [PATCH 1/8] iio: stx104: Set parent device Lars-Peter Clausen
@ 2017-02-11 12:58   ` William Breathitt Gray
  2017-02-19 11:55     ` Jonathan Cameron
  0 siblings, 1 reply; 21+ messages in thread
From: William Breathitt Gray @ 2017-02-11 12:58 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
	Matt Ranostay, linux-iio

On Sat, Feb 11, 2017 at 01:34:14PM +0100, Lars-Peter Clausen wrote:
>Initialize the parent of the IIO device to the device that registered it.
>This makes sure that the IIO device appears the right level in the device
>hierarchy.
>
>Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>---
> drivers/iio/adc/stx104.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/iio/adc/stx104.c b/drivers/iio/adc/stx104.c
>index be2de48..2df84fa5 100644
>--- a/drivers/iio/adc/stx104.c
>+++ b/drivers/iio/adc/stx104.c
>@@ -318,6 +318,7 @@ static int stx104_probe(struct device *dev, unsigned int id)
> 	}
> 
> 	indio_dev->name = dev_name(dev);
>+	indio_dev->dev.parent = dev;
> 
> 	priv = iio_priv(indio_dev);
> 	priv->base = base[id];
>-- 
>2.1.4
>

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/8] iio: quad-8: Set parent device
  2017-02-11 12:34 ` [PATCH 2/8] iio: quad-8: " Lars-Peter Clausen
@ 2017-02-11 12:59   ` William Breathitt Gray
  0 siblings, 0 replies; 21+ messages in thread
From: William Breathitt Gray @ 2017-02-11 12:59 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
	Matt Ranostay, linux-iio

On Sat, Feb 11, 2017 at 01:34:15PM +0100, Lars-Peter Clausen wrote:
>Initialize the parent of the IIO device to the device that registered it.
>This makes sure that the IIO device appears the right level in the device
>hierarchy.
>
>Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>---
> drivers/iio/counter/104-quad-8.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/iio/counter/104-quad-8.c b/drivers/iio/counter/104-quad-8.c
>index a5913e9..e381ca6 100644
>--- a/drivers/iio/counter/104-quad-8.c
>+++ b/drivers/iio/counter/104-quad-8.c
>@@ -551,6 +551,7 @@ static int quad8_probe(struct device *dev, unsigned int id)
> 	indio_dev->num_channels = ARRAY_SIZE(quad8_channels);
> 	indio_dev->channels = quad8_channels;
> 	indio_dev->name = dev_name(dev);
>+	indio_dev->dev.parent = dev;
> 
> 	priv = iio_priv(indio_dev);
> 	priv->base = base[id];
>-- 
>2.1.4
>

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/8] iio: cio-dac: Set parent device
  2017-02-11 12:34 ` [PATCH 3/8] iio: cio-dac: " Lars-Peter Clausen
@ 2017-02-11 12:59   ` William Breathitt Gray
  2017-02-19 11:58     ` Jonathan Cameron
  0 siblings, 1 reply; 21+ messages in thread
From: William Breathitt Gray @ 2017-02-11 12:59 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
	Matt Ranostay, linux-iio

On Sat, Feb 11, 2017 at 01:34:16PM +0100, Lars-Peter Clausen wrote:
>Initialize the parent of the IIO device to the device that registered it.
>This makes sure that the IIO device appears the right level in the device
>hierarchy.
>
>Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>---
> drivers/iio/dac/cio-dac.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/iio/dac/cio-dac.c b/drivers/iio/dac/cio-dac.c
>index 5a743e2..a046422 100644
>--- a/drivers/iio/dac/cio-dac.c
>+++ b/drivers/iio/dac/cio-dac.c
>@@ -119,6 +119,7 @@ static int cio_dac_probe(struct device *dev, unsigned int id)
> 	indio_dev->channels = cio_dac_channels;
> 	indio_dev->num_channels = CIO_DAC_NUM_CHAN;
> 	indio_dev->name = dev_name(dev);
>+	indio_dev->dev.parent = dev;
> 
> 	priv = iio_priv(indio_dev);
> 	priv->base = base[id];
>-- 
>2.1.4
>

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 6/8] iio: lmp91000: Set parent device
  2017-02-11 12:34 ` [PATCH 6/8] iio: lmp91000: " Lars-Peter Clausen
@ 2017-02-14 15:39   ` Matt Ranostay
  2017-02-19 12:02     ` Jonathan Cameron
  0 siblings, 1 reply; 21+ messages in thread
From: Matt Ranostay @ 2017-02-14 15:39 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
	William Breathitt Gray, linux-iio

On Sat, Feb 11, 2017 at 4:34 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> Initialize the parent of the IIO device to the device that registered it.
> This makes sure that the IIO device appears the right level in the device
> hierarchy.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>

> ---
>  drivers/iio/potentiostat/lmp91000.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
> index e227143..afa8de3 100644
> --- a/drivers/iio/potentiostat/lmp91000.c
> +++ b/drivers/iio/potentiostat/lmp91000.c
> @@ -325,6 +325,7 @@ static int lmp91000_probe(struct i2c_client *client,
>         indio_dev->channels = lmp91000_channels;
>         indio_dev->num_channels = ARRAY_SIZE(lmp91000_channels);
>         indio_dev->name = LMP91000_DRV_NAME;
> +       indio_dev->dev.parent = &client->dev;
>         indio_dev->modes = INDIO_DIRECT_MODE;
>         i2c_set_clientdata(client, indio_dev);
>
> --
> 2.1.4
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] iio: pulsedlight-lidar-lite-v2: Set parent device
  2017-02-11 12:34 ` [PATCH 7/8] iio: pulsedlight-lidar-lite-v2: " Lars-Peter Clausen
@ 2017-02-14 15:40   ` Matt Ranostay
  2017-02-19 12:02     ` Jonathan Cameron
  0 siblings, 1 reply; 21+ messages in thread
From: Matt Ranostay @ 2017-02-14 15:40 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
	William Breathitt Gray, linux-iio

On Sat, Feb 11, 2017 at 4:34 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> Initialize the parent of the IIO device to the device that registered it.
> This makes sure that the IIO device appears the right level in the device
> hierarchy.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>

> ---
>  drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> index 20c16a0..36c1ddc 100644
> --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> @@ -278,6 +278,7 @@ static int lidar_probe(struct i2c_client *client,
>         indio_dev->name = LIDAR_DRV_NAME;
>         indio_dev->channels = lidar_channels;
>         indio_dev->num_channels = ARRAY_SIZE(lidar_channels);
> +       indio_dev->dev.parent = &client->dev;
>         indio_dev->modes = INDIO_DIRECT_MODE;
>
>         i2c_set_clientdata(client, indio_dev);
> --
> 2.1.4
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/8] iio: stx104: Set parent device
  2017-02-11 12:58   ` William Breathitt Gray
@ 2017-02-19 11:55     ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2017-02-19 11:55 UTC (permalink / raw)
  To: William Breathitt Gray, Lars-Peter Clausen
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, Matt Ranostay, linux-iio

On 11/02/17 12:58, William Breathitt Gray wrote:
> On Sat, Feb 11, 2017 at 01:34:14PM +0100, Lars-Peter Clausen wrote:
>> Initialize the parent of the IIO device to the device that registered it.
>> This makes sure that the IIO device appears the right level in the device
>> hierarchy.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Hmm. Took me a few moments to decide whether to push these as fixes or
not.  In the end I concluded that they have always been broken, so whilst
they are clearly a fix we want in, the probably don't need to be rushed
in or applied to old kernels. For drivers that were in this cycle, I
may push them out as straight forward fixes however.

If anyone disagrees then shout quickly!

Applied to the togreg branch of iio.git and pushed out as testing.
>> ---
>> drivers/iio/adc/stx104.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iio/adc/stx104.c b/drivers/iio/adc/stx104.c
>> index be2de48..2df84fa5 100644
>> --- a/drivers/iio/adc/stx104.c
>> +++ b/drivers/iio/adc/stx104.c
>> @@ -318,6 +318,7 @@ static int stx104_probe(struct device *dev, unsigned int id)
>> 	}
>>
>> 	indio_dev->name = dev_name(dev);
>> +	indio_dev->dev.parent = dev;
>>
>> 	priv = iio_priv(indio_dev);
>> 	priv->base = base[id];
>> -- 
>> 2.1.4
>>
> 
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/8] iio: cio-dac: Set parent device
  2017-02-11 12:59   ` William Breathitt Gray
@ 2017-02-19 11:58     ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2017-02-19 11:58 UTC (permalink / raw)
  To: William Breathitt Gray, Lars-Peter Clausen
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, Matt Ranostay, linux-iio

On 11/02/17 12:59, William Breathitt Gray wrote:
> On Sat, Feb 11, 2017 at 01:34:16PM +0100, Lars-Peter Clausen wrote:
>> Initialize the parent of the IIO device to the device that registered it.
>> This makes sure that the IIO device appears the right level in the device
>> hierarchy.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>> drivers/iio/dac/cio-dac.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iio/dac/cio-dac.c b/drivers/iio/dac/cio-dac.c
>> index 5a743e2..a046422 100644
>> --- a/drivers/iio/dac/cio-dac.c
>> +++ b/drivers/iio/dac/cio-dac.c
>> @@ -119,6 +119,7 @@ static int cio_dac_probe(struct device *dev, unsigned int id)
>> 	indio_dev->channels = cio_dac_channels;
>> 	indio_dev->num_channels = CIO_DAC_NUM_CHAN;
>> 	indio_dev->name = dev_name(dev);
>> +	indio_dev->dev.parent = dev;
>>
>> 	priv = iio_priv(indio_dev);
>> 	priv->base = base[id];
>> -- 
>> 2.1.4
>>
> 
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> 
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with.

Thanks,

Jonathan

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4/8] iio: max30100: Set parent device
  2017-02-11 12:34 ` [PATCH 4/8] iio: max30100: " Lars-Peter Clausen
@ 2017-02-19 12:00   ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2017-02-19 12:00 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio

On 11/02/17 12:34, Lars-Peter Clausen wrote:
> Initialize the parent of the IIO device to the device that registered it.
> This makes sure that the IIO device appears the right level in the device
> hierarchy.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/health/max30100.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
> index 9648c69..10b3e0d 100644
> --- a/drivers/iio/health/max30100.c
> +++ b/drivers/iio/health/max30100.c
> @@ -449,6 +449,7 @@ static int max30100_probe(struct i2c_client *client,
>  	indio_dev->available_scan_masks = max30100_scan_masks;
>  	indio_dev->modes = (INDIO_BUFFER_SOFTWARE | INDIO_DIRECT_MODE);
>  	indio_dev->setup_ops = &max30100_buffer_setup_ops;
> +	indio_dev->dev.parent = &client->dev;
>  
>  	data = iio_priv(indio_dev);
>  	data->indio_dev = indio_dev;
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/8] iio: max30102: Set parent device
  2017-02-11 12:34 ` [PATCH 5/8] iio: max30102: " Lars-Peter Clausen
@ 2017-02-19 12:01   ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2017-02-19 12:01 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio

On 11/02/17 12:34, Lars-Peter Clausen wrote:
> Initialize the parent of the IIO device to the device that registered it.
> This makes sure that the IIO device appears the right level in the device
> hierarchy.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/health/max30102.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
> index 377518c..839b875 100644
> --- a/drivers/iio/health/max30102.c
> +++ b/drivers/iio/health/max30102.c
> @@ -410,6 +410,7 @@ static int max30102_probe(struct i2c_client *client,
>  	indio_dev->available_scan_masks = max30102_scan_masks;
>  	indio_dev->modes = (INDIO_BUFFER_SOFTWARE | INDIO_DIRECT_MODE);
>  	indio_dev->setup_ops = &max30102_buffer_setup_ops;
> +	indio_dev->dev.parent = &client->dev;
>  
>  	data = iio_priv(indio_dev);
>  	data->indio_dev = indio_dev;
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 6/8] iio: lmp91000: Set parent device
  2017-02-14 15:39   ` Matt Ranostay
@ 2017-02-19 12:02     ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2017-02-19 12:02 UTC (permalink / raw)
  To: Matt Ranostay, Lars-Peter Clausen
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	linux-iio

On 14/02/17 15:39, Matt Ranostay wrote:
> On Sat, Feb 11, 2017 at 4:34 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>> Initialize the parent of the IIO device to the device that registered it.
>> This makes sure that the IIO device appears the right level in the device
>> hierarchy.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> 
> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Applied.
> 
>> ---
>>  drivers/iio/potentiostat/lmp91000.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
>> index e227143..afa8de3 100644
>> --- a/drivers/iio/potentiostat/lmp91000.c
>> +++ b/drivers/iio/potentiostat/lmp91000.c
>> @@ -325,6 +325,7 @@ static int lmp91000_probe(struct i2c_client *client,
>>         indio_dev->channels = lmp91000_channels;
>>         indio_dev->num_channels = ARRAY_SIZE(lmp91000_channels);
>>         indio_dev->name = LMP91000_DRV_NAME;
>> +       indio_dev->dev.parent = &client->dev;
>>         indio_dev->modes = INDIO_DIRECT_MODE;
>>         i2c_set_clientdata(client, indio_dev);
>>
>> --
>> 2.1.4
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] iio: pulsedlight-lidar-lite-v2: Set parent device
  2017-02-14 15:40   ` Matt Ranostay
@ 2017-02-19 12:02     ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2017-02-19 12:02 UTC (permalink / raw)
  To: Matt Ranostay, Lars-Peter Clausen
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	linux-iio

On 14/02/17 15:40, Matt Ranostay wrote:
> On Sat, Feb 11, 2017 at 4:34 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>> Initialize the parent of the IIO device to the device that registered it.
>> This makes sure that the IIO device appears the right level in the device
>> hierarchy.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> 
> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Applied.
> 
>> ---
>>  drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>> index 20c16a0..36c1ddc 100644
>> --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>> +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>> @@ -278,6 +278,7 @@ static int lidar_probe(struct i2c_client *client,
>>         indio_dev->name = LIDAR_DRV_NAME;
>>         indio_dev->channels = lidar_channels;
>>         indio_dev->num_channels = ARRAY_SIZE(lidar_channels);
>> +       indio_dev->dev.parent = &client->dev;
>>         indio_dev->modes = INDIO_DIRECT_MODE;
>>
>>         i2c_set_clientdata(client, indio_dev);
>> --
>> 2.1.4
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 8/8] iio: maxim_thermocouple: Set parent device
  2017-02-11 12:34 ` [PATCH 8/8] iio: maxim_thermocouple: " Lars-Peter Clausen
@ 2017-02-19 12:04   ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2017-02-19 12:04 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Hartmut Knaack, Peter Meerwald-Stadler, William Breathitt Gray,
	Matt Ranostay, linux-iio

On 11/02/17 12:34, Lars-Peter Clausen wrote:
> Initialize the parent of the IIO device to the device that registered it.
> This makes sure that the IIO device appears the right level in the device
> hierarchy.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.

Thanks for cleaning these up Lars,

Jonathan
> ---
>  drivers/iio/temperature/maxim_thermocouple.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c
> index f962f31..5572142 100644
> --- a/drivers/iio/temperature/maxim_thermocouple.c
> +++ b/drivers/iio/temperature/maxim_thermocouple.c
> @@ -231,6 +231,7 @@ static int maxim_thermocouple_probe(struct spi_device *spi)
>  	indio_dev->available_scan_masks = chip->scan_masks;
>  	indio_dev->num_channels = chip->num_channels;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
> +	indio_dev->dev.parent = &spi->dev;
>  
>  	data = iio_priv(indio_dev);
>  	data->spi = spi;
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-02-19 12:04 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-11 12:34 [PATCH 0/8] iio: Fix missing parent device initalization Lars-Peter Clausen
2017-02-11 12:34 ` [PATCH 1/8] iio: stx104: Set parent device Lars-Peter Clausen
2017-02-11 12:58   ` William Breathitt Gray
2017-02-19 11:55     ` Jonathan Cameron
2017-02-11 12:34 ` [PATCH 2/8] iio: quad-8: " Lars-Peter Clausen
2017-02-11 12:59   ` William Breathitt Gray
2017-02-11 12:34 ` [PATCH 3/8] iio: cio-dac: " Lars-Peter Clausen
2017-02-11 12:59   ` William Breathitt Gray
2017-02-19 11:58     ` Jonathan Cameron
2017-02-11 12:34 ` [PATCH 4/8] iio: max30100: " Lars-Peter Clausen
2017-02-19 12:00   ` Jonathan Cameron
2017-02-11 12:34 ` [PATCH 5/8] iio: max30102: " Lars-Peter Clausen
2017-02-19 12:01   ` Jonathan Cameron
2017-02-11 12:34 ` [PATCH 6/8] iio: lmp91000: " Lars-Peter Clausen
2017-02-14 15:39   ` Matt Ranostay
2017-02-19 12:02     ` Jonathan Cameron
2017-02-11 12:34 ` [PATCH 7/8] iio: pulsedlight-lidar-lite-v2: " Lars-Peter Clausen
2017-02-14 15:40   ` Matt Ranostay
2017-02-19 12:02     ` Jonathan Cameron
2017-02-11 12:34 ` [PATCH 8/8] iio: maxim_thermocouple: " Lars-Peter Clausen
2017-02-19 12:04   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.