mbox series

[v2,net-next,0/3] ptp: Add adjust phase to support phase offset.

Message ID 1588390538-24589-1-git-send-email-vincent.cheng.xh@renesas.com (mailing list archive)
Headers show
Series ptp: Add adjust phase to support phase offset. | expand

Message

Vincent Cheng May 2, 2020, 3:35 a.m. UTC
From: Vincent Cheng <vincent.cheng.xh@renesas.com>

This series adds adjust phase to the PTP Hardware Clock device interface.

Some PTP hardware clocks have a write phase mode that has
a built-in hardware filtering capability.  The write phase mode
utilizes a phase offset control word instead of a frequency offset 
control word.  Add adjust phase function to take advantage of this
capability.

Changes since v1:
- As suggested by Richard Cochran:
  1. ops->adjphase is new so need to check for non-null function pointer.
  2. Kernel coding style uses lower_case_underscores.
  3. Use existing PTP clock API for delayed worker.

Vincent Cheng (3):
  ptp: Add adjphase function to support phase offset control.
  ptp: Add adjust_phase to ptp_clock_caps capability.
  ptp: ptp_clockmatrix: Add adjphase() to support PHC write phase mode.

 drivers/ptp/ptp_chardev.c             |  1 +
 drivers/ptp/ptp_clock.c               |  3 ++
 drivers/ptp/ptp_clockmatrix.c         | 92 +++++++++++++++++++++++++++++++++++
 drivers/ptp/ptp_clockmatrix.h         |  8 ++-
 include/linux/ptp_clock_kernel.h      |  6 ++-
 include/uapi/linux/ptp_clock.h        |  4 +-
 tools/testing/selftests/ptp/testptp.c |  6 ++-
 7 files changed, 114 insertions(+), 6 deletions(-)

Comments

David Miller May 2, 2020, 11:31 p.m. UTC | #1
From: <vincent.cheng.xh@renesas.com>
Date: Fri, 1 May 2020 23:35:35 -0400

> From: Vincent Cheng <vincent.cheng.xh@renesas.com>
> 
> This series adds adjust phase to the PTP Hardware Clock device interface.
> 
> Some PTP hardware clocks have a write phase mode that has
> a built-in hardware filtering capability.  The write phase mode
> utilizes a phase offset control word instead of a frequency offset 
> control word.  Add adjust phase function to take advantage of this
> capability.
> 
> Changes since v1:
> - As suggested by Richard Cochran:
>   1. ops->adjphase is new so need to check for non-null function pointer.
>   2. Kernel coding style uses lower_case_underscores.
>   3. Use existing PTP clock API for delayed worker.

Series applied.