Message ID | 20220419083704.48573-1-horatiu.vultur@microchip.com (mailing list archive) |
---|---|
Headers | show |
Series | net: phy: Extend sysfs to adjust PHY latency. | expand |
On Tue, Apr 19, 2022 at 10:37:02AM +0200, Horatiu Vultur wrote: > The previous try of setting the PHY latency was here[1]. But this approach > could not work for multiple reasons: > - the interface was not generic enough so it would be hard to be extended > in the future > - if there were multiple time stamper in the system then it was not clear > to which one should adjust these values. > > So the next try is to extend sysfs and configure exactly the desired PHY. What about timestampers which are not PHYs? Ideally you want one interface which will work for any sort of stamper, be it MAC, PHY, or a bump in the wire between the MAC and the PHY. Andrew
The 04/19/2022 14:17, Andrew Lunn wrote: Hi Andrew, > > On Tue, Apr 19, 2022 at 10:37:02AM +0200, Horatiu Vultur wrote: > > The previous try of setting the PHY latency was here[1]. But this approach > > could not work for multiple reasons: > > - the interface was not generic enough so it would be hard to be extended > > in the future > > - if there were multiple time stamper in the system then it was not clear > > to which one should adjust these values. > > > > So the next try is to extend sysfs and configure exactly the desired PHY. > > What about timestampers which are not PHYs? Ideally you want one > interface which will work for any sort of stamper, be it MAC, PHY, or > a bump in the wire between the MAC and the PHY. My initial idea was that each of the timestampers will need to extend the sysfs to add this file or multiple files. But from what I can see this approach will not fly. If we want an interface to be used by any sort of stamper, we could create a new generic class (eth_tunable/eth_obj). Then each driver will register a device that will use this generic class. We will continue to use sysfs to expose all the modes supported by the driver. But this time create a file for each mode. The entire approach should be something similar with the ptp clocks. What do you think, is this the right approach? > > Andrew