Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-12 Thread Viresh Kumar
On 11 May 2014 17:08, jonghwan Choi wrote: > I already considered it. > (But it only passes on what cpufreq driver has to do to clock framework. > For changing clock rate, if changing operation just divides a rate of > parent it can be solved easily > But exycpufreq driver is more complicated.

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-12 Thread Viresh Kumar
On 11 May 2014 17:08, jonghwan Choi jhbird.c...@gmail.com wrote: I already considered it. (But it only passes on what cpufreq driver has to do to clock framework. For changing clock rate, if changing operation just divides a rate of parent it can be solved easily But exycpufreq driver is

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-11 Thread jonghwan Choi
On Fri, May 9, 2014 at 6:23 AM, Nishanth Menon wrote: > Have you considered the option of having a clock driver which can > decide the divider (based on dts OR index or whatever)? > > example: you could do clk_set_rate(apll, rate); > and instead of implementing clock divider programmation inside

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-11 Thread jonghwan Choi
On Fri, May 9, 2014 at 6:23 AM, Nishanth Menon n...@ti.com wrote: Have you considered the option of having a clock driver which can decide the divider (based on dts OR index or whatever)? example: you could do clk_set_rate(apll, rate); and instead of implementing clock divider programmation

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-09 Thread Nishanth Menon
On 05/09/2014 06:59 AM, jonghwan Choi wrote: > On Thu, May 8, 2014 at 11:00 PM, Viresh Kumar wrote: > >> Why? So, as far as I got it your dividers are nothing but 0,1,2... >> i.e. >> Freqs: 400 500 600 700 800 >> div: 4 3 2 1 0 >> >> right? That's what you are doing

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-09 Thread jonghwan Choi
On Thu, May 8, 2014 at 11:00 PM, Viresh Kumar wrote: > Why? So, as far as I got it your dividers are nothing but 0,1,2... > i.e. > Freqs: 400 500 600 700 800 > div: 4 3 2 1 0 > > right? That's what you are doing in exynos5440. So just add this in your > probe after

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-09 Thread Viresh Kumar
On 9 May 2014 06:39, Jonghwan Choi wrote: > -> In exynos cpufreq driver, if we want to support more frequency, then Don't add "->" to your replies, it doesn't make it more readable but less. > we have to describe frequency information in dts file and have to change > exynos cpufreq > driver

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-09 Thread Viresh Kumar
On 9 May 2014 06:39, Jonghwan Choi jhbird.c...@samsung.com wrote: - In exynos cpufreq driver, if we want to support more frequency, then Don't add - to your replies, it doesn't make it more readable but less. we have to describe frequency information in dts file and have to change exynos

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-09 Thread jonghwan Choi
On Thu, May 8, 2014 at 11:00 PM, Viresh Kumar viresh.ku...@linaro.org wrote: Why? So, as far as I got it your dividers are nothing but 0,1,2... i.e. Freqs: 400 500 600 700 800 div: 4 3 2 1 0 right? That's what you are doing in exynos5440. So just add this in

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-09 Thread Nishanth Menon
On 05/09/2014 06:59 AM, jonghwan Choi wrote: On Thu, May 8, 2014 at 11:00 PM, Viresh Kumar viresh.ku...@linaro.org wrote: Why? So, as far as I got it your dividers are nothing but 0,1,2... i.e. Freqs: 400 500 600 700 800 div: 4 3 2 1 0 right? That's what you

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-08 Thread Jonghwan Choi
On 8 May 2014 2:56 PM, Viresh Kumar wrote: > > Not necessarily. People may need a multiplier as well or some other > configuration and so this stuff was left for drivers to implement. -> In exynos cpufreq driver, if we want to support more frequency, then we have to describe frequency

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-08 Thread Jonghwan Choi
On 8 May 2014 2:56 PM, Viresh Kumar viresh.ku...@linaro.org wrote: Not necessarily. People may need a multiplier as well or some other configuration and so this stuff was left for drivers to implement. - In exynos cpufreq driver, if we want to support more frequency, then we have to

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Viresh Kumar
On 8 May 2014 07:37, Jonghwan Choi wrote: As asked earlier by Nishanth: - Avoid top-posting (the practice of putting your answer above the quoted text you are responding to). It makes your response harder to read and makes a poor impression. Reference:

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Viresh Kumar
On Thu, May 8, 2014 at 7:25 AM, Nishanth Menon wrote: >> Is it acceptiable? > > Personally, I feel that filling up driver_data should be left to the > driver(caller of dev_pm_opp_init_cpufreq_table). Exactly, and I never advised Jonghwan to update the common routine for this. I wanted him to

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Jonghwan Choi
, 2014 10:56 AM > To: Jonghwan Choi > Cc: Viresh Kumar; Linux PM list; open list; Rafael J. Wysocki; Len Brown; > Amit Daniel Kachhap > Subject: Re: [PATCH 1/3] PM / OPP: Add support for descending order for > cpufreq table > > On Wed, May 7, 2014 at 8:22 PM, Jonghwan Choi

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Nishanth Menon
On Wed, May 7, 2014 at 8:22 PM, Jonghwan Choi wrote: >> @Jonghwan: Please consider doing this: >> - Don't play with the order of frequencies in table. >> - Instead initialize .driver_data filed with values that you need to write >> in the registers for all frequencies. i.e. 0 for highest

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Jonghwan Choi
> @Jonghwan: Please consider doing this: > - Don't play with the order of frequencies in table. > - Instead initialize .driver_data filed with values that you need to write > in the registers for all frequencies. i.e. 0 for highest frequency and > FREQ_COUNT-1 for lowest one. -> For that, I

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Viresh Kumar
On 7 May 2014 06:30, Nishanth Menon wrote: > So, we could do [2] as default as well, if it is determined to impact > no one else making any form of assumptions on table ordering - but it > might be preferable for drivers not to depend on framework ordering of > data as things could change in the

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Viresh Kumar
On 7 May 2014 06:30, Nishanth Menon n...@ti.com wrote: So, we could do [2] as default as well, if it is determined to impact no one else making any form of assumptions on table ordering - but it might be preferable for drivers not to depend on framework ordering of data as things could change

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Jonghwan Choi
@Jonghwan: Please consider doing this: - Don't play with the order of frequencies in table. - Instead initialize .driver_data filed with values that you need to write in the registers for all frequencies. i.e. 0 for highest frequency and FREQ_COUNT-1 for lowest one. - For that, I changed

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Nishanth Menon
On Wed, May 7, 2014 at 8:22 PM, Jonghwan Choi jhbird.c...@samsung.com wrote: @Jonghwan: Please consider doing this: - Don't play with the order of frequencies in table. - Instead initialize .driver_data filed with values that you need to write in the registers for all frequencies. i.e. 0 for

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Jonghwan Choi
To: Jonghwan Choi Cc: Viresh Kumar; Linux PM list; open list; Rafael J. Wysocki; Len Brown; Amit Daniel Kachhap Subject: Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table On Wed, May 7, 2014 at 8:22 PM, Jonghwan Choi jhbird.c...@samsung.com wrote: @Jonghwan

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Viresh Kumar
On Thu, May 8, 2014 at 7:25 AM, Nishanth Menon n...@ti.com wrote: Is it acceptiable? Personally, I feel that filling up driver_data should be left to the driver(caller of dev_pm_opp_init_cpufreq_table). Exactly, and I never advised Jonghwan to update the common routine for this. I wanted him

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-07 Thread Viresh Kumar
On 8 May 2014 07:37, Jonghwan Choi jhbird.c...@samsung.com wrote: As asked earlier by Nishanth: - Avoid top-posting (the practice of putting your answer above the quoted text you are responding to). It makes your response harder to read and makes a poor impression. Reference:

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-06 Thread Nishanth Menon
On Tue, May 6, 2014 at 6:43 PM, Jonghwan Choi wrote: > Hi Please dont top post. it is usually frowned upon. > > My holiday is finished. > > I implemented another cpufreq driver. And that driver also have to use > exynos_sort_descend_freq_table(). > Then exynos5440 and new cpufreq have a

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-06 Thread Jonghwan Choi
age- > From: Viresh Kumar [mailto:viresh.ku...@linaro.org] > Sent: Monday, May 05, 2014 11:39 PM > To: Nishanth Menon > Cc: Jonghwan Choi; Linux PM list; open list; Rafael J. Wysocki; Len Brown; > Amit Daniel Kachhap > Subject: Re: [PATCH 1/3] PM / OPP: Add support for descending orde

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-06 Thread Sudeep Holla
On Mon, May 5, 2014 at 3:14 PM, Viresh Kumar wrote: > On 5 May 2014 19:08, Nishanth Menon wrote: >> With the brief history of the patch in linux-pm, I am unable to >> understand why not just use ceil/floor routines to pick up data the >> way you need it. It should not matter if we use an ordered

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-06 Thread Jonghwan Choi
: Viresh Kumar [mailto:viresh.ku...@linaro.org] Sent: Monday, May 05, 2014 11:39 PM To: Nishanth Menon Cc: Jonghwan Choi; Linux PM list; open list; Rafael J. Wysocki; Len Brown; Amit Daniel Kachhap Subject: Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table On 5

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-06 Thread Nishanth Menon
On Tue, May 6, 2014 at 6:43 PM, Jonghwan Choi jhbird.c...@samsung.com wrote: Hi Please dont top post. it is usually frowned upon. My holiday is finished. I implemented another cpufreq driver. And that driver also have to use exynos_sort_descend_freq_table(). Then exynos5440 and new

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-06 Thread Sudeep Holla
On Mon, May 5, 2014 at 3:14 PM, Viresh Kumar viresh.ku...@linaro.org wrote: On 5 May 2014 19:08, Nishanth Menon n...@ti.com wrote: With the brief history of the patch in linux-pm, I am unable to understand why not just use ceil/floor routines to pick up data the way you need it. It should not

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Nishanth Menon
On Mon, May 5, 2014 at 9:38 AM, Viresh Kumar wrote: > On 5 May 2014 19:53, Nishanth Menon wrote: >> ceil and floor allows us to walk down the opp entries the direction we >> want it to. >> one can convert that data any way one wants it - especially when custom >> mapping such as this is desired.

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Viresh Kumar
On 5 May 2014 19:53, Nishanth Menon wrote: > ceil and floor allows us to walk down the opp entries the direction we > want it to. > one can convert that data any way one wants it - especially when custom > mapping such as this is desired. Yeah, but doing that for every frequency transition is

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Nishanth Menon
On Mon, May 5, 2014 at 9:14 AM, Viresh Kumar wrote: > > To be precise, for exynos they need the position of a frequency when > it is arranged in descending order. And they will simply write this position > in their clock controller later. For example, if frequencies are: > 100 MHz, 200, 300, 400,

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Viresh Kumar
On 5 May 2014 19:08, Nishanth Menon wrote: > With the brief history of the patch in linux-pm, I am unable to > understand why not just use ceil/floor routines to pick up data the > way you need it. It should not matter if we use an ordered list, or > some other weird organization inside the

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Nishanth Menon
On 05/05/2014 12:54 AM, Viresh Kumar wrote: > On 3 May 2014 05:46, Jonghwan Choi wrote: >> Hi. Viresh Kumar >> Your reply is so fast like Usain Bolt. > > Heh, that's not true.. See how slow I was this time :) > >>> So, create three flags: >>> OPP_TABLE_ORDER_ASCENDING 0 >>>

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Nishanth Menon
On 05/05/2014 12:54 AM, Viresh Kumar wrote: On 3 May 2014 05:46, Jonghwan Choi jhbird.c...@samsung.com wrote: Hi. Viresh Kumar Your reply is so fast like Usain Bolt. Heh, that's not true.. See how slow I was this time :) So, create three flags: OPP_TABLE_ORDER_ASCENDING 0

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Viresh Kumar
On 5 May 2014 19:08, Nishanth Menon n...@ti.com wrote: With the brief history of the patch in linux-pm, I am unable to understand why not just use ceil/floor routines to pick up data the way you need it. It should not matter if we use an ordered list, or some other weird organization inside

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Nishanth Menon
On Mon, May 5, 2014 at 9:14 AM, Viresh Kumar viresh.ku...@linaro.org wrote: To be precise, for exynos they need the position of a frequency when it is arranged in descending order. And they will simply write this position in their clock controller later. For example, if frequencies are: 100

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Viresh Kumar
On 5 May 2014 19:53, Nishanth Menon n...@ti.com wrote: ceil and floor allows us to walk down the opp entries the direction we want it to. one can convert that data any way one wants it - especially when custom mapping such as this is desired. Yeah, but doing that for every frequency

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-05 Thread Nishanth Menon
On Mon, May 5, 2014 at 9:38 AM, Viresh Kumar viresh.ku...@linaro.org wrote: On 5 May 2014 19:53, Nishanth Menon n...@ti.com wrote: ceil and floor allows us to walk down the opp entries the direction we want it to. one can convert that data any way one wants it - especially when custom mapping

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-04 Thread Viresh Kumar
On 3 May 2014 05:46, Jonghwan Choi wrote: > Hi. Viresh Kumar > Your reply is so fast like Usain Bolt. Heh, that's not true.. See how slow I was this time :) >> So, create three flags: >> OPP_TABLE_ORDER_ASCENDING 0 >> OPP_TABLE_ORDER_DESCENDING1 >>

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-04 Thread Viresh Kumar
On 3 May 2014 05:46, Jonghwan Choi jhbird.c...@samsung.com wrote: Hi. Viresh Kumar Your reply is so fast like Usain Bolt. Heh, that's not true.. See how slow I was this time :) So, create three flags: OPP_TABLE_ORDER_ASCENDING 0 OPP_TABLE_ORDER_DESCENDING1

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-02 Thread Jonghwan Choi
resh.li...@gmail.com] On Behalf Of > Viresh Kumar > Sent: Wednesday, April 30, 2014 5:25 PM > To: Jonghwan Choi; Linux PM list > Cc: open list; Rafael J. Wysocki; Len Brown; Amit Daniel Kachhap > Subject: Re: [PATCH 1/3] PM / OPP: Add support for descending order for > cpufreq t

RE: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-05-02 Thread Jonghwan Choi
Sent: Wednesday, April 30, 2014 5:25 PM To: Jonghwan Choi; Linux PM list Cc: open list; Rafael J. Wysocki; Len Brown; Amit Daniel Kachhap Subject: Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table Hi, This isn't a very big patchset and this patch is very much

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-04-30 Thread Viresh Kumar
Hi, This isn't a very big patchset and this patch is very much required to understand other patches and so please cc all people from other list here as well.. On Wed, Apr 30, 2014 at 11:58 AM, Jonghwan Choi wrote: > In the frequency table dts file, the frequencies are arranged in Improve your

Re: [PATCH 1/3] PM / OPP: Add support for descending order for cpufreq table

2014-04-30 Thread Viresh Kumar
Hi, This isn't a very big patchset and this patch is very much required to understand other patches and so please cc all people from other list here as well.. On Wed, Apr 30, 2014 at 11:58 AM, Jonghwan Choi jhbird.c...@samsung.com wrote: In the frequency table dts file, the frequencies are