All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-29 22:00 ` Andy Gross
  0 siblings, 0 replies; 16+ messages in thread
From: Andy Gross @ 2014-09-29 22:00 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, linux-i2c, Bjorn Andersson, Ivan T. Ivanov,
	linux-arm-msm, linux-arm-kernel, Andy Gross

The runtime pm calls need to be done before populating the children via the
i2c_add_adapter call.  If this is not done, a child can run into issues trying
to do i2c read/writes due to the pm_runtime_sync failing.

Signed-off-by: Andy Gross <agross@codeaurora.org>
---
 drivers/i2c/busses/i2c-qup.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 3a4d64e..092d89b 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -674,16 +674,20 @@ static int qup_i2c_probe(struct platform_device *pdev)
 	qup->adap.dev.of_node = pdev->dev.of_node;
 	strlcpy(qup->adap.name, "QUP I2C adapter", sizeof(qup->adap.name));
 
-	ret = i2c_add_adapter(&qup->adap);
-	if (ret)
-		goto fail;
-
 	pm_runtime_set_autosuspend_delay(qup->dev, MSEC_PER_SEC);
 	pm_runtime_use_autosuspend(qup->dev);
 	pm_runtime_set_active(qup->dev);
 	pm_runtime_enable(qup->dev);
+
+	ret = i2c_add_adapter(&qup->adap);
+	if (ret)
+		goto fail_runtime;
+
 	return 0;
 
+fail_runtime:
+	pm_runtime_disable(qup->dev);
+	pm_runtime_set_suspended(qup->dev);
 fail:
 	qup_i2c_disable_clocks(qup);
 	return ret;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

* [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-29 22:00 ` Andy Gross
  0 siblings, 0 replies; 16+ messages in thread
From: Andy Gross @ 2014-09-29 22:00 UTC (permalink / raw)
  To: linux-arm-kernel

The runtime pm calls need to be done before populating the children via the
i2c_add_adapter call.  If this is not done, a child can run into issues trying
to do i2c read/writes due to the pm_runtime_sync failing.

Signed-off-by: Andy Gross <agross@codeaurora.org>
---
 drivers/i2c/busses/i2c-qup.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 3a4d64e..092d89b 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -674,16 +674,20 @@ static int qup_i2c_probe(struct platform_device *pdev)
 	qup->adap.dev.of_node = pdev->dev.of_node;
 	strlcpy(qup->adap.name, "QUP I2C adapter", sizeof(qup->adap.name));
 
-	ret = i2c_add_adapter(&qup->adap);
-	if (ret)
-		goto fail;
-
 	pm_runtime_set_autosuspend_delay(qup->dev, MSEC_PER_SEC);
 	pm_runtime_use_autosuspend(qup->dev);
 	pm_runtime_set_active(qup->dev);
 	pm_runtime_enable(qup->dev);
+
+	ret = i2c_add_adapter(&qup->adap);
+	if (ret)
+		goto fail_runtime;
+
 	return 0;
 
+fail_runtime:
+	pm_runtime_disable(qup->dev);
+	pm_runtime_set_suspended(qup->dev);
 fail:
 	qup_i2c_disable_clocks(qup);
 	return ret;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
  2014-09-29 22:00 ` Andy Gross
  (?)
@ 2014-09-29 22:49   ` Felipe Balbi
  -1 siblings, 0 replies; 16+ messages in thread
From: Felipe Balbi @ 2014-09-29 22:49 UTC (permalink / raw)
  To: Andy Gross
  Cc: Wolfram Sang, linux-kernel, linux-i2c, Bjorn Andersson,
	Ivan T. Ivanov, linux-arm-msm, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

On Mon, Sep 29, 2014 at 05:00:51PM -0500, Andy Gross wrote:
> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 
> Signed-off-by: Andy Gross <agross@codeaurora.org>

