On Mon, Sep 27, 2010 at 06:05:58PM +0100, Alan Cox wrote:
Yes, and the whole point of introducing a PTP hardare clock API was to
avoid each new clock driver introducing yet another ioctl interface.
I had proposed a standard ioctl interface for PTP hardware clocks, but
that interface was rightly criticized for duplicating the posix clock
API. It does not make sense to have multiple interfaces with the exact
same functionality.
It is impossible to support every last feature of every possible
hardware clock with a generic interface, so there will always need to
be special ioctls for such features.
However, some clock functions *are* completely generic and apply to
every clock:
- set time
- get time
- adjust the frequency by N ppb
- shift the time by a given offset
The first two are provided by the posix clock interface, the third by
the NTP adjtimex call, which also can support (by a single mode
extension) the last item.
Richard
--