2014-04-25 10:16:38

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 0/5] iio: exynos_adc: fix minor nits in the driver

This patchset fixes the
1. bug causing a crash during module removal for exynos_adc.ko.
-> The bug was seen by Doug, while trying to compile the whole IIO subsystem
as module @ https://lkml.org/lkml/2014/4/21/481 from Doug.

2. rearrange the clock and regulator enable/disable calls during
probe, remove, suspend and resume calls
-> Comments give by Jonathan @ https://lkml.org/lkml/2014/4/23/644

3. reduces the timeout and uses wait_for_completion_timeout instead of the
interruptible varient.
-> This change was under review @ https://lkml.org/lkml/2013/11/5/92
Final comments were given by Tomasz, to split and submit.

Naveen Krishna Ch (2):
iio: exynos_adc: use indio_dev->dev structure to handle child nodes
iio: exynos_adc: rearrange clk and regulator enable/disable calls

Naveen Krishna Chatradhi (3):
iio: exynos_adc: reduce timeout and use wait_for_completion_timeout
iio: exynos_adc: do a soft reset in case of timeout
iio: exynos_adc: do a reinit_completion before the conversion

drivers/iio/adc/exynos_adc.c | 109 +++++++++++++++++++++++-------------------
1 file changed, 61 insertions(+), 48 deletions(-)

--
1.7.9.5


2014-04-25 10:16:52

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 1/5] iio: exynos_adc: use indio_dev->dev structure to handle child nodes

From: Naveen Krishna Ch <[email protected]>

Using pdev->dev with device_for_each_child() would iterate over all
of the children of the platform device and delete them.
Thus, causing crashes during module unload.

We should be using the indio_dev->dev structure for
registering/unregistering child nodes.

Signed-off-by: Naveen Krishna Ch <[email protected]>
---
This change was tested on top of
https://lkml.org/lkml/2014/4/21/481 from Doug.

drivers/iio/adc/exynos_adc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index d25b262..affa93f 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -344,7 +344,7 @@ static int exynos_adc_probe(struct platform_device *pdev)

exynos_adc_hw_init(info);

- ret = of_platform_populate(np, exynos_adc_match, NULL, &pdev->dev);
+ ret = of_platform_populate(np, exynos_adc_match, NULL, &indio_dev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "failed adding child nodes\n");
goto err_of_populate;
@@ -353,7 +353,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
return 0;

err_of_populate:
- device_for_each_child(&pdev->dev, NULL,
+ device_for_each_child(&indio_dev->dev, NULL,
exynos_adc_remove_devices);
regulator_disable(info->vdd);
clk_disable_unprepare(info->clk);
@@ -369,7 +369,7 @@ static int exynos_adc_remove(struct platform_device *pdev)
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
struct exynos_adc *info = iio_priv(indio_dev);

- device_for_each_child(&pdev->dev, NULL,
+ device_for_each_child(&indio_dev->dev, NULL,
exynos_adc_remove_devices);
regulator_disable(info->vdd);
clk_disable_unprepare(info->clk);
--
1.7.9.5

2014-04-25 10:16:47

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 2/5] iio: exynos_adc: rearrange clock and regulator enable/disable calls

From: Naveen Krishna Ch <[email protected]>

This patch maintains the following order in
probe(), remove(), resume() and suspend() calls

regulator enable, clk prepare enable
...
clk disable unprepare, regulator disable

While at it,
1. enable the regulator before the iio_device_register()
2. handle the return values for enable/disable calls

Change-Id: I764d9d60f72caa7ea6b0609db49a74115574f081
Signed-off-by: Naveen Krishna Ch <[email protected]>
---
This change fixes the comments given by Jonathan regarding the
order of clock and regulator enable/disable calls.
https://lkml.org/lkml/2014/4/23/644

drivers/iio/adc/exynos_adc.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index affa93f..a2b8b1a 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -316,6 +316,14 @@ static int exynos_adc_probe(struct platform_device *pdev)
goto err_irq;
}

