Re: [Intel-gfx] [PATCH v2 10/15] pwm: crc: Implement apply() method to support the new atomic PWM API

2020-06-09 Thread Andy Shevchenko
On Tue, Jun 09, 2020 at 03:44:18PM +0200, Hans de Goede wrote: > On 6/9/20 1:32 PM, Andy Shevchenko wrote: > > On Sun, Jun 07, 2020 at 08:18:35PM +0200, Hans de Goede wrote: ... > > And again... :-( > > Well yes I cannot help it that the original code, as submitted by Intel, > was of very questi

Re: [Intel-gfx] [PATCH v2 10/15] pwm: crc: Implement apply() method to support the new atomic PWM API

2020-06-09 Thread Hans de Goede
Hi, On 6/9/20 1:32 PM, Andy Shevchenko wrote: On Sun, Jun 07, 2020 at 08:18:35PM +0200, Hans de Goede wrote: Replace the enable, disable and config pwm_ops with an apply op, to support the new atomic PWM API. ... -static int crc_pwm_calc_clk_div(int period_ns) +static int crc_pwm_apply(stru

Re: [Intel-gfx] [PATCH v2 10/15] pwm: crc: Implement apply() method to support the new atomic PWM API

2020-06-09 Thread Andy Shevchenko
On Sun, Jun 07, 2020 at 08:18:35PM +0200, Hans de Goede wrote: > Replace the enable, disable and config pwm_ops with an apply op, > to support the new atomic PWM API. ... > -static int crc_pwm_calc_clk_div(int period_ns) > +static int crc_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, >

[Intel-gfx] [PATCH v2 10/15] pwm: crc: Implement apply() method to support the new atomic PWM API

2020-06-07 Thread Hans de Goede
Replace the enable, disable and config pwm_ops with an apply op, to support the new atomic PWM API. Signed-off-by: Hans de Goede --- drivers/pwm/pwm-crc.c | 107 +++--- 1 file changed, 59 insertions(+), 48 deletions(-) diff --git a/drivers/pwm/pwm-crc.c b/dri