On Sat, Aug 29, 2020 at 11:31:21PM +0300, Vladimir Oltean wrote: > > I think we can. > We must add a PWM kind of PHC, that does whatever it takes to make a PWM > tick at the requested period and duty cycle.
Aha, only now do I fully understand what you're asking for. I just saw the pwm_chan_set_period and pwm_chan_set_duty_cycle functions. I had thought they're only configured at init time, but they're adjusted by the servo. As far as I understand, the major problem due to which the people at TI can't reuse existing code for a servo is because they don't have a POSIX clock interface. They just have a pwmchip sysfs. Again, I don't know anything about TI hardware, but if that particular PWM controller could be modeled using a (secondary) PHC kernel interface (say, if it exposes some sort of registers that could be used to implement gettime, settime, adjfine), then I think that would be, by far, the path of least resistance. Not only will the generic servo code for a POSIX clock work with their hardware, but they could also reuse the logic for a PHC master. And in that case, no custom code in ts2phc would be needed at all. Thanks, -Vladimir _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel