[PATCH v3 net-next 6/7] ptp: ptp_clockmatrix: Simplify code - remove unnecessary `err` variable.

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng Code clean-up. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index 241bff0..dc42c36 100644 ---

[PATCH v3 net-next 0/7] ptp: ptp_clockmatrix: Fix output 1 PPS alignment.

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng This series fixes a race condition that may result in the output clock not aligned to internal 1 PPS clock. Part of device initialization is to align the rising edge of output clocks to the internal rising edge of the 1 PPS clock. If the system APLL and DPLL are not locked

[PATCH v3 net-next 2/7] ptp: ptp_clockmatrix: Add alignment of 1 PPS to idtcm_perout_enable.

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng When enabling output using PTP_CLK_REQ_PEROUT, need to align the output clock to the internal 1 PPS clock. Signed-off-by: Vincent Cheng Acked-by: Richard Cochran --- drivers/ptp/ptp_clockmatrix.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-)

[PATCH v3 net-next 4/7] ptp: ptp_clockmatrix: Clean-up dev_*() messages.

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng Code clean-up. * Remove unnecessary \n termination from dev_*() messages. * Remove 'char *fmt' to define strings to stay within 80 column limit. Not needed since coding guidelines increased to 100 columns limit. Keeping format in place allows static code checkers to

[PATCH v3 net-next 5/7] ptp: ptp_clockmatrix: Coding style - tighten vertical spacing.

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng Code clean-up. * Remove blank line between variable declarations. * Remove blank line between: err = blah(...) if (err) ... * Remove unnecessary blank line before/after loop constructs. Signed-off-by: Vincent Cheng ---

[PATCH v3 net-next 1/7] ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng Part of the device initialization aligns the rising edge of the output clock to the internal 1 PPS clock. If the system APLL and DPLL is not locked, then the alignment will fail and there will be a fixed offset between the internal 1 PPS clock and the output clock. After

[PATCH v3 net-next 3/7] ptp: ptp_clockmatrix: Remove unused header declarations.

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng Removed unused header declarations. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.h b/drivers/ptp/ptp_clockmatrix.h index 0233236..fb32327 100644 ---

[PATCH v3 net-next 7/7] ptp: ptp_clockmatrix: clean-up - parenthesis around a == b are unnecessary

2021-02-16 Thread vincent.cheng.xh
From: Vincent Cheng Code clean-up. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index dc42c36..75463c2 100644 ---

[PATCH v2 net-next 3/3] ptp: ptp_clockmatrix: Remove unused header declarations.

2021-02-12 Thread vincent.cheng.xh
From: Vincent Cheng Removed unused header declarations. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.h b/drivers/ptp/ptp_clockmatrix.h index 0233236..fb32327 100644 ---

[PATCH v2 net-next 1/3] ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.

2021-02-12 Thread vincent.cheng.xh
From: Vincent Cheng Part of the device initialization aligns the rising edge of the output clock to the internal 1 PPS clock. If the system APLL and DPLL is not locked, then the alignment will fail and there will be a fixed offset between the internal 1 PPS clock and the output clock. After

[PATCH v2 net-next 0/3] ptp: ptp_clockmatrix: Fix output 1 PPS alignment.

2021-02-12 Thread vincent.cheng.xh
From: Vincent Cheng This series fixes a race condition that may result in the output clock not aligned to internal 1 PPS clock. Part of device initialization is to align the rising edge of output clocks to the internal rising edge of the 1 PPS clock. If the system APLL and DPLL are not locked

[PATCH v2 net-next 2/3] ptp: ptp_clockmatrix: Add alignment of 1 PPS to idtcm_perout_enable.

2021-02-12 Thread vincent.cheng.xh
From: Vincent Cheng When enabling output using PTP_CLK_REQ_PEROUT, need to align the output clock to the internal 1 PPS clock. Signed-off-by: Vincent Cheng Acked-by: Richard Cochran --- drivers/ptp/ptp_clockmatrix.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-)

[PATCH net-next 1/2] ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.

2021-02-11 Thread vincent.cheng.xh
From: Vincent Cheng Part of the device initialization aligns the rising edge of the output clock to the internal 1 PPS clock. If the system APLL and DPLL is not locked, then the alignment will fail and there will be a fixed offset between the internal 1 PPS clock and the output clock. After

[PATCH net-next 2/2] ptp: ptp_clockmatrix: Add alignment of 1 PPS to idtcm_perout_enable.

2021-02-11 Thread vincent.cheng.xh
From: Vincent Cheng When enabling output using PTP_CLK_REQ_PEROUT, need to align the output clock to the internal 1 PPS clock. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH net-next 0/2] ptp: ptp_clockmatrix: Fix output 1 PPS alignment.

2021-02-11 Thread vincent.cheng.xh
From: Vincent Cheng This series fixes a race condition that may result in the output clock not aligned to internal 1 PPS clock. Part of device initialization is to align the rising edge of output clocks to the internal rising edge of the 1 PPS clock. If the system APLL and DPLL are not locked

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

2020-05-01 Thread vincent.cheng.xh
From: Vincent Cheng 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

[PATCH v2 net-next 1/3] ptp: Add adjphase function to support phase offset control.

2020-05-01 Thread vincent.cheng.xh
From: Vincent Cheng Adds adjust phase function to take advantage of a PHC clock's hardware filtering capability that uses phase offset control word instead of frequency offset control word. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clock.c | 3 +++

[PATCH v2 net-next 2/3] ptp: Add adjust_phase to ptp_clock_caps capability.

2020-05-01 Thread vincent.cheng.xh
From: Vincent Cheng Add adjust_phase to ptp_clock_caps capability to allow user to query if a PHC driver supports adjust phase with ioctl PTP_CLOCK_GETCAPS command. Signed-off-by: Vincent Cheng Reviewed-by: Richard Cochran --- drivers/ptp/ptp_chardev.c | 1 +

[PATCH v2 net-next 3/3] ptp: ptp_clockmatrix: Add adjphase() to support PHC write phase mode.

2020-05-01 Thread vincent.cheng.xh
From: Vincent Cheng Add idtcm_adjphase() to support PHC write phase mode. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.c | 92 +++ drivers/ptp/ptp_clockmatrix.h | 8 +++- 2 files changed, 98 insertions(+), 2 deletions(-) diff --git

[PATCH net-next 3/3] ptp: ptp_clockmatrix: Add adjphase() to support PHC write phase mode.

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng Add idtcm_adjphase() to support PHC write phase mode. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clockmatrix.c | 123 ++ drivers/ptp/ptp_clockmatrix.h | 11 +++- 2 files changed, 132 insertions(+), 2 deletions(-) diff --git

[PATCH net-next 1/3] ptp: Add adjphase function to support phase offset control.

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng Adds adjust phase function to take advantage of a PHC clock's hardware filtering capability that uses phase offset control word instead of frequency offset control word. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_clock.c | 2 ++

[PATCH net-next 2/3] ptp: Add adjust_phase to ptp_clock_caps capability.

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng Add adjust_phase to ptp_clock_caps capability to allow user to query if a PHC driver supports adjust phase with ioctl PTP_CLOCK_GETCAPS command. Signed-off-by: Vincent Cheng --- drivers/ptp/ptp_chardev.c | 1 + include/uapi/linux/ptp_clock.h| 4 +++-

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

2020-04-29 Thread vincent.cheng.xh
From: Vincent Cheng 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