Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688993 > unrolled thread
| Started by | Hari Prasath <gehariprasath@gmail.com> |
|---|---|
| First post | 2017-07-17 14:40 +0200 |
| Last post | 2017-07-17 15:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCHv2] staging: iio: adc: add missing of_node references to iio_dev Hari Prasath <gehariprasath@gmail.com> - 2017-07-17 14:40 +0200
Re: [PATCHv2] staging: iio: adc: add missing of_node references to iio_dev Lars-Peter Clausen <lars@metafoo.de> - 2017-07-17 15:20 +0200
Re: [PATCHv2] staging: iio: adc: add missing of_node references to iio_dev hari prasath <gehariprasath@gmail.com> - 2017-07-17 15:50 +0200
| From | Hari Prasath <gehariprasath@gmail.com> |
|---|---|
| Date | 2017-07-17 14:40 +0200 |
| Subject | [PATCHv2] staging: iio: adc: add missing of_node references to iio_dev |
| Message-ID | <u4dtE-51t-23@gated-at.bofh.it> |
Adding missing indio_dev->dev.of_node references to allow iio consumers to access the device channels. Signed-off-by: Hari Prasath <gehariprasath@gmail.com> --- v2: Wrong from mail ID in first version of patch --- drivers/staging/iio/adc/ad7192.c | 1 - drivers/staging/iio/adc/ad7780.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 78308a5..d11c6de 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c @@ -668,7 +668,6 @@ static int ad7192_probe(struct spi_device *spi) spi_set_drvdata(spi, indio_dev); st->devid = spi_get_device_id(spi)->driver_data; 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->modes = INDIO_DIRECT_MODE; diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c index e38d2ab9..dec3ba6 100644 --- a/drivers/staging/iio/adc/ad7780.c +++ b/drivers/staging/iio/adc/ad7780.c @@ -195,7 +195,6 @@ static int ad7780_probe(struct spi_device *spi) spi_set_drvdata(spi, indio_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->modes = INDIO_DIRECT_MODE; indio_dev->channels = &st->chip_info->channel; -- 2.10.0.GIT
[toc] | [next] | [standalone]
| From | Lars-Peter Clausen <lars@metafoo.de> |
|---|---|
| Date | 2017-07-17 15:20 +0200 |
| Subject | Re: [PATCHv2] staging: iio: adc: add missing of_node references to iio_dev |
| Message-ID | <u4e6m-5An-15@gated-at.bofh.it> |
| In reply to | #1688993 |
Hi,
The patch seems to be reverted?
Also should this part in the IIO core take care of automatically setting the
of_node of the IIO device? As far as I can see we don't have to initialize
it manually.
/* If the calling driver did not initialize of_node, do it here */
if (!indio_dev->dev.of_node && indio_dev->dev.parent)
indio_dev->dev.of_node = indio_dev->dev.parent->of_node;
- Lars
On 07/17/2017 02:34 PM, Hari Prasath wrote:
> Adding missing indio_dev->dev.of_node references to allow iio consumers
> to access the device channels.
>
> Signed-off-by: Hari Prasath <gehariprasath@gmail.com>
> ---
> v2: Wrong from mail ID in first version of patch
> ---
> drivers/staging/iio/adc/ad7192.c | 1 -
> drivers/staging/iio/adc/ad7780.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
> index 78308a5..d11c6de 100644
> --- a/drivers/staging/iio/adc/ad7192.c
> +++ b/drivers/staging/iio/adc/ad7192.c
> @@ -668,7 +668,6 @@ static int ad7192_probe(struct spi_device *spi)
> spi_set_drvdata(spi, indio_dev);
> st->devid = spi_get_device_id(spi)->driver_data;
> 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->modes = INDIO_DIRECT_MODE;
>
> diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
> index e38d2ab9..dec3ba6 100644
> --- a/drivers/staging/iio/adc/ad7780.c
> +++ b/drivers/staging/iio/adc/ad7780.c
> @@ -195,7 +195,6 @@ static int ad7780_probe(struct spi_device *spi)
> spi_set_drvdata(spi, indio_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->modes = INDIO_DIRECT_MODE;
> indio_dev->channels = &st->chip_info->channel;
>
[toc] | [prev] | [next] | [standalone]
| From | hari prasath <gehariprasath@gmail.com> |
|---|---|
| Date | 2017-07-17 15:50 +0200 |
| Message-ID | <u4ezo-5Kj-27@gated-at.bofh.it> |
| In reply to | #1689028 |
Hi, I agree that it's initialized in the core IIO driver. Also I have screwed up the patch. Regards, Hari On 17 July 2017 at 18:47, Lars-Peter Clausen <lars@metafoo.de> wrote: > Hi, > > The patch seems to be reverted? > > Also should this part in the IIO core take care of automatically setting the > of_node of the IIO device? As far as I can see we don't have to initialize > it manually. > > /* If the calling driver did not initialize of_node, do it here */ > if (!indio_dev->dev.of_node && indio_dev->dev.parent) > indio_dev->dev.of_node = indio_dev->dev.parent->of_node; > > - Lars > > On 07/17/2017 02:34 PM, Hari Prasath wrote: >> Adding missing indio_dev->dev.of_node references to allow iio consumers >> to access the device channels. >> >> Signed-off-by: Hari Prasath <gehariprasath@gmail.com> >> --- >> v2: Wrong from mail ID in first version of patch >> --- >> drivers/staging/iio/adc/ad7192.c | 1 - >> drivers/staging/iio/adc/ad7780.c | 1 - >> 2 files changed, 2 deletions(-) >> >> diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c >> index 78308a5..d11c6de 100644 >> --- a/drivers/staging/iio/adc/ad7192.c >> +++ b/drivers/staging/iio/adc/ad7192.c >> @@ -668,7 +668,6 @@ static int ad7192_probe(struct spi_device *spi) >> spi_set_drvdata(spi, indio_dev); >> st->devid = spi_get_device_id(spi)->driver_data; >> 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->modes = INDIO_DIRECT_MODE; >> >> diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c >> index e38d2ab9..dec3ba6 100644 >> --- a/drivers/staging/iio/adc/ad7780.c >> +++ b/drivers/staging/iio/adc/ad7780.c >> @@ -195,7 +195,6 @@ static int ad7780_probe(struct spi_device *spi) >> spi_set_drvdata(spi, indio_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->modes = INDIO_DIRECT_MODE; >> indio_dev->channels = &st->chip_info->channel; >> > -- Regards, G.E.Hari Prasath
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web