From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [2/2] usb: dwc3: of_simple: don't call pm_runtime_set_active()
Date: Wed, 30 May 2018 15:31:41 +0300 [thread overview]
Message-ID: <87k1rlcok2.fsf@linux.intel.com> (raw)
Roger Quadros <rogerq@ti.com> writes:
> Don't call pm_runtime_set_active() as it will prevent the device
> from being activated in the next pm_runtime_get_sync() call.
>
> Also call pm_runtime_get_sync() before of_platform_populate().
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
This patch is wrong.
> ---
> drivers/usb/dwc3/dwc3-of-simple.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
> index e98d221..2cbb5c0 100644
> --- a/drivers/usb/dwc3/dwc3-of-simple.c
> +++ b/drivers/usb/dwc3/dwc3-of-simple.c
> @@ -121,6 +121,9 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
> if (ret)
> goto err_resetc_assert;
>
> + pm_runtime_enable(dev);
> + pm_runtime_get_sync(dev);
No, this is the wrong way to do things. My device should be enabled
already from probe, specially since I have already enabled clocks.
> ret = of_platform_populate(np, NULL, NULL, dev);
> if (ret) {
> for (i = 0; i < simple->num_clocks; i++) {
> @@ -131,10 +134,6 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
> goto err_resetc_assert;
> }
>
> - pm_runtime_set_active(dev);
> - pm_runtime_enable(dev);
> - pm_runtime_get_sync(dev);
this hunk is not wrong at all.
WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH 2/2] usb: dwc3: of_simple: don't call pm_runtime_set_active()
Date: Wed, 30 May 2018 15:31:41 +0300 [thread overview]
Message-ID: <87k1rlcok2.fsf@linux.intel.com> (raw)
In-Reply-To: <1527518174-27860-2-git-send-email-rogerq@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
Roger Quadros <rogerq@ti.com> writes:
> Don't call pm_runtime_set_active() as it will prevent the device
> from being activated in the next pm_runtime_get_sync() call.
>
> Also call pm_runtime_get_sync() before of_platform_populate().
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
This patch is wrong.
> ---
> drivers/usb/dwc3/dwc3-of-simple.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
> index e98d221..2cbb5c0 100644
> --- a/drivers/usb/dwc3/dwc3-of-simple.c
> +++ b/drivers/usb/dwc3/dwc3-of-simple.c
> @@ -121,6 +121,9 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
> if (ret)
> goto err_resetc_assert;
>
> + pm_runtime_enable(dev);
> + pm_runtime_get_sync(dev);
No, this is the wrong way to do things. My device should be enabled
already from probe, specially since I have already enabled clocks.
> ret = of_platform_populate(np, NULL, NULL, dev);
> if (ret) {
> for (i = 0; i < simple->num_clocks; i++) {
> @@ -131,10 +134,6 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
> goto err_resetc_assert;
> }
>
> - pm_runtime_set_active(dev);
> - pm_runtime_enable(dev);
> - pm_runtime_get_sync(dev);
this hunk is not wrong at all.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next reply other threads:[~2018-05-30 12:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 12:31 Felipe Balbi [this message]
2018-05-30 12:31 ` [PATCH 2/2] usb: dwc3: of_simple: don't call pm_runtime_set_active() Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2018-06-14 7:57 [2/2] " Johan Hovold
2018-06-14 7:57 ` [PATCH 2/2] " Johan Hovold
2018-06-13 11:15 [2/2] " Roger Quadros
2018-06-13 11:15 ` [PATCH 2/2] " Roger Quadros
2018-05-31 14:37 [2/2] " Johan Hovold
2018-05-31 14:37 ` [PATCH 2/2] " Johan Hovold
2018-05-31 14:07 [2/2] " Alan Stern
2018-05-31 14:07 ` [PATCH 2/2] " Alan Stern
2018-05-31 13:25 [2/2] " Johan Hovold
2018-05-31 13:25 ` [PATCH 2/2] " Johan Hovold
2018-05-31 7:59 [2/2] " Felipe Balbi
2018-05-31 7:59 ` [PATCH 2/2] " Felipe Balbi
2018-05-31 7:23 [2/2] " Roger Quadros
2018-05-31 7:23 ` [PATCH 2/2] " Roger Quadros
2018-05-28 15:41 [2/2] " Johan Hovold
2018-05-28 15:41 ` [PATCH 2/2] " Johan Hovold
2018-05-28 14:36 [2/2] " Roger Quadros
2018-05-28 14:36 ` [PATCH 2/2] " Roger Quadros
2018-05-28 14:36 [1/2] usb: dwc3: of-simple: Don't fail if no clock entries Roger Quadros
2018-05-28 14:36 ` [PATCH 1/2] " Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1rlcok2.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rogerq@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.