Reviewed-by: Felipe Balbi <balbi@ti.com>

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-29 22:49   ` Felipe Balbi
  0 siblings, 0 replies; 16+ messages in thread
From: Felipe Balbi @ 2014-09-29 22:49 UTC (permalink / raw)
  To: Andy Gross
  Cc: Wolfram Sang, linux-kernel, linux-i2c, Bjorn Andersson,
	Ivan T. Ivanov, linux-arm-msm, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

On Mon, Sep 29, 2014 at 05:00:51PM -0500, Andy Gross wrote:
> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 
> Signed-off-by: Andy Gross <agross@codeaurora.org>

Reviewed-by: Felipe Balbi <balbi@ti.com>

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-29 22:49   ` Felipe Balbi
  0 siblings, 0 replies; 16+ messages in thread
From: Felipe Balbi @ 2014-09-29 22:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 29, 2014 at 05:00:51PM -0500, Andy Gross wrote:
> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 
> Signed-off-by: Andy Gross <agross@codeaurora.org>

Reviewed-by: Felipe Balbi <balbi@ti.com>

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140929/bbd394d1/attachment.sig>

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
  2014-09-29 22:00 ` Andy Gross
  (?)
@ 2014-09-30  1:53     ` Bjorn Andersson
  -1 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2014-09-30  1:53 UTC (permalink / raw)
  To: Andy Gross
  Cc: Wolfram Sang, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ivan T. Ivanov,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:

> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 

May I ask in what case this would fail?  I thought we tested this as we found
the faulty error check after calling pm_runtime_get_sync().

Nontheless,

Acked-by: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>

Regards,
Bjorn

> Signed-off-by: Andy Gross <agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-qup.c |   12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
> index 3a4d64e..092d89b 100644
> --- a/drivers/i2c/busses/i2c-qup.c
> +++ b/drivers/i2c/busses/i2c-qup.c
> @@ -674,16 +674,20 @@ static int qup_i2c_probe(struct platform_device *pdev)
>  	qup->adap.dev.of_node = pdev->dev.of_node;
>  	strlcpy(qup->adap.name, "QUP I2C adapter", sizeof(qup->adap.name));
>  
> -	ret = i2c_add_adapter(&qup->adap);
> -	if (ret)
> -		goto fail;
> -
>  	pm_runtime_set_autosuspend_delay(qup->dev, MSEC_PER_SEC);
>  	pm_runtime_use_autosuspend(qup->dev);
>  	pm_runtime_set_active(qup->dev);
>  	pm_runtime_enable(qup->dev);
> +
> +	ret = i2c_add_adapter(&qup->adap);
> +	if (ret)
> +		goto fail_runtime;
> +
>  	return 0;
>  
> +fail_runtime:
> +	pm_runtime_disable(qup->dev);
> +	pm_runtime_set_suspended(qup->dev);
>  fail:
>  	qup_i2c_disable_clocks(qup);
>  	return ret;
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by The Linux Foundation
> 

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-30  1:53     ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2014-09-30  1:53 UTC (permalink / raw)
  To: Andy Gross
  Cc: Wolfram Sang, linux-kernel, linux-i2c, Ivan T. Ivanov,
	linux-arm-msm, linux-arm-kernel

On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:

> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 

May I ask in what case this would fail?  I thought we tested this as we found
the faulty error check after calling pm_runtime_get_sync().

Nontheless,

Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

Regards,
Bjorn

