Re: [PATCH v5 2/2] Add PWM fan controller driver for LGM SoC

2020-07-27 Thread Uwe Kleine-König
Hello, On Mon, Jul 27, 2020 at 03:30:16PM +0800, Tanwar, Rahul wrote: > On 27/7/2020 3:01 pm, Uwe Kleine-König wrote: > > In v4 you had: > > > > if (state->polarity != PWM_POLARITY_NORMAL || > > state->period < pc->period) > > return -EINVAL; > > > > That's the right thing

Re: [PATCH v5 2/2] Add PWM fan controller driver for LGM SoC

2020-07-27 Thread Tanwar, Rahul
Hi Uwe, On 27/7/2020 3:01 pm, Uwe Kleine-König wrote: > On Mon, Jul 27, 2020 at 02:04:56PM +0800, Tanwar, Rahul wrote: >> Hi Uwe, >> >> On 24/7/2020 12:15 am, Uwe Kleine-König wrote: >>> Hello, >>> >>> On Thu, Jul 23, 2020 at 03:44:18PM +0800, Rahul Tanwar wrote: +static int

Re: [PATCH v5 2/2] Add PWM fan controller driver for LGM SoC

2020-07-27 Thread Uwe Kleine-König
On Mon, Jul 27, 2020 at 02:04:56PM +0800, Tanwar, Rahul wrote: > > Hi Uwe, > > On 24/7/2020 12:15 am, Uwe Kleine-König wrote: > > Hello, > > > > On Thu, Jul 23, 2020 at 03:44:18PM +0800, Rahul Tanwar wrote: > >> +static int lgm_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, > >> +

Re: [PATCH v5 2/2] Add PWM fan controller driver for LGM SoC

2020-07-27 Thread Tanwar, Rahul
Hi Uwe, On 24/7/2020 12:15 am, Uwe Kleine-König wrote: > Hello, > > On Thu, Jul 23, 2020 at 03:44:18PM +0800, Rahul Tanwar wrote: >> +static int lgm_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, >> + const struct pwm_state *state) >> +{ >> +struct lgm_pwm_chip

Re: [PATCH v5 2/2] Add PWM fan controller driver for LGM SoC

2020-07-23 Thread Uwe Kleine-König
Hello, On Thu, Jul 23, 2020 at 03:44:18PM +0800, Rahul Tanwar wrote: > +static int lgm_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, > + const struct pwm_state *state) > +{ > + struct lgm_pwm_chip *pc = to_lgm_pwm_chip(chip); > + u32 duty_cycle, val; > +

[PATCH v5 2/2] Add PWM fan controller driver for LGM SoC

2020-07-23 Thread Rahul Tanwar
Intel Lightning Mountain(LGM) SoC contains a PWM fan controller. This PWM controller does not have any other consumer, it is a dedicated PWM controller for fan attached to the system. Add driver for this PWM fan controller. Signed-off-by: Rahul Tanwar --- drivers/pwm/Kconfig | 11 ++