+ ret = regulator_enable(info->vdd);
+ if (ret)
+ goto err_irq;
+
+ ret = clk_prepare_enable(info->clk);
+ if (ret)
+ goto err_disable_reg;
+
info->version = exynos_adc_get_version(pdev);

platform_set_drvdata(pdev, indio_dev);
@@ -334,13 +342,7 @@ static int exynos_adc_probe(struct platform_device *pdev)

ret = iio_device_register(indio_dev);
if (ret)
- goto err_irq;
-
- ret = regulator_enable(info->vdd);
- if (ret)
- goto err_iio_dev;
-
- clk_prepare_enable(info->clk);
+ goto err_disable_clk;

exynos_adc_hw_init(info);

@@ -355,10 +357,11 @@ static int exynos_adc_probe(struct platform_device *pdev)
err_of_populate:
device_for_each_child(&indio_dev->dev, NULL,
exynos_adc_remove_devices);
- regulator_disable(info->vdd);
- clk_disable_unprepare(info->clk);
-err_iio_dev:
iio_device_unregister(indio_dev);
+err_disable_clk:
+ clk_disable_unprepare(info->clk);
+err_disable_reg:
+ regulator_disable(info->vdd);
err_irq:
free_irq(info->irq, info);
return ret;
@@ -371,9 +374,10 @@ static int exynos_adc_remove(struct platform_device *pdev)

device_for_each_child(&indio_dev->dev, NULL,
exynos_adc_remove_devices);
- regulator_disable(info->vdd);
clk_disable_unprepare(info->clk);
+ regulator_disable(info->vdd);
writel(0, info->enable_reg);
+
iio_device_unregister(indio_dev);
free_irq(info->irq, info);

@@ -398,8 +402,8 @@ static int exynos_adc_suspend(struct device *dev)
}

clk_disable_unprepare(info->clk);
- writel(0, info->enable_reg);
regulator_disable(info->vdd);
+ writel(0, info->enable_reg);

return 0;
}
@@ -410,12 +414,14 @@ static int exynos_adc_resume(struct device *dev)
struct exynos_adc *info = iio_priv(indio_dev);
int ret;

+ writel(1, info->enable_reg);
ret = regulator_enable(info->vdd);
if (ret)
return ret;

- writel(1, info->enable_reg);
- clk_prepare_enable(info->clk);
+ ret = clk_prepare_enable(info->clk);
+ if (ret)
+ return ret;

exynos_adc_hw_init(info);

--
1.7.9.5

2014-04-25 10:17:51

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 5/5] iio: exynos_adc: do a reinit_completion before the conversion

Add reinit_completion() before the wait_for_completion_timeout in
raw_read() call.

Change-Id: I70fa00841bc49eba838a5bd6779015844297dfdb
Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
---
drivers/iio/adc/exynos_adc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 805c9f6..32290e6 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -151,6 +151,7 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
return -EINVAL;

mutex_lock(&indio_dev->mlock);
+ reinit_completion(&info->completion);

/* Select the channel to be used and Trigger conversion */
if (info->version == ADC_V2) {
--
1.7.9.5

2014-04-25 10:18:45

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 3/5] iio: exynos_adc: reduce timeout and use wait_for_completion_timeout

ADC module on Exynos5 SoCs runs at 600KSPS. At this conversion rate,
waiting for 1000 msecs is wasteful (incase of h/w failure).

Hence, reduce the time out to 100msecs and use
wait_for_completion_timeout() instead of
wait_for_completion_interruptible_timeout()

Also, handle the return values in exynos_raw_read() call.

Change-Id: Icb8cade162094b2777c9f3c77120635deef5947c
Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
---
This change is a part of the patch reviewd at https://lkml.org/lkml/2013/11/5/92

