Re: [PATCH RESEND 2/2] gpio: mvebu: Allow to use non-default PWM counter
From: Andrew Lunn
Date: Thu Aug 09 2018 - 11:43:12 EST
> I'm not sure that the logic:
> 1. Default counter assigned to the bank
> 2. Unused counter that is assigned to other bank
> 3. Fallback to default counter
> is the best one.
Hi Richard
It it totally broken, as you point out. That is why i said it needs to
be limited to two PWMs.
> IMHO, I would either:
> - allow only 2 pwm and no more (but that's a pity)
> - allow lots of fans, but once 2 different speeds are set, return
> EINVAL for another different speed (even if it's on another bank)
This second option also breaks the Linux PWM model.
What you should be thinking about is extending the Linux PWM model so
that one PWM can drive more than one pin.
Andrew