Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-16 Thread Thierry Reding
On Fri, Nov 16, 2018 at 07:47:48AM +0100, Uwe Kleine-König wrote: > On Wed, Nov 14, 2018 at 01:47:52PM +0100, Thierry Reding wrote: > > On Tue, Nov 13, 2018 at 10:08:22AM +0800, Ryder Lee wrote: > > > The flag 'has_clks' and related checks are superfluous as the CCF > > > subsystem does this for yo

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-15 Thread Uwe Kleine-König
On Wed, Nov 14, 2018 at 01:47:52PM +0100, Thierry Reding wrote: > On Tue, Nov 13, 2018 at 10:08:22AM +0800, Ryder Lee wrote: > > The flag 'has_clks' and related checks are superfluous as the CCF > > subsystem does this for you. > > Both of these mechanisms aren't equivalent. While CCF can deal wit

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-14 Thread Ryder Lee
On Wed, 2018-11-14 at 14:27 +0100, John Crispin wrote: > On 14/11/2018 13:47, Thierry Reding wrote: > > On Tue, Nov 13, 2018 at 10:08:22AM +0800, Ryder Lee wrote: > >> The flag 'has_clks' and related checks are superfluous as the CCF > >> subsystem does this for you. > > Both of these mechanisms ar

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-14 Thread John Crispin
On 14/11/2018 13:47, Thierry Reding wrote: On Tue, Nov 13, 2018 at 10:08:22AM +0800, Ryder Lee wrote: The flag 'has_clks' and related checks are superfluous as the CCF subsystem does this for you. Both of these mechanisms aren't equivalent. While CCF can deal with optional clocks, what the ha

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-14 Thread Thierry Reding
On Tue, Nov 13, 2018 at 10:08:22AM +0800, Ryder Lee wrote: > The flag 'has_clks' and related checks are superfluous as the CCF > subsystem does this for you. Both of these mechanisms aren't equivalent. While CCF can deal with optional clocks, what the has_clks flag actually means is that the devic

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-13 Thread Stephen Boyd
Quoting Uwe Kleine-König (2018-11-13 01:52:10) > > I wonder if it would make sense to introduce functions like: > > struct clk *clk_get_optional(struct device *dev, const char *id) > > that return NULL instead of ERR_PTR(-ENODEV). > > Then the above would simplify to: > > pc->c

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-13 Thread Uwe Kleine-König
Hello, On Tue, Nov 13, 2018 at 10:08:22AM +0800, Ryder Lee wrote: > The flag 'has_clks' and related checks are superfluous as the CCF > subsystem does this for you. I'd write instead: Handle optional clocks by using NULL as clk instead of a separate bool field in the device's pla

[resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-12 Thread Ryder Lee
The flag 'has_clks' and related checks are superfluous as the CCF subsystem does this for you. Cc: John Crispin Signed-off-by: Ryder Lee --- drivers/pwm/pwm-mediatek.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/