drivers/iio/adc/exynos_adc.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index a2b8b1a..4d2467a 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -82,7 +82,7 @@ enum adc_version {
#define ADC_CON_EN_START (1u << 0)
#define ADC_DATX_MASK 0xFFF

-#define EXYNOS_ADC_TIMEOUT (msecs_to_jiffies(1000))
+#define EXYNOS_ADC_TIMEOUT (msecs_to_jiffies(100))

struct exynos_adc {
void __iomem *regs;
@@ -121,6 +121,7 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
struct exynos_adc *info = iio_priv(indio_dev);
unsigned long timeout;
u32 con1, con2;
+ int ret;

if (mask != IIO_CHAN_INFO_RAW)
return -EINVAL;
@@ -145,16 +146,19 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
ADC_V1_CON(info->regs));
}

- timeout = wait_for_completion_interruptible_timeout
+ timeout = wait_for_completion_timeout
(&info->completion, EXYNOS_ADC_TIMEOUT);
- *val = info->value;
+ if (timeout == 0) {
+ ret = -ETIMEDOUT;
+ } else {
+ *val = info->value;
+ *val2 = 0;
+ ret = IIO_VAL_INT;
+ }

mutex_unlock(&indio_dev->mlock);

- if (timeout == 0)
- return -ETIMEDOUT;
-
- return IIO_VAL_INT;
+ return ret;
}

static irqreturn_t exynos_adc_isr(int irq, void *dev_id)
--
1.7.9.5

2014-04-25 10:18:41

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 4/5] iio: exynos_adc: do a soft reset in case of timeout

Do a soft reset software if a timeout happens.
This is applicable only for ADC_V2.

Change-Id: I939eaa06254e0b246dd636df9470f2eb392c2be1
Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
---
This change is a part of the patch reviewed at https://lkml.org/lkml/2013/11/5/92

drivers/iio/adc/exynos_adc.c | 50 ++++++++++++++++++++++--------------------
1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 4d2467a..805c9f6 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -112,6 +112,30 @@ static inline unsigned int exynos_adc_get_version(struct platform_device *pdev)
return (unsigned int)match->data;
}

+static void exynos_adc_hw_init(struct exynos_adc *info)
+{
+ u32 con1, con2;
+
+ if (info->version == ADC_V2) {
+ con1 = ADC_V2_CON1_SOFT_RESET;
+ writel(con1, ADC_V2_CON1(info->regs));
+
+ con2 = ADC_V2_CON2_OSEL | ADC_V2_CON2_ESEL |
+ ADC_V2_CON2_HIGHF | ADC_V2_CON2_C_TIME(0);
+ writel(con2, ADC_V2_CON2(info->regs));
+
+ /* Enable interrupts */
+ writel(1, ADC_V2_INT_EN(info->regs));
+ } else {
+ /* set default prescaler values and Enable prescaler */
+ con1 = ADC_V1_CON_PRSCLV(49) | ADC_V1_CON_PRSCEN;
+
+ /* Enable 12-bit ADC resolution */
+ con1 |= ADC_V1_CON_RES;
+ writel(con1, ADC_V1_CON(info->regs));
+ }
+}
+
static int exynos_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val,
@@ -149,6 +173,8 @@ static int exynos_read_raw(struct iio_dev *indio_dev,
timeout = wait_for_completion_timeout
(&info->completion, EXYNOS_ADC_TIMEOUT);
if (timeout == 0) {
+ dev_warn(&indio_dev->dev, "Conversion timed out! Resetting\n");
+ exynos_adc_hw_init(info);
ret = -ETIMEDOUT;
} else {
*val = info->value;
@@ -230,30 +256,6 @@ static int exynos_adc_remove_devices(struct device *dev, void *c)
return 0;
}

-static void exynos_adc_hw_init(struct exynos_adc *info)
-{
- u32 con1, con2;
-
- if (info->version == ADC_V2) {
- con1 = ADC_V2_CON1_SOFT_RESET;
- writel(con1, ADC_V2_CON1(info->regs));
-
- con2 = ADC_V2_CON2_OSEL | ADC_V2_CON2_ESEL |
- ADC_V2_CON2_HIGHF | ADC_V2_CON2_C_TIME(0);
- writel(con2, ADC_V2_CON2(info->regs));
-
- /* Enable interrupts */
- writel(1, ADC_V2_INT_EN(info->regs));
- } else {
- /* set default prescaler values and Enable prescaler */
- con1 = ADC_V1_CON_PRSCLV(49) | ADC_V1_CON_PRSCEN;
-
- /* Enable 12-bit ADC resolution */
- con1 |= ADC_V1_CON_RES;
- writel(con1, ADC_V1_CON(info->regs));
- }
-}
-
static int exynos_adc_probe(struct platform_device *pdev)
{
struct exynos_adc *info = NULL;
--
1.7.9.5

2014-04-25 15:46:38

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH 1/5] iio: exynos_adc: use indio_dev->dev structure to handle child nodes

Naveen,

Thanks for sending this. Given that Jonathan Cameron was involved in
the previous discussion, it probably would have been wise to include
him on the CC list.

On Fri, Apr 25, 2014 at 3:14 AM, Naveen Krishna Chatradhi
<[email protected]> wrote:
> From: Naveen Krishna Ch <[email protected]>
>
> Using pdev->dev with device_for_each_child() would iterate over all
> of the children of the platform device and delete them.
> Thus, causing crashes during module unload.
>
> We should be using the indio_dev->dev structure for
> registering/unregistering child nodes.
>
> Signed-off-by: Naveen Krishna Ch <[email protected]>
> ---
> This change was tested on top of
> https://lkml.org/lkml/2014/4/21/481 from Doug.
>
> drivers/iio/adc/exynos_adc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Reported-by: Doug Anderson <[email protected]>
Reviewed-by: Doug Anderson <[email protected]>
Tested-by: Doug Anderson <[email protected]>

2014-04-25 16:06:57

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH 2/5] iio: exynos_adc: rearrange clock and regulator enable/disable calls