> Signed-off-by: Andy Gross <agross@codeaurora.org>
> ---
>  drivers/i2c/busses/i2c-qup.c |   12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
> index 3a4d64e..092d89b 100644
> --- a/drivers/i2c/busses/i2c-qup.c
> +++ b/drivers/i2c/busses/i2c-qup.c
> @@ -674,16 +674,20 @@ static int qup_i2c_probe(struct platform_device *pdev)
>  	qup->adap.dev.of_node = pdev->dev.of_node;
>  	strlcpy(qup->adap.name, "QUP I2C adapter", sizeof(qup->adap.name));
>  
> -	ret = i2c_add_adapter(&qup->adap);
> -	if (ret)
> -		goto fail;
> -
>  	pm_runtime_set_autosuspend_delay(qup->dev, MSEC_PER_SEC);
>  	pm_runtime_use_autosuspend(qup->dev);
>  	pm_runtime_set_active(qup->dev);
>  	pm_runtime_enable(qup->dev);
> +
> +	ret = i2c_add_adapter(&qup->adap);
> +	if (ret)
> +		goto fail_runtime;
> +
>  	return 0;
>  
> +fail_runtime:
> +	pm_runtime_disable(qup->dev);
> +	pm_runtime_set_suspended(qup->dev);
>  fail:
>  	qup_i2c_disable_clocks(qup);
>  	return ret;
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by The Linux Foundation
> 

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

