Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-11 Thread Viresh Kumar
On 11-02-19, 13:22, Marek Szyprowski wrote: > Hi Viresh, > > On 2019-02-11 10:55, Viresh Kumar wrote: > > On 11-02-19, 10:52, Marek Szyprowski wrote: > >> On 2019-02-11 09:44, Viresh Kumar wrote: > >>> On 07-02-19, 13:22, Marek Szyprowski wrote: > Dear All, > > Recent commit 9ac6cb5

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-11 Thread Sudeep Holla
On Mon, Feb 11, 2019 at 02:17:14PM +0530, Viresh Kumar wrote: > On 08-02-19, 17:41, Sudeep Holla wrote: > > Based on Rafael's suggestion, I cooked up something. See if this helps ? > > The policy to cpu dance can be removed and we can just run through the > > online cpumask I think. > > > > Regards

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-11 Thread Marek Szyprowski
Hi Viresh, On 2019-02-11 10:55, Viresh Kumar wrote: > On 11-02-19, 10:52, Marek Szyprowski wrote: >> On 2019-02-11 09:44, Viresh Kumar wrote: >>> On 07-02-19, 13:22, Marek Szyprowski wrote: Dear All, Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for i2c ada

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-11 Thread Viresh Kumar
On 11-02-19, 10:52, Marek Szyprowski wrote: > Hi Viresh, > > On 2019-02-11 09:44, Viresh Kumar wrote: > > On 07-02-19, 13:22, Marek Szyprowski wrote: > >> Dear All, > >> > >> Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for > >> i2c adapters") added a visible warning for an a

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-11 Thread Marek Szyprowski
Hi Viresh, On 2019-02-11 09:44, Viresh Kumar wrote: > On 07-02-19, 13:22, Marek Szyprowski wrote: >> Dear All, >> >> Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for >> i2c adapters") added a visible warning for an attempt to do i2c transfer >> over a suspended i2c bus. This

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-11 Thread Viresh Kumar
On 08-02-19, 17:41, Sudeep Holla wrote: > Based on Rafael's suggestion, I cooked up something. See if this helps ? > The policy to cpu dance can be removed and we can just run through the > online cpumask I think. > > Regards, > Sudeep > > -->8 > > diff --git i/drivers/cpufreq/cpufreq.c w/driver

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-11 Thread Viresh Kumar
On 07-02-19, 13:22, Marek Szyprowski wrote: > Dear All, > > Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for > i2c adapters") added a visible warning for an attempt to do i2c transfer > over a suspended i2c bus. This revealed a long standing issue in the > cpufreq-dt driver,

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Sudeep Holla
On Fri, Feb 08, 2019 at 01:04:18PM +0100, Marek Szyprowski wrote: > Hi Sudeep, > > On 2019-02-08 12:51, Sudeep Holla wrote: > > On Fri, Feb 08, 2019 at 12:47:06PM +0100, Marek Szyprowski wrote: > >> On 2019-02-08 12:00, Sudeep Holla wrote: > >>> On Thu, Feb 07, 2019 at 01:22:25PM +0100, Marek Szyp

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Sudeep Holla
On Fri, Feb 08, 2019 at 01:23:37PM +0100, Rafael J. Wysocki wrote: > On Fri, Feb 8, 2019 at 1:09 PM Sudeep Holla wrote: > > [...] > > Yes, in that case additional logic in the driver also needed. I am fine > > if we enforce driver to deal with this issue, but was thinking if we can > > make it g

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 1:09 PM Sudeep Holla wrote: > > On Fri, Feb 08, 2019 at 01:03:10PM +0100, Rafael J. Wysocki wrote: > > On Fri, Feb 8, 2019 at 12:39 PM Sudeep Holla wrote: > > > > > > On Fri, Feb 08, 2019 at 11:42:20AM +0100, Rafael J. Wysocki wrote: > > > > On Fri, Feb 8, 2019 at 11:31 AM

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Sudeep Holla
On Fri, Feb 08, 2019 at 01:04:18PM +0100, Marek Szyprowski wrote: > Hi Sudeep, > > On 2019-02-08 12:51, Sudeep Holla wrote: > > On Fri, Feb 08, 2019 at 12:47:06PM +0100, Marek Szyprowski wrote: > >> On 2019-02-08 12:00, Sudeep Holla wrote: > >>> On Thu, Feb 07, 2019 at 01:22:25PM +0100, Marek Szypr

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 1:04 PM Marek Szyprowski wrote: > > Hi Sudeep, > > On 2019-02-08 12:51, Sudeep Holla wrote: > > On Fri, Feb 08, 2019 at 12:47:06PM +0100, Marek Szyprowski wrote: > >> On 2019-02-08 12:00, Sudeep Holla wrote: > >>> On Thu, Feb 07, 2019 at 01:22:25PM +0100, Marek Szyprowski wr

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Sudeep Holla
On Fri, Feb 08, 2019 at 01:03:10PM +0100, Rafael J. Wysocki wrote: > On Fri, Feb 8, 2019 at 12:39 PM Sudeep Holla wrote: > > > > On Fri, Feb 08, 2019 at 11:42:20AM +0100, Rafael J. Wysocki wrote: > > > On Fri, Feb 8, 2019 at 11:31 AM Viresh Kumar > > > wrote: > > > > > > > > On 08-02-19, 11:22,

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 12:39 PM Sudeep Holla wrote: > > On Fri, Feb 08, 2019 at 11:42:20AM +0100, Rafael J. Wysocki wrote: > > On Fri, Feb 8, 2019 at 11:31 AM Viresh Kumar > > wrote: > > > > > > On 08-02-19, 11:22, Rafael J. Wysocki wrote: > > > > There are cpufreq driver suspend and resume call

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Marek Szyprowski
Hi Sudeep, On 2019-02-08 12:51, Sudeep Holla wrote: > On Fri, Feb 08, 2019 at 12:47:06PM +0100, Marek Szyprowski wrote: >> On 2019-02-08 12:00, Sudeep Holla wrote: >>> On Thu, Feb 07, 2019 at 01:22:25PM +0100, Marek Szyprowski wrote: Dear All, This is a scenario that triggers the ab

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Sudeep Holla
On Fri, Feb 08, 2019 at 12:47:06PM +0100, Marek Szyprowski wrote: > Hi Sudeep, > > On 2019-02-08 12:00, Sudeep Holla wrote: > > On Thu, Feb 07, 2019 at 01:22:25PM +0100, Marek Szyprowski wrote: > >> Dear All, > >> > >> This is a scenario that triggers the above issue: > > [...] > >> 1. system disab

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Marek Szyprowski
Hi Sudeep, On 2019-02-08 12:00, Sudeep Holla wrote: > On Thu, Feb 07, 2019 at 01:22:25PM +0100, Marek Szyprowski wrote: >> Dear All, >> >> This is a scenario that triggers the above issue: > [...] >> 1. system disables non-boot cpu's at the end of system suspend procedure, >> 2. this in turn deini

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Sudeep Holla
On Fri, Feb 08, 2019 at 11:42:20AM +0100, Rafael J. Wysocki wrote: > On Fri, Feb 8, 2019 at 11:31 AM Viresh Kumar wrote: > > > > On 08-02-19, 11:22, Rafael J. Wysocki wrote: > > > There are cpufreq driver suspend and resume callbacks, maybe use them? > > > > > > The driver could do the I2C transac

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Sudeep Holla
On Thu, Feb 07, 2019 at 01:22:25PM +0100, Marek Szyprowski wrote: > Dear All, > > This is a scenario that triggers the above issue: > [...] > 1. system disables non-boot cpu's at the end of system suspend procedure, > 2. this in turn deinitializes cpufreq drivers for the disabled cpus, > 3. early

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 11:42 AM Rafael J. Wysocki wrote: > > On Fri, Feb 8, 2019 at 11:31 AM Viresh Kumar wrote: > > > > On 08-02-19, 11:22, Rafael J. Wysocki wrote: > > > There are cpufreq driver suspend and resume callbacks, maybe use them? > > > > > > The driver could do the I2C transactions i

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 11:31 AM Viresh Kumar wrote: > > On 08-02-19, 11:22, Rafael J. Wysocki wrote: > > There are cpufreq driver suspend and resume callbacks, maybe use them? > > > > The driver could do the I2C transactions in its suspend/resume > > callbacks and do nothing in online/offline if t

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Viresh Kumar
On 08-02-19, 11:22, Rafael J. Wysocki wrote: > There are cpufreq driver suspend and resume callbacks, maybe use them? > > The driver could do the I2C transactions in its suspend/resume > callbacks and do nothing in online/offline if those are part of > system-wide suspend/resume. These are per-po

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Marek Szyprowski
Hi Rafael, On 2019-02-08 11:22, Rafael J. Wysocki wrote: > On Fri, Feb 8, 2019 at 7:50 AM Viresh Kumar wrote: >> On 07-02-19, 13:22, Marek Szyprowski wrote: >>> Dear All, >>> >>> Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for >>> i2c adapters") added a visible warning for

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Viresh Kumar
On 08-02-19, 11:18, Rafael J. Wysocki wrote: > Obviously, all I2C transfers need to take place either before > suspending the I2C controller or after resuming it. Right. But all I am saying is that it is the responsibility of the cpufreq core/driver to make sure we call ->init() only when the reso

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 7:50 AM Viresh Kumar wrote: > > On 07-02-19, 13:22, Marek Szyprowski wrote: > > Dear All, > > > > Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for > > i2c adapters") added a visible warning for an attempt to do i2c transfer > > over a suspended i2c bus.

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 9:55 AM Viresh Kumar wrote: > > On 08-02-19, 09:12, Marek Szyprowski wrote: > > On 2019-02-08 07:49, Viresh Kumar wrote: > > > Why don't you get similar problem during suspend? I think you can get > > > it when the CPUs are offlined as I2C would have gone by then. The > > >

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Rafael J. Wysocki
On Fri, Feb 8, 2019 at 10:23 AM Viresh Kumar wrote: > > On 08-02-19, 10:15, Marek Szyprowski wrote: > > On 2019-02-08 09:55, Viresh Kumar wrote: > > > On 08-02-19, 09:12, Marek Szyprowski wrote: > > >> On 2019-02-08 07:49, Viresh Kumar wrote: > > >>> Why don't you get similar problem during suspen

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Marek Szyprowski
Hi Viresh, On 2019-02-08 10:23, Viresh Kumar wrote: > On 08-02-19, 10:15, Marek Szyprowski wrote: >> On 2019-02-08 09:55, Viresh Kumar wrote: >>> On 08-02-19, 09:12, Marek Szyprowski wrote: On 2019-02-08 07:49, Viresh Kumar wrote: > Why don't you get similar problem during suspend? I thin

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Viresh Kumar
On 08-02-19, 10:15, Marek Szyprowski wrote: > On 2019-02-08 09:55, Viresh Kumar wrote: > > On 08-02-19, 09:12, Marek Szyprowski wrote: > >> On 2019-02-08 07:49, Viresh Kumar wrote: > >>> Why don't you get similar problem during suspend? I think you can get > >>> it when the CPUs are offlined as I2C

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Marek Szyprowski
Hi Viresh, On 2019-02-08 09:55, Viresh Kumar wrote: > On 08-02-19, 09:12, Marek Szyprowski wrote: >> On 2019-02-08 07:49, Viresh Kumar wrote: >>> Why don't you get similar problem during suspend? I think you can get >>> it when the CPUs are offlined as I2C would have gone by then. The >>> cpufreq

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Viresh Kumar
On 08-02-19, 09:12, Marek Szyprowski wrote: > On 2019-02-08 07:49, Viresh Kumar wrote: > > Why don't you get similar problem during suspend? I think you can get > > it when the CPUs are offlined as I2C would have gone by then. The > > cpufreq or OPP core can try and run some regulator or genpd or c

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-08 Thread Marek Szyprowski
Hi Viresh, On 2019-02-08 07:49, Viresh Kumar wrote: > On 07-02-19, 13:22, Marek Szyprowski wrote: >> Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for >> i2c adapters") added a visible warning for an attempt to do i2c transfer >> over a suspended i2c bus. This revealed a long

Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-07 Thread Viresh Kumar
On 07-02-19, 13:22, Marek Szyprowski wrote: > Dear All, > > Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for > i2c adapters") added a visible warning for an attempt to do i2c transfer > over a suspended i2c bus. This revealed a long standing issue in the > cpufreq-dt driver,

[PATCH 0/2] cpufreq/opp: rework regulator initialization

2019-02-07 Thread Marek Szyprowski
Dear All, Recent commit 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for i2c adapters") added a visible warning for an attempt to do i2c transfer over a suspended i2c bus. This revealed a long standing issue in the cpufreq-dt driver, which gives a following warning during system suspend/re