From: Felipe Balbi <balbi@ti.com> To: Anton Tikhomirov <av.tikhomirov@samsung.com> Cc: 'Felipe Balbi' <balbi@ti.com>, 'Linux USB Mailing List' <linux-usb@vger.kernel.org>, kgene.kim@samsung.com, 'Linux ARM Kernel Mailing List' <linux-arm-kernel@lists.infradead.org>, linux-samsung-soc@vger.kernel.org, 'Linux OMAP Mailing List' <linux-omap@vger.kernel.org>, w-kwok2@ti.com, 'Santosh Shilimkar' <santosh.shilimkar@ti.com> Subject: Re: [PATCH 7/7] usb: dwc3: exynos: add pm_runtime support Date: Fri, 13 Dec 2013 13:56:18 -0600 [thread overview] Message-ID: <20131213195618.GG5292@saruman.home> (raw) In-Reply-To: <000301cef7c0$640c1ce0$2c2456a0$%tikhomirov@samsung.com> [-- Attachment #1: Type: text/plain, Size: 1356 bytes --] On Fri, Dec 13, 2013 at 02:01:32PM +0900, Anton Tikhomirov wrote: > Hi Felipe, > > > -static int dwc3_exynos_suspend(struct device *dev) > > +static int __dwc3_exynos_suspend(struct dwc3_exynos *exynos) > > { > > - struct dwc3_exynos *exynos = dev_get_drvdata(dev); > > - > > clk_disable(exynos->clk); > > > > return 0; > > } > > > > +static int __dwc3_exynos_resume(struct dwc3_exynos *exynos) > > +{ > > + return clk_enable(exynos->clk); > > +} > > + > > +static int dwc3_exynos_suspend(struct device *dev) > > +{ > > + struct dwc3_exynos *exynos = dev_get_drvdata(dev); > > + > > + return __dwc3_exynos_suspend(exynos); > > If dwc3-exynos is runtime suspended, the clock will be disabled > second time here (unbalanced clk_enable/clk_disable). I don't get what you mean but there is something that probably needs fixing, I guess below makes it better: diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index c93919a..1e5720a 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c @@ -218,6 +218,9 @@ static int dwc3_exynos_suspend(struct device *dev) { struct dwc3_exynos *exynos = dev_get_drvdata(dev); + if (pm_runtime_suspended(dev)) + return 0; + return __dwc3_exynos_suspend(exynos); } Is that what you meant ? -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/7] usb: dwc3: exynos: add pm_runtime support Date: Fri, 13 Dec 2013 13:56:18 -0600 [thread overview] Message-ID: <20131213195618.GG5292@saruman.home> (raw) In-Reply-To: <000301cef7c0$640c1ce0$2c2456a0$%tikhomirov@samsung.com> On Fri, Dec 13, 2013 at 02:01:32PM +0900, Anton Tikhomirov wrote: > Hi Felipe, > > > -static int dwc3_exynos_suspend(struct device *dev) > > +static int __dwc3_exynos_suspend(struct dwc3_exynos *exynos) > > { > > - struct dwc3_exynos *exynos = dev_get_drvdata(dev); > > - > > clk_disable(exynos->clk); > > > > return 0; > > } > > > > +static int __dwc3_exynos_resume(struct dwc3_exynos *exynos) > > +{ > > + return clk_enable(exynos->clk); > > +} > > + > > +static int dwc3_exynos_suspend(struct device *dev) > > +{ > > + struct dwc3_exynos *exynos = dev_get_drvdata(dev); > > + > > + return __dwc3_exynos_suspend(exynos); > > If dwc3-exynos is runtime suspended, the clock will be disabled > second time here (unbalanced clk_enable/clk_disable). I don't get what you mean but there is something that probably needs fixing, I guess below makes it better: diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index c93919a..1e5720a 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c @@ -218,6 +218,9 @@ static int dwc3_exynos_suspend(struct device *dev) { struct dwc3_exynos *exynos = dev_get_drvdata(dev); + if (pm_runtime_suspended(dev)) + return 0; + return __dwc3_exynos_suspend(exynos); } Is that what you meant ? -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131213/b6321c93/attachment-0001.sig>
next prev parent reply other threads:[~2013-12-13 19:56 UTC|newest] Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-12 21:38 [PATCH 0/7] usb: dwc3: pm_runtime implementation Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi 2013-12-12 21:38 ` [PATCH 1/7] usb: dwc3: keystone: add basic PM support Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi 2013-12-12 21:43 ` Felipe Balbi 2013-12-12 21:43 ` Felipe Balbi 2013-12-12 21:45 ` [PATCH v2 " Felipe Balbi 2013-12-12 21:45 ` Felipe Balbi 2013-12-12 21:48 ` Felipe Balbi 2013-12-12 21:48 ` Felipe Balbi 2013-12-13 0:29 ` Santosh Shilimkar 2013-12-13 0:29 ` Santosh Shilimkar 2013-12-13 0:43 ` Felipe Balbi 2013-12-13 0:43 ` Felipe Balbi 2013-12-13 23:15 ` Santosh Shilimkar 2013-12-13 23:15 ` Santosh Shilimkar [not found] ` <52AA54E4.5000606-l0cyMroinI0@public.gmane.org> 2013-12-13 16:04 ` Kwok, WingMan 2013-12-13 16:04 ` Kwok, WingMan 2013-12-13 19:54 ` Felipe Balbi 2013-12-13 19:54 ` Felipe Balbi 2013-12-13 20:18 ` Kwok, WingMan 2013-12-13 20:18 ` Kwok, WingMan 2013-12-13 20:22 ` Felipe Balbi 2013-12-13 20:22 ` Felipe Balbi 2013-12-13 21:26 ` Kwok, WingMan 2013-12-13 21:26 ` Kwok, WingMan 2013-12-12 21:38 ` [PATCH 2/7] usb: dwc3: omap: add basic pm_runtime support Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi 2013-12-12 21:38 ` [PATCH 4/7] usb: dwc3: omap: fix pm_runtime usage Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi [not found] ` <1386884325-11440-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org> 2013-12-12 21:38 ` [PATCH 3/7] usb: dwc3: pci: add pm_runtime support Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi 2013-12-13 1:56 ` David Cohen 2013-12-13 1:56 ` David Cohen 2013-12-13 4:17 ` Felipe Balbi 2013-12-13 4:17 ` Felipe Balbi 2013-12-13 4:29 ` David Cohen 2013-12-13 4:29 ` David Cohen 2013-12-12 21:38 ` [PATCH 5/7] usb: dwc3: omap: fix order of pm_runtime vs child removal Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi 2013-12-17 23:31 ` [PATCH 0/7] usb: dwc3: pm_runtime implementation David Cohen 2013-12-17 23:31 ` David Cohen 2013-12-17 23:35 ` David Cohen 2013-12-17 23:35 ` David Cohen 2013-12-18 15:36 ` Felipe Balbi 2013-12-18 15:36 ` Felipe Balbi 2013-12-18 15:40 ` Felipe Balbi 2013-12-18 15:40 ` Felipe Balbi 2013-12-12 21:38 ` [PATCH 6/7] usb: dwc3: exynos: remove DEV_PM_OPS hackery Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi 2013-12-12 21:38 ` [PATCH 7/7] usb: dwc3: exynos: add pm_runtime support Felipe Balbi 2013-12-12 21:38 ` Felipe Balbi 2013-12-13 5:01 ` Anton Tikhomirov 2013-12-13 5:01 ` Anton Tikhomirov 2013-12-13 19:56 ` Felipe Balbi [this message] 2013-12-13 19:56 ` Felipe Balbi 2013-12-13 20:18 ` Felipe Balbi 2013-12-13 20:18 ` Felipe Balbi 2013-12-16 2:47 ` Anton Tikhomirov 2013-12-16 2:47 ` Anton Tikhomirov [not found] ` <20131213195618.GG5292-HgARHv6XitL9zxVx7UNMDg@public.gmane.org> 2013-12-16 2:31 ` Anton Tikhomirov 2013-12-16 2:31 ` Anton Tikhomirov
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=20131213195618.GG5292@saruman.home \ --to=balbi@ti.com \ --cc=av.tikhomirov@samsung.com \ --cc=kgene.kim@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=santosh.shilimkar@ti.com \ --cc=w-kwok2@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: linkBe 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.