Re: [PATCH RESEND 2/4] pwm: mediatek: fix clk issue

2017-06-22 Thread Zhi Mao
On Wed, 2017-06-21 at 20:07 +0800, John Crispin wrote: > Hi > > comments inline > > > > +static int mtk_pwm_clk_enable(struct pwm_chip *chip, struct pwm_device > > *pwm) > > +{ > > + ret = clk_prepare_enable(pc->clks[MTK_CLK_PWM1 + pwm->hwpwm]); > > + if (ret < 0) { > > +

Re: [PATCH RESEND 2/4] pwm: mediatek: fix clk issue

2017-06-22 Thread Zhi Mao
On Wed, 2017-06-21 at 20:07 +0800, John Crispin wrote: > Hi > > comments inline > > > > +static int mtk_pwm_clk_enable(struct pwm_chip *chip, struct pwm_device > > *pwm) > > +{ > > + ret = clk_prepare_enable(pc->clks[MTK_CLK_PWM1 + pwm->hwpwm]); > > + if (ret < 0) { > > +

Re: [PATCH RESEND 2/4] pwm: mediatek: fix clk issue

2017-06-21 Thread John Crispin
Hi comments inline On 21/06/17 10:11, Zhi Mao wrote: 1.fix clock control - prepare top/main clk in mtk_pwm_probe() function, it will increase power consumption and in original code these clocks is only prepeare but never enabled - pwm clock should be enabled before setting pwm

Re: [PATCH RESEND 2/4] pwm: mediatek: fix clk issue

2017-06-21 Thread John Crispin
Hi comments inline On 21/06/17 10:11, Zhi Mao wrote: 1.fix clock control - prepare top/main clk in mtk_pwm_probe() function, it will increase power consumption and in original code these clocks is only prepeare but never enabled - pwm clock should be enabled before setting pwm

[PATCH RESEND 2/4] pwm: mediatek: fix clk issue

2017-06-21 Thread Zhi Mao
1.fix clock control - prepare top/main clk in mtk_pwm_probe() function, it will increase power consumption and in original code these clocks is only prepeare but never enabled - pwm clock should be enabled before setting pwm registers in function: mtk_pwm_config() 2.fix pwm source

[PATCH RESEND 2/4] pwm: mediatek: fix clk issue

2017-06-21 Thread Zhi Mao
1.fix clock control - prepare top/main clk in mtk_pwm_probe() function, it will increase power consumption and in original code these clocks is only prepeare but never enabled - pwm clock should be enabled before setting pwm registers in function: mtk_pwm_config() 2.fix pwm source