Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-24 Thread Pi-Cheng Chen
On Wed, Jun 24, 2015 at 4:56 PM, Viresh Kumar wrote: > On 24-06-15, 16:44, Pi-Cheng Chen wrote: >> One reason to put those initialization and resource allocation in probe is >> that it's easier to handle the return value -PROBE_DEFER from clock >> and regulator framework when trying to get clocks

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-24 Thread Viresh Kumar
On 24-06-15, 16:44, Pi-Cheng Chen wrote: > One reason to put those initialization and resource allocation in probe is > that it's easier to handle the return value -PROBE_DEFER from clock > and regulator framework when trying to get clocks and regulators > consumed by cpufreq driver. This is the

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-24 Thread Pi-Cheng Chen
Hi Viresh, On Wed, Jun 24, 2015 at 8:57 AM, Viresh Kumar wrote: > On 23-06-15, 23:25, Pi-Cheng Chen wrote: >> On Mon, Jun 22, 2015 at 7:45 PM, Viresh Kumar >> wrote: >> >> +static struct mtk_cpu_dvfs_info *mtk_cpu_dvfs_info_get(int cpu) >> > >> > A very bad name to a routine with very specific

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-24 Thread Viresh Kumar
On 24-06-15, 16:44, Pi-Cheng Chen wrote: One reason to put those initialization and resource allocation in probe is that it's easier to handle the return value -PROBE_DEFER from clock and regulator framework when trying to get clocks and regulators consumed by cpufreq driver. This is the

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-24 Thread Pi-Cheng Chen
On Wed, Jun 24, 2015 at 4:56 PM, Viresh Kumar viresh.ku...@linaro.org wrote: On 24-06-15, 16:44, Pi-Cheng Chen wrote: One reason to put those initialization and resource allocation in probe is that it's easier to handle the return value -PROBE_DEFER from clock and regulator framework when

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-24 Thread Pi-Cheng Chen
Hi Viresh, On Wed, Jun 24, 2015 at 8:57 AM, Viresh Kumar viresh.ku...@linaro.org wrote: On 23-06-15, 23:25, Pi-Cheng Chen wrote: On Mon, Jun 22, 2015 at 7:45 PM, Viresh Kumar viresh.ku...@linaro.org wrote: +static struct mtk_cpu_dvfs_info *mtk_cpu_dvfs_info_get(int cpu) A very bad name

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-23 Thread Viresh Kumar
On 23-06-15, 23:25, Pi-Cheng Chen wrote: > On Mon, Jun 22, 2015 at 7:45 PM, Viresh Kumar wrote: > >> +static struct mtk_cpu_dvfs_info *mtk_cpu_dvfs_info_get(int cpu) > > > > A very bad name to a routine with very specific functionality. > > Would get_mtk_cpu_dvfs_info() or

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-23 Thread Pi-Cheng Chen
Hi Viresh, On Mon, Jun 22, 2015 at 7:45 PM, Viresh Kumar wrote: > On 08-06-15, 20:29, Pi-Cheng Chen wrote: > > Sorry for the delay, I have been quite busy recently. That's fine. Thanks for reviewing. > >> +++ b/drivers/cpufreq/mt8173-cpufreq.c >> +static LIST_HEAD(cpu_dvfs_info_list); >> + >>

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-23 Thread Pi-Cheng Chen
Hi Viresh, On Mon, Jun 22, 2015 at 7:45 PM, Viresh Kumar viresh.ku...@linaro.org wrote: On 08-06-15, 20:29, Pi-Cheng Chen wrote: Sorry for the delay, I have been quite busy recently. That's fine. Thanks for reviewing. +++ b/drivers/cpufreq/mt8173-cpufreq.c +static

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-23 Thread Viresh Kumar
On 23-06-15, 23:25, Pi-Cheng Chen wrote: On Mon, Jun 22, 2015 at 7:45 PM, Viresh Kumar viresh.ku...@linaro.org wrote: +static struct mtk_cpu_dvfs_info *mtk_cpu_dvfs_info_get(int cpu) A very bad name to a routine with very specific functionality. Would get_mtk_cpu_dvfs_info() or

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-22 Thread Viresh Kumar
On 08-06-15, 20:29, Pi-Cheng Chen wrote: Sorry for the delay, I have been quite busy recently. > +++ b/drivers/cpufreq/mt8173-cpufreq.c > +static LIST_HEAD(cpu_dvfs_info_list); > + > +static inline struct mtk_cpu_dvfs_info *to_mtk_cpu_dvfs_info( > + struct list_head *list) >

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-22 Thread Viresh Kumar
On 08-06-15, 20:29, Pi-Cheng Chen wrote: Sorry for the delay, I have been quite busy recently. +++ b/drivers/cpufreq/mt8173-cpufreq.c +static LIST_HEAD(cpu_dvfs_info_list); + +static inline struct mtk_cpu_dvfs_info *to_mtk_cpu_dvfs_info( + struct list_head *list) +{ +

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-09 Thread Pi-Cheng Chen
On Tue, Jun 9, 2015 at 5:17 PM, Paul Bolle wrote: > On Mon, 2015-06-08 at 20:29 +0800, Pi-Cheng Chen wrote: >> --- /dev/null >> +++ b/drivers/cpufreq/mt8173-cpufreq.c > >> +#include > > Weren't you going to drop this include? Sorry I forget to merge that part of fix into this patch. Will fix

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-09 Thread Paul Bolle
On Mon, 2015-06-08 at 20:29 +0800, Pi-Cheng Chen wrote: > --- /dev/null > +++ b/drivers/cpufreq/mt8173-cpufreq.c > +#include Weren't you going to drop this include? > +module_init(mt8173_cpufreq_driver_init); For built-in code this is equivalent to, speaking from memory:

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-09 Thread Paul Bolle
On Mon, 2015-06-08 at 20:29 +0800, Pi-Cheng Chen wrote: --- /dev/null +++ b/drivers/cpufreq/mt8173-cpufreq.c +#include linux/module.h Weren't you going to drop this include? +module_init(mt8173_cpufreq_driver_init); For built-in code this is equivalent to, speaking from memory:

Re: [PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-09 Thread Pi-Cheng Chen
On Tue, Jun 9, 2015 at 5:17 PM, Paul Bolle pebo...@tiscali.nl wrote: On Mon, 2015-06-08 at 20:29 +0800, Pi-Cheng Chen wrote: --- /dev/null +++ b/drivers/cpufreq/mt8173-cpufreq.c +#include linux/module.h Weren't you going to drop this include? Sorry I forget to merge that part of fix into

[PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-08 Thread Pi-Cheng Chen
This patch implements MT8173 cpufreq driver. Signed-off-by: Pi-Cheng Chen --- drivers/cpufreq/Kconfig.arm | 7 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/mt8173-cpufreq.c | 550 +++ 3 files changed, 558 insertions(+) create mode

[PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-08 Thread Pi-Cheng Chen
This patch implements MT8173 cpufreq driver. Signed-off-by: Pi-Cheng Chen pi-cheng.c...@linaro.org --- drivers/cpufreq/Kconfig.arm | 7 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/mt8173-cpufreq.c | 550 +++ 3 files changed, 558