]> git.baikalelectronics.ru Git - kernel.git/commit
ptp_clock: Let the ADJ_OFFSET interface respect the ADJ_NANO flag for PHC devices.
authorRichard Cochran <richardcochran@gmail.com>
Sun, 24 May 2020 18:27:10 +0000 (11:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 May 2020 00:55:17 +0000 (17:55 -0700)
commit35832d82b2c54387cd31fa2f2b9a4b547ee923d7
tree9f3a0283aed87fe5cd117a49e7dc9eeb5439e3db
parentc65e820c85fe9777a83ec8c5350803782d42368b
ptp_clock: Let the ADJ_OFFSET interface respect the ADJ_NANO flag for PHC devices.

In commit 59e25482dd7119e095a3ee10a3852b0572ef6b9c ("ptp: Add adjphase
function to support phase offset control.") the PTP Hardware Clock
interface expanded to support the ADJ_OFFSET offset mode.  However,
the implementation did not respect the traditional yet pedantic
distinction between units of microseconds and nanoseconds signaled by
the ADJ_NANO flag.  This patch fixes the issue by adding logic to
handle that flag.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Vincent Cheng <vincent.cheng.xh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_clock.c