Hi Uwe, On Sun, Dec 22, 2019 at 10:48:51PM +0100, Uwe Kleine-König wrote: > Hello Jeff, > > On Sat, Dec 21, 2019 at 03:28:01AM +0000, Jeff LaBundy wrote: > > I heard back from the vendor today; they've acknowledged the limitation and > > are considering adding support for 0% in a future ROM spin. In the meantime, > > they've agreed to describe the high-impedance behavior in the data sheet as > > well as include the pull-down resistor in an example schematic. > > Oh wow, seems like a good vendor then. :-) > > > > > Option (3) seems like overkill for such a simple PWM, and ultimately doesn't > > > > add any value because I don't want to allow option (1) behavior in any case. > > > > Whether the PWM is disabled because it is truly disabled or to simulate a 0% > > > > duty cycle as in option (2), the pull-down is ultimately required regardless > > > > of whether or not the data sheet happens to go into such detail. > > > > > > Actually I like option 3 best. > > > > > > > Based on your other feedback, I'm moving forward under the impression that > > you'll still accept option (2); please let me know if I have misunderstood > > (thank you for being flexible). > > Yeah, that's fine. If in the end it shows that this is a bad idea we can > still change to (3). > Sounds great. As soon as 5.5-rc5 lands this weekend, I'll rebase v3 and send it out. I failed to catch this in my previous reply, but the comment I've added to iqs620_pwm_get_state actually reads as follows: /* * Since the device cannot generate a 0% duty cycle, requests to do so * force subsequent calls to iqs620_pwm_get_state to report the output * as disabled with duty cycle equal to that which was in use prior to * the request. This is not ideal, but is the best compromise based on * the capabilities of the device. */ This matches the present implementation, not your proposed comment that claims duty cycle is clamped to 1 / 256 ms following a request for a 0% duty cycle. This seems OK since the concept of a duty cycle or period aren't really relevant if the output is disabled in my opinion. However if you prefer I update iqs620_pwm_apply to clamp duty cycle to 1 / 256 ms (instead of leaving it untouched) in this case, please let me know. > Best regards > Uwe > > -- > Pengutronix e.K. | Uwe Kleine-König | > Industrial Linux Solutions | https://www.pengutronix.de/ | Wishing you a Happy New Year, Jeff LaBundy