* [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-30  1:53     ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2014-09-30  1:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:

> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 

May I ask in what case this would fail?  I thought we tested this as we found
the faulty error check after calling pm_runtime_get_sync().

Nontheless,

Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

Regards,
Bjorn

> Signed-off-by: Andy Gross <agross@codeaurora.org>
> ---
>  drivers/i2c/busses/i2c-qup.c |   12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
> index 3a4d64e..092d89b 100644
> --- a/drivers/i2c/busses/i2c-qup.c
> +++ b/drivers/i2c/busses/i2c-qup.c
> @@ -674,16 +674,20 @@ static int qup_i2c_probe(struct platform_device *pdev)
>  	qup->adap.dev.of_node = pdev->dev.of_node;
>  	strlcpy(qup->adap.name, "QUP I2C adapter", sizeof(qup->adap.name));
>  
> -	ret = i2c_add_adapter(&qup->adap);
> -	if (ret)
> -		goto fail;
> -
>  	pm_runtime_set_autosuspend_delay(qup->dev, MSEC_PER_SEC);
>  	pm_runtime_use_autosuspend(qup->dev);
>  	pm_runtime_set_active(qup->dev);
>  	pm_runtime_enable(qup->dev);
> +
> +	ret = i2c_add_adapter(&qup->adap);
> +	if (ret)
> +		goto fail_runtime;
> +
>  	return 0;
>  
> +fail_runtime:
> +	pm_runtime_disable(qup->dev);
> +	pm_runtime_set_suspended(qup->dev);
>  fail:
>  	qup_i2c_disable_clocks(qup);
>  	return ret;
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by The Linux Foundation
> 

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
  2014-09-30  1:53     ` Bjorn Andersson
  (?)
@ 2014-09-30 19:59       ` Andy Gross
  -1 siblings, 0 replies; 16+ messages in thread
From: Andy Gross @ 2014-09-30 19:59 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Wolfram Sang, linux-kernel, linux-i2c, Ivan T. Ivanov,
	linux-arm-msm, linux-arm-kernel

On Mon, Sep 29, 2014 at 06:53:24PM -0700, Bjorn Andersson wrote:
> On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:
> 
> > The runtime pm calls need to be done before populating the children via the
> > i2c_add_adapter call.  If this is not done, a child can run into issues trying
> > to do i2c read/writes due to the pm_runtime_sync failing.
> > 
> 
> May I ask in what case this would fail?  I thought we tested this as we found
> the faulty error check after calling pm_runtime_get_sync().

This is a different kind of failure.   If during probe, the children do some I2C
activity, they will encounter issues with the runtime_sync due to the pm_runtime
not being initialized.  However, once the qup probe completes, everything works
fine.

The original runtime_sync issue revolved around the runtime_sync return value
being misinterpreted due to the incorrect check.

<snip>


-- 
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-30 19:59       ` Andy Gross
  0 siblings, 0 replies; 16+ messages in thread
From: Andy Gross @ 2014-09-30 19:59 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Wolfram Sang, linux-kernel, linux-i2c, Ivan T. Ivanov,
	linux-arm-msm, linux-arm-kernel

On Mon, Sep 29, 2014 at 06:53:24PM -0700, Bjorn Andersson wrote:
> On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:
> 
> > The runtime pm calls need to be done before populating the children via the
> > i2c_add_adapter call.  If this is not done, a child can run into issues trying
> > to do i2c read/writes due to the pm_runtime_sync failing.
> > 
> 
> May I ask in what case this would fail?  I thought we tested this as we found
> the faulty error check after calling pm_runtime_get_sync().

This is a different kind of failure.   If during probe, the children do some I2C
activity, they will encounter issues with the runtime_sync due to the pm_runtime
not being initialized.  However, once the qup probe completes, everything works
fine.

The original runtime_sync issue revolved around the runtime_sync return value
being misinterpreted due to the incorrect check.

<snip>


-- 
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

* [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-30 19:59       ` Andy Gross
  0 siblings, 0 replies; 16+ messages in thread
From: Andy Gross @ 2014-09-30 19:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 29, 2014 at 06:53:24PM -0700, Bjorn Andersson wrote:
> On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:
> 
> > The runtime pm calls need to be done before populating the children via the
> > i2c_add_adapter call.  If this is not done, a child can run into issues trying
> > to do i2c read/writes due to the pm_runtime_sync failing.
> > 
> 
> May I ask in what case this would fail?  I thought we tested this as we found
> the faulty error check after calling pm_runtime_get_sync().

This is a different kind of failure.   If during probe, the children do some I2C
activity, they will encounter issues with the runtime_sync due to the pm_runtime
not being initialized.  However, once the qup probe completes, everything works
fine.

The original runtime_sync issue revolved around the runtime_sync return value
being misinterpreted due to the incorrect check.

<snip>


-- 
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
  2014-09-30 19:59       ` Andy Gross
  (?)
@ 2014-09-30 20:03         ` Bjorn Andersson
  -1 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2014-09-30 20:03 UTC (permalink / raw)
  To: Andy Gross
  Cc: Wolfram Sang, linux-kernel, linux-i2c, Ivan T. Ivanov,
	linux-arm-msm, linux-arm-kernel

On Tue 30 Sep 12:59 PDT 2014, Andy Gross wrote:

> On Mon, Sep 29, 2014 at 06:53:24PM -0700, Bjorn Andersson wrote:
> > On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:
> > 
> > > The runtime pm calls need to be done before populating the children via the
> > > i2c_add_adapter call.  If this is not done, a child can run into issues trying
> > > to do i2c read/writes due to the pm_runtime_sync failing.
> > > 
> > 
> > May I ask in what case this would fail?  I thought we tested this as we found
> > the faulty error check after calling pm_runtime_get_sync().
> 
> This is a different kind of failure.   If during probe, the children do some I2C
> activity, they will encounter issues with the runtime_sync due to the pm_runtime
> not being initialized.  However, once the qup probe completes, everything works
> fine.
> 
> The original runtime_sync issue revolved around the runtime_sync return value
> being misinterpreted due to the incorrect check.
> 

Yeah, I just wondered why my testing didn't trigger this. But I suspect that
the answer is simply that the client I ran with did not do i2c accesses from
probe.

Regards,
Bjorn

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-30 20:03         ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2014-09-30 20:03 UTC (permalink / raw)
  To: Andy Gross
  Cc: Wolfram Sang, linux-kernel, linux-i2c, Ivan T. Ivanov,
	linux-arm-msm, linux-arm-kernel

On Tue 30 Sep 12:59 PDT 2014, Andy Gross wrote:

> On Mon, Sep 29, 2014 at 06:53:24PM -0700, Bjorn Andersson wrote:
> > On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:
> > 
> > > The runtime pm calls need to be done before populating the children via the
> > > i2c_add_adapter call.  If this is not done, a child can run into issues trying
> > > to do i2c read/writes due to the pm_runtime_sync failing.
> > > 
> > 
> > May I ask in what case this would fail?  I thought we tested this as we found
> > the faulty error check after calling pm_runtime_get_sync().
> 
> This is a different kind of failure.   If during probe, the children do some I2C
> activity, they will encounter issues with the runtime_sync due to the pm_runtime
> not being initialized.  However, once the qup probe completes, everything works
> fine.
> 
> The original runtime_sync issue revolved around the runtime_sync return value
> being misinterpreted due to the incorrect check.
> 

Yeah, I just wondered why my testing didn't trigger this. But I suspect that
the answer is simply that the client I ran with did not do i2c accesses from
probe.

Regards,
Bjorn

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

* [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-09-30 20:03         ` Bjorn Andersson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2014-09-30 20:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue 30 Sep 12:59 PDT 2014, Andy Gross wrote:

> On Mon, Sep 29, 2014 at 06:53:24PM -0700, Bjorn Andersson wrote:
> > On Mon 29 Sep 15:00 PDT 2014, Andy Gross wrote:
> > 
> > > The runtime pm calls need to be done before populating the children via the
> > > i2c_add_adapter call.  If this is not done, a child can run into issues trying
> > > to do i2c read/writes due to the pm_runtime_sync failing.
> > > 
> > 
> > May I ask in what case this would fail?  I thought we tested this as we found
> > the faulty error check after calling pm_runtime_get_sync().
> 
> This is a different kind of failure.   If during probe, the children do some I2C
> activity, they will encounter issues with the runtime_sync due to the pm_runtime
> not being initialized.  However, once the qup probe completes, everything works
> fine.
> 
> The original runtime_sync issue revolved around the runtime_sync return value
> being misinterpreted due to the incorrect check.
> 

Yeah, I just wondered why my testing didn't trigger this. But I suspect that
the answer is simply that the client I ran with did not do i2c accesses from
probe.

Regards,
Bjorn

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

* Re: [PATCH] i2c: qup: Fix order of runtime pm initialization
  2014-09-29 22:00 ` Andy Gross
@ 2014-10-03  1:21   ` Wolfram Sang
  -1 siblings, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2014-10-03  1:21 UTC (permalink / raw)
  To: Andy Gross
  Cc: linux-kernel, linux-i2c, Bjorn Andersson, Ivan T. Ivanov,
	linux-arm-msm, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

On Mon, Sep 29, 2014 at 05:00:51PM -0500, Andy Gross wrote:
> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 
> Signed-off-by: Andy Gross <agross@codeaurora.org>

Applied to for-current, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] i2c: qup: Fix order of runtime pm initialization
@ 2014-10-03  1:21   ` Wolfram Sang
  0 siblings, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2014-10-03  1:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 29, 2014 at 05:00:51PM -0500, Andy Gross wrote:
> The runtime pm calls need to be done before populating the children via the
> i2c_add_adapter call.  If this is not done, a child can run into issues trying
> to do i2c read/writes due to the pm_runtime_sync failing.
> 
> Signed-off-by: Andy Gross <agross@codeaurora.org>

Applied to for-current, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141003/ee5b9e52/attachment.sig>

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

end of thread, other threads:[~2014-10-03  1:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-29 22:00 [PATCH] i2c: qup: Fix order of runtime pm initialization Andy Gross
2014-09-29 22:00 ` Andy Gross
2014-09-29 22:49 ` Felipe Balbi
2014-09-29 22:49   ` Felipe Balbi
2014-09-29 22:49   ` Felipe Balbi
     [not found] ` <1412028051-21774-1-git-send-email-agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-09-30  1:53   ` Bjorn Andersson
2014-09-30  1:53     ` Bjorn Andersson
2014-09-30  1:53     ` Bjorn Andersson
2014-09-30 19:59     ` Andy Gross
2014-09-30 19:59       ` Andy Gross
2014-09-30 19:59       ` Andy Gross
2014-09-30 20:03       ` Bjorn Andersson
2014-09-30 20:03         ` Bjorn Andersson
2014-09-30 20:03         ` Bjorn Andersson
2014-10-03  1:21 ` Wolfram Sang
2014-10-03  1:21   ` Wolfram Sang

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.