Naveen,

On Fri, Apr 25, 2014 at 3:14 AM, Naveen Krishna Chatradhi
<[email protected]> wrote:
> From: Naveen Krishna Ch <[email protected]>
>
> This patch maintains the following order in
> probe(), remove(), resume() and suspend() calls
>
> regulator enable, clk prepare enable
> ...
> clk disable unprepare, regulator disable
>
> While at it,
> 1. enable the regulator before the iio_device_register()
> 2. handle the return values for enable/disable calls
>
> Change-Id: I764d9d60f72caa7ea6b0609db49a74115574f081
> Signed-off-by: Naveen Krishna Ch <[email protected]>
> ---
> This change fixes the comments given by Jonathan regarding the
> order of clock and regulator enable/disable calls.
> https://lkml.org/lkml/2014/4/23/644
>
> drivers/iio/adc/exynos_adc.c | 34 ++++++++++++++++++++--------------
> 1 file changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
> index affa93f..a2b8b1a 100644
> --- a/drivers/iio/adc/exynos_adc.c
> +++ b/drivers/iio/adc/exynos_adc.c
> @@ -316,6 +316,14 @@ static int exynos_adc_probe(struct platform_device *pdev)
> goto err_irq;
> }
>
> + ret = regulator_enable(info->vdd);
> + if (ret)
> + goto err_irq;
> +
> + ret = clk_prepare_enable(info->clk);
> + if (ret)
> + goto err_disable_reg;
> +
> info->version = exynos_adc_get_version(pdev);
>
> platform_set_drvdata(pdev, indio_dev);
> @@ -334,13 +342,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
>
> ret = iio_device_register(indio_dev);
> if (ret)
> - goto err_irq;
> -
> - ret = regulator_enable(info->vdd);
> - if (ret)
> - goto err_iio_dev;
> -
> - clk_prepare_enable(info->clk);
> + goto err_disable_clk;
>
> exynos_adc_hw_init(info);
>
> @@ -355,10 +357,11 @@ static int exynos_adc_probe(struct platform_device *pdev)
> err_of_populate:
> device_for_each_child(&indio_dev->dev, NULL,
> exynos_adc_remove_devices);
> - regulator_disable(info->vdd);
> - clk_disable_unprepare(info->clk);
> -err_iio_dev:
> iio_device_unregister(indio_dev);
> +err_disable_clk:
> + clk_disable_unprepare(info->clk);
> +err_disable_reg:
> + regulator_disable(info->vdd);
> err_irq:
> free_irq(info->irq, info);
> return ret;
> @@ -371,9 +374,10 @@ static int exynos_adc_remove(struct platform_device *pdev)
>
> device_for_each_child(&indio_dev->dev, NULL,
> exynos_adc_remove_devices);
> - regulator_disable(info->vdd);
> clk_disable_unprepare(info->clk);
> + regulator_disable(info->vdd);
> writel(0, info->enable_reg);
> +

