Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-03-01 Thread Geert Uytterhoeven
Hi Ulf, On Thu, Mar 1, 2018 at 12:22 PM, Ulf Hansson wrote: > On 1 March 2018 at 11:37, Geert Uytterhoeven wrote: >> On Thu, Mar 1, 2018 at 11:18 AM, Ulf Hansson wrote: >>> Another problem with the PM clk is, more exactly with >>> pm_clk_suspend|resume(), that those invokes only clk_enable|disa

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-03-01 Thread Ulf Hansson
On 1 March 2018 at 11:37, Geert Uytterhoeven wrote: > Hi Ulf, > > On Thu, Mar 1, 2018 at 11:18 AM, Ulf Hansson wrote: >> On 1 March 2018 at 09:33, Geert Uytterhoeven wrote: >>> On Thu, Mar 1, 2018 at 4:40 AM, JeffyChen wrote: 3/ make sure PM clk always be controlled(otherwise it might be u

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-03-01 Thread Geert Uytterhoeven
Hi Ulf, On Thu, Mar 1, 2018 at 11:18 AM, Ulf Hansson wrote: > On 1 March 2018 at 09:33, Geert Uytterhoeven wrote: >> On Thu, Mar 1, 2018 at 4:40 AM, JeffyChen wrote: >>> 3/ make sure PM clk always be controlled(otherwise it might be unexpected >>> disabled by other clocks under the same clk par

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-03-01 Thread Ulf Hansson
+linux-pm Geert, Jeffry, Tomasz, Apologize for side-tracking the discussion. Just wanted to add a few comments, whatever it's worth to you. On 1 March 2018 at 09:33, Geert Uytterhoeven wrote: > Hi Jeffy, > > On Thu, Mar 1, 2018 at 4:40 AM, JeffyChen wrote: >> if i'm reading the code right, the

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-03-01 Thread JeffyChen
Hi Geert, Thanks for your reply. On 03/01/2018 04:33 PM, Geert Uytterhoeven wrote: >so maybe we can: >1/ let the device(dts) or driver decide which clock is PM clk, and add it >using*pm_clk_add* APIs (even of_pm_clk_add_clks() if all clocks are pm clk) > >2/ add support for critical PM clk, wh

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-03-01 Thread Geert Uytterhoeven
Hi Jeffy, On Thu, Mar 1, 2018 at 4:40 AM, JeffyChen wrote: > if i'm reading the code right, the PM clk means: > 1/ the clocks which would be enabled while power on > 2/ these clocks are optional, it's ok if anything wrong with them > 3/ controlled by pm_domain(or USE_PM_CLK_RUNTIME_OPS & pm_clk_a

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread JeffyChen
Hi guys, if i'm reading the code right, the PM clk means: 1/ the clocks which would be enabled while power on 2/ these clocks are optional, it's ok if anything wrong with them 3/ controlled by pm_domain(or USE_PM_CLK_RUNTIME_OPS & pm_clk_add_notifier) and currently we're adding all clocks of the

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Tomasz Figa
On Wed, Feb 28, 2018 at 10:11 PM, Geert Uytterhoeven wrote: > Hi Tomasz, > > On Wed, Feb 28, 2018 at 1:49 PM, Tomasz Figa wrote: >> On Wed, Feb 28, 2018 at 9:32 PM, Geert Uytterhoeven >> wrote: >>> On Wed, Feb 28, 2018 at 1:29 PM, Tomasz Figa wrote: Also, how about systems where runtime PM

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Geert Uytterhoeven
Hi Tomasz, On Wed, Feb 28, 2018 at 1:49 PM, Tomasz Figa wrote: > On Wed, Feb 28, 2018 at 9:32 PM, Geert Uytterhoeven > wrote: >> On Wed, Feb 28, 2018 at 1:29 PM, Tomasz Figa wrote: >>> Also, how about systems where runtime PM is disabled? I think that's >>> one of the reasons we control the clo

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Tomasz Figa
On Wed, Feb 28, 2018 at 9:32 PM, Geert Uytterhoeven wrote: > Hi Tomasz, > > On Wed, Feb 28, 2018 at 1:29 PM, Tomasz Figa wrote: >> On Wed, Feb 28, 2018 at 9:17 PM, Geert Uytterhoeven >> wrote: >>> On Wed, Feb 28, 2018 at 12:11 PM, Jeffy Chen >>> wrote: Currently we are adding all of the a

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread JeffyChen
Hi Geert, Thanks for you reply. On 02/28/2018 08:17 PM, Geert Uytterhoeven wrote: Hi Jeffy, On Wed, Feb 28, 2018 at 12:11 PM, Jeffy Chen wrote: Currently we are adding all of the attached devices' clocks as pm clocks and enable them when powering on the power domain. This seems unnecessary,

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Geert Uytterhoeven
Hi Tomasz, On Wed, Feb 28, 2018 at 1:29 PM, Tomasz Figa wrote: > On Wed, Feb 28, 2018 at 9:17 PM, Geert Uytterhoeven > wrote: >> On Wed, Feb 28, 2018 at 12:11 PM, Jeffy Chen >> wrote: >>> Currently we are adding all of the attached devices' clocks as pm clocks >>> and enable them when powering

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Tomasz Figa
Hi Geert, On Wed, Feb 28, 2018 at 9:17 PM, Geert Uytterhoeven wrote: > Hi Jeffy, > > On Wed, Feb 28, 2018 at 12:11 PM, Jeffy Chen > wrote: >> Currently we are adding all of the attached devices' clocks as pm clocks >> and enable them when powering on the power domain. >> >> This seems unnecessa

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Geert Uytterhoeven
Hi Jeffy, On Wed, Feb 28, 2018 at 12:11 PM, Jeffy Chen wrote: > Currently we are adding all of the attached devices' clocks as pm clocks > and enable them when powering on the power domain. > > This seems unnecessary, because those clocks are already controlled in > the devices' drivers with bett

Re: [PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Heiko Stübner
Hi Jeffy, Am Mittwoch, 28. Februar 2018, 12:11:13 CET schrieb Jeffy Chen: > Currently we are adding all of the attached devices' clocks as pm clocks > and enable them when powering on the power domain. > > This seems unnecessary, because those clocks are already controlled in > the devices' drive

[PATCH] soc: rockchip: power-domain: remove PM clocks

2018-02-28 Thread Jeffy Chen
Currently we are adding all of the attached devices' clocks as pm clocks and enable them when powering on the power domain. This seems unnecessary, because those clocks are already controlled in the devices' drivers with better error handling. Tested on my chromebook minnie(rk3288) and chromebook