This function still looks wrong. The order of things should generally
match the error case of probe, which is the reverse of how things are
initted.

Specifically you shouldn't be doing "iio_device_unregister(indio_dev);" last.

Technically it's also a very good idea to free the irq much earlier.
...and in probe you should request it later.

The request_irq should probably be right before the register function
in probe and the free_irq should be right after unregister in remove.


> iio_device_unregister(indio_dev);
> free_irq(info->irq, info);
>
> @@ -398,8 +402,8 @@ static int exynos_adc_suspend(struct device *dev)
> }
>
> clk_disable_unprepare(info->clk);
> - writel(0, info->enable_reg);
> regulator_disable(info->vdd);
> + writel(0, info->enable_reg);

This change looks wrong to me. I'd believe that the rule should
always be that the regulator is enabled early and disabled late.


> return 0;
> }
> @@ -410,12 +414,14 @@ static int exynos_adc_resume(struct device *dev)
> struct exynos_adc *info = iio_priv(indio_dev);
> int ret;
>
> + writel(1, info->enable_reg);
> ret = regulator_enable(info->vdd);
> if (ret)
> return ret;

Same here. Should enable the regulator first, I think.

2014-04-25 16:28:21

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH 3/5] iio: exynos_adc: reduce timeout and use wait_for_completion_timeout

Naveen,

On Fri, Apr 25, 2014 at 3:14 AM, Naveen Krishna Chatradhi
<[email protected]> wrote:
> ADC module on Exynos5 SoCs runs at 600KSPS. At this conversion rate,
> waiting for 1000 msecs is wasteful (incase of h/w failure).
>
> Hence, reduce the time out to 100msecs and use
> wait_for_completion_timeout() instead of
> wait_for_completion_interruptible_timeout()
>
> Also, handle the return values in exynos_raw_read() call.

You probably didn't need to mention this--it's just a natural part of
changing from wait_for_completion_interruptible_timeout() to
wait_for_completion_timeout().

>
> Change-Id: Icb8cade162094b2777c9f3c77120635deef5947c

Please don't send upstream with Change-Id. Have you considered patman
<http://git.denx.de/?p=u-boot.git;a=blob;f=tools/patman/README;hb=refs/heads/master>?

> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
> ---
> This change is a part of the patch reviewd at https://lkml.org/lkml/2013/11/5/92
>
> drivers/iio/adc/exynos_adc.c | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)

Other than problems above, this looks fine to me. If you fix them,
feel free to add my Reviewed-by tag.

-Doug

2014-04-25 16:29:08

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH 4/5] iio: exynos_adc: do a soft reset in case of timeout

Naveen,

On Fri, Apr 25, 2014 at 3:14 AM, Naveen Krishna Chatradhi
<[email protected]> wrote:
> Do a soft reset software if a timeout happens.
> This is applicable only for ADC_V2.
>
> Change-Id: I939eaa06254e0b246dd636df9470f2eb392c2be1
> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
> ---
> This change is a part of the patch reviewed at https://lkml.org/lkml/2013/11/5/92
>
> drivers/iio/adc/exynos_adc.c | 50 ++++++++++++++++++++++--------------------
> 1 file changed, 26 insertions(+), 24 deletions(-)

Reviewed-by: Doug Anderson <[email protected]>

2014-04-25 16:32:30

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH 5/5] iio: exynos_adc: do a reinit_completion before the conversion

Naveen

On Fri, Apr 25, 2014 at 3:14 AM, Naveen Krishna Chatradhi
<[email protected]> wrote:
> Add reinit_completion() before the wait_for_completion_timeout in
> raw_read() call.
>
> Change-Id: I70fa00841bc49eba838a5bd6779015844297dfdb

Again, remove Change-Id (in the previous patch, too).

> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
> ---
> drivers/iio/adc/exynos_adc.c | 1 +
> 1 file changed, 1 insertion(+)

Seems reasonable.

Reviewed-by: Doug Anderson <[email protected]>

2014-04-26 12:51:50

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 1/5] iio: exynos_adc: use indio_dev->dev structure to handle child nodes

On 25/04/14 16:46, Doug Anderson wrote:
> Naveen,
>
> Thanks for sending this. Given that Jonathan Cameron was involved in
> the previous discussion, it probably would have been wise to include
> him on the CC list.
In my case, don't worry too much as I have linux-iio coming into exactly
the same place in my inbox. Doug is correct that it is generally a good
idea unless someone has asked you not to.
>
> On Fri, Apr 25, 2014 at 3:14 AM, Naveen Krishna Chatradhi
> <[email protected]> wrote:
>> From: Naveen Krishna Ch <[email protected]>
>>
>> Using pdev->dev with device_for_each_child() would iterate over all
>> of the children of the platform device and delete them.
>> Thus, causing crashes during module unload.
>>
>> We should be using the indio_dev->dev structure for
>> registering/unregistering child nodes.
>>
>> Signed-off-by: Naveen Krishna Ch <[email protected]>
>> ---
>> This change was tested on top of
>> https://lkml.org/lkml/2014/4/21/481 from Doug.
>>
>> drivers/iio/adc/exynos_adc.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Reported-by: Doug Anderson <[email protected]>
> Reviewed-by: Doug Anderson <[email protected]>
> Tested-by: Doug Anderson <[email protected]>
Applied to the fixes-togreg branch of iio.git

Thanks,
> --
> 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
>

2014-04-26 13:52:01

by Naveen Krishna Ch

[permalink] [raw]
Subject: Re: [PATCH 1/5] iio: exynos_adc: use indio_dev->dev structure to handle child nodes

Hello Jonathan,

On 26 April 2014 18:23, Jonathan Cameron <[email protected]> wrote:
> On 25/04/14 16:46, Doug Anderson wrote:
>>
>> Naveen,
>>
>> Thanks for sending this. Given that Jonathan Cameron was involved in
>> the previous discussion, it probably would have been wise to include
>> him on the CC list.
>
> In my case, don't worry too much as I have linux-iio coming into exactly
> the same place in my inbox. Doug is correct that it is generally a good
> idea unless someone has asked you not to.
Sure, will make it a habit.
>
>>
>> On Fri, Apr 25, 2014 at 3:14 AM, Naveen Krishna Chatradhi
>> <[email protected]> wrote:
>>>
>>> From: Naveen Krishna Ch <[email protected]>
>>>
>>> Using pdev->dev with device_for_each_child() would iterate over all
>>> of the children of the platform device and delete them.
>>> Thus, causing crashes during module unload.
>>>
>>> We should be using the indio_dev->dev structure for
>>> registering/unregistering child nodes.
>>>
>>> Signed-off-by: Naveen Krishna Ch <[email protected]>
>>> ---
>>> This change was tested on top of
>>> https://lkml.org/lkml/2014/4/21/481 from Doug.
>>>
>>> drivers/iio/adc/exynos_adc.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>>
>> Reported-by: Doug Anderson <[email protected]>
>> Reviewed-by: Doug Anderson <[email protected]>
>> Tested-by: Doug Anderson <[email protected]>
>
> Applied to the fixes-togreg branch of iio.git
I've submitted the v2.
Kindly, review the other 4 patches in this series.
Thanks
>
> Thanks.
>>
>> --
>> 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
>>
>



--
Shine bright,
(: Nav :)