[PATCH next v2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-04-14 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH next v2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-04-08 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next v3 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-04-07 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH net-next v3 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-04-07 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-04-07 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH net-next v2 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-04-07 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next v2 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-04-07 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-04-07 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH next 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-04-03 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH next 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-04-03 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH next 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-04-03 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH next 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-29 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH next 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-26 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH next 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-03-26 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH next 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-03-23 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH next 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-23 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH mfd v1] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-20 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH mfd v1] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-17 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH char-misc v1] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-03-17 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH net-next v1] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-03-17 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH net-next v1] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-03-17 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

[PATCH net-next v2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-14 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next v2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-13 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next v1] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-13 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-13 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[PATCH net-next v2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-11 Thread min.li.xe
From: Min Li This driver supports 1588 related functions of ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The driver is developed to be only used by Renesas PTP Clock Manager for Linux (pcm4l) software. It supports 1588/PTP releated functionalities that specific

[PATCH net-next] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-02-10 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. Currently only I2C access is supported and SPI would be added later on. This mfd driver will export 2 devices to be used by rsmu_cdev and the corresponding phc drivers, respectively.

[PATCH net-next] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-02-10 Thread min.li.xe
From: Min Li This driver supports 1588 related functions of ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The supported functons are: - set combomode - get dpll's state - get dpll's ffo Please note that this driver needs to work with rsmu mfd driver to access SMU

[PATCH net-next 2/4] ptp: clockmatrix: remove 5 second delay before entering write phase mode

2020-12-08 Thread min.li.xe
From: Min Li Remove write phase mode 5 second setup delay, not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 22 -- drivers/ptp/ptp_clockmatrix.h | 1 - 2 files changed, 23 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c

[PATCH net-next 4/4] ptp: clockmatrix: deprecate firmware older than 4.8.7

2020-12-08 Thread min.li.xe
From: Min Li Add deprecated flag to indicate < v4.8.7. Fix idtcm_enable_tod() call correct settime(). Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 69 --- drivers/ptp/ptp_clockmatrix.h | 11 +++ 2 files changed, 45 insertions(+), 35

[PATCH net-next 1/4] ptp: clockmatrix: reset device and check BOOT_STATUS

2020-12-08 Thread min.li.xe
From: Min Li SM_RESET device only when loading full configuration and check for BOOT_STATUS. Also remove polling for write trigger done in _idtcm_settime(). Changes since v1: -Correct warnings from strict checkpatch Signed-off-by: Min Li --- drivers/ptp/idt8a340_reg.h| 1 +

[PATCH net-next 3/4] ptp: clockmatrix: Fix non-zero phase_adj is lost after snap

2020-12-08 Thread min.li.xe
From: Min Li Fix non-zero phase_adj is lost after snap. Use ktime_sub to do ktime_t subtraction. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 109 ++ drivers/ptp/ptp_clockmatrix.h | 5 +- 2 files changed, 90 insertions(+), 24 deletions(-)

[PATCH net-next 1/4] ptp: clockmatrix: reset device and check BOOT_STATUS

2020-12-03 Thread min.li.xe
From: Min Li SM_RESET device only when loading full configuration and check for BOOT_STATUS. Also remove polling for write trigger done in _idtcm_settime(). Signed-off-by: Min Li --- drivers/ptp/idt8a340_reg.h| 1 + drivers/ptp/ptp_clockmatrix.c | 152

[PATCH net-next 4/4] ptp: clockmatrix: deprecate firmware older than 4.8.7

2020-12-03 Thread min.li.xe
From: Min Li Add deprecated flag to indicate < v4.8.7. Fix idtcm_enable_tod() call correct settime(). Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 69 --- drivers/ptp/ptp_clockmatrix.h | 11 +++ 2 files changed, 45 insertions(+), 35

[PATCH net-next 2/4] ptp: clockmatrix: remove 5 second delay before entering write phase mode

2020-12-03 Thread min.li.xe
From: Min Li Remove write phase mode 5 second setup delay, not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 22 -- drivers/ptp/ptp_clockmatrix.h | 1 - 2 files changed, 23 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c

[PATCH net-next 3/4] ptp: clockmatrix: Fix non-zero phase_adj is lost after snap

2020-12-03 Thread min.li.xe
From: Min Li Fix non-zero phase_adj is lost after snap. Use ktime_sub to do ktime_t subtraction. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 109 ++ drivers/ptp/ptp_clockmatrix.h | 5 +- 2 files changed, 90 insertions(+), 24 deletions(-)

[PATCH v3 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-24 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Changes since v1: -Use sscanf to get rid of adhoc string parse. Changes since v2: -Check if sscanf returns 3. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 49 ++- 1 file changed, 16

[PATCH v2 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-24 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Changes since v1: -Use sscanf to get rid of adhoc string parse. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 53 +++ 1 file changed, 18 insertions(+), 35 deletions(-) diff --git

[PATCH v2 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-23 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Changes since v1: -Use strscpy instead of strncpy for safety. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 60 ++- tools/bpf/example | 12 + tools/bpf/novlan

[PATCH v2 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-18 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Changes since v1: -Only strcpy 15 characters to leave 1 space for '\0' Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 52 +++ 1 file changed, 38 insertions(+), 14 deletions(-) diff

[PATCH v2 net-next 3/5] ptp: clockmatrix: remove 5 second delay before entering write phase mode

2020-11-17 Thread min.li.xe
From: Min Li Remove write phase mode 5 second setup delay, not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 22 -- drivers/ptp/ptp_clockmatrix.h | 1 - 2 files changed, 23 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c

[PATCH v2 net-next 4/5] ptp: clockmatrix: Fix non-zero phase_adj is lost after snap

2020-11-17 Thread min.li.xe
From: Min Li Fix non-zero phase_adj is lost after snap. Use ktime_sub to do ktime_t subtraction. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 210 +- drivers/ptp/ptp_clockmatrix.h | 5 +- 2 files changed, 190 insertions(+), 25

[PATCH v2 net-next 0/5] ptp_clockmatrix bug fix and improvement

2020-11-17 Thread min.li.xe
From: Min Li This patch series is aiming at submitting the latest bug fixes and code improvements of PHC driver for Renesas CLOCKMATRIX timing card. The code has been thouroughly tested in both customer labs and Renesas internal lab using the latest linuxptp program on Xilinx ZCU102 platform.

[PATCH v2 net-next 5/5] ptp: clockmatrix: deprecate firmware older than 4.8.7

2020-11-17 Thread min.li.xe
From: Min Li Add deprecated flag to indicate < v4.8.7. Fix idtcm_enable_tod() call correct settime(). Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 69 --- drivers/ptp/ptp_clockmatrix.h | 11 +++ 2 files changed, 45 insertions(+), 35

[PATCH v2 net-next 1/5] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-17 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Changes since v1: -Only strcpy 15 characters to leave 1 space for '\0' Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 52 +++ 1 file changed, 38 insertions(+), 14 deletions(-) diff

[PATCH v2 net-next 2/5] ptp: clockmatrix: reset device and check BOOT_STATUS

2020-11-17 Thread min.li.xe
From: Min Li SM_RESET device only when loading full configuration and check for BOOT_STATUS. Also remove polling for write trigger done in _idtcm_settime(). Signed-off-by: Min Li --- drivers/ptp/idt8a340_reg.h| 1 + drivers/ptp/ptp_clockmatrix.c | 152

[PATCH net-next 2/5] ptp: clockmatrix: reset device and check BOOT_STATUS

2020-11-16 Thread min.li.xe
From: Min Li SM_RESET device only when loading full configuration and check for BOOT_STATUS. Also remove polling for write trigger done in _idtcm_settime(). Signed-off-by: Min Li --- drivers/ptp/idt8a340_reg.h| 1 + drivers/ptp/ptp_clockmatrix.c | 152

[PATCH net-next 3/5] ptp: clockmatrix: remove 5 second delay before entering write phase mode

2020-11-16 Thread min.li.xe
From: Min Li Remove write phase mode 5 second setup delay, not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 22 -- drivers/ptp/ptp_clockmatrix.h | 1 - 2 files changed, 23 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c

[PATCH net-next 4/5] ptp: clockmatrix: Fix non-zero phase_adj is lost after snap

2020-11-16 Thread min.li.xe
From: Min Li Fix non-zero phase_adj is lost after snap. Use ktime_sub to do ktime_t subtraction. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 210 +- drivers/ptp/ptp_clockmatrix.h | 5 +- 2 files changed, 190 insertions(+), 25

[PATCH net-next 5/5] ptp: clockmatrix: deprecate firmware older than 4.8.7

2020-11-16 Thread min.li.xe
From: Min Li Add deprecated flag to indicate < v4.8.7. Fix idtcm_enable_tod() call correct settime(). Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 69 --- drivers/ptp/ptp_clockmatrix.h | 11 +++ 2 files changed, 45 insertions(+), 35

[PATCH net-next 1/5] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-16 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 52 +++ 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index

[PATCH v4 net-next 1/3] ptp: idt82p33: add adjphase support

2020-11-05 Thread min.li.xe
From: Min Li Add idt82p33_adjphase() to support PHC write phase mode. Changes since v1: -Fix broken build Changes since v2: -Fix trailing space Changes since v3: -Improvements suggested by Jakub Signed-off-by: Min Li Acked-by: Richard Cochran --- drivers/ptp/ptp_idt82p33.c | 217

[PATCH v4 net-next 3/3] ptp: idt82p33: optimize _idt82p33_adjfine

2020-11-05 Thread min.li.xe
From: Min Li Use div_s64 so that the neg_adj is not needed. Signed-off-by: Min Li Acked-by: Richard Cochran --- drivers/ptp/ptp_idt82p33.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_idt82p33.c b/drivers/ptp/ptp_idt82p33.c index

[PATCH v4 net-next 2/3] ptp: idt82p33: use i2c_master_send for bus write

2020-11-05 Thread min.li.xe
From: Min Li Refactor idt82p33_xfer and use i2c_master_send for write operation. Because some I2C controllers are only working with single-burst write transaction. Changes since v1: - Fix broken build. Signed-off-by: Min Li Acked-by: Richard Cochran --- drivers/ptp/ptp_idt82p33.c | 47

[PATCH v3 net-next 3/3] ptp: idt82p33: optimize _idt82p33_adjfine

2020-11-04 Thread min.li.xe
From: Min Li Use div_s64 so that the neg_adj is not needed. Signed-off-by: Min Li Acked-by: Richard Cochran --- drivers/ptp/ptp_idt82p33.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_idt82p33.c b/drivers/ptp/ptp_idt82p33.c index

[PATCH v3 net-next 1/3] ptp: idt82p33: add adjphase support

2020-11-04 Thread min.li.xe
From: Min Li Add idt82p33_adjphase() to support PHC write phase mode. Changes since v1: -Fix broken build Changes since v2: -Fix trailing space Signed-off-by: Min Li Acked-by: Richard Cochran --- drivers/ptp/ptp_idt82p33.c | 222 -

[PATCH v3 net-next 2/3] ptp: idt82p33: use i2c_master_send for bus write

2020-11-04 Thread min.li.xe
From: Min Li Refactor idt82p33_xfer and use i2c_master_send for write operation. Because some I2C controllers are only working with single-burst write transaction. Changes since v1: - Fix broken build. Signed-off-by: Min Li Acked-by: Richard Cochran --- drivers/ptp/ptp_idt82p33.c | 50

[PATCH v2 net-next 3/3] ptp: idt82p33: optimize _idt82p33_adjfine

2020-11-04 Thread min.li.xe
From: Min Li Use div_s64 so that the neg_adj is not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_idt82p33.c b/drivers/ptp/ptp_idt82p33.c index b1528a0..e970379d 100644 ---

[PATCH v2 net-next 1/3] ptp: idt82p33: add adjphase support

2020-11-04 Thread min.li.xe
From: Min Li Add idt82p33_adjphase() to support PHC write phase mode. Changes since v1: -Fix broken build Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 224 - drivers/ptp/ptp_idt82p33.h | 2 + 2 files changed, 163 insertions(+), 63

[PATCH v2 net-next 2/3] ptp: idt82p33: use i2c_master_send for bus write

2020-11-04 Thread min.li.xe
From: Min Li Refactor idt82p33_xfer and use i2c_master_send for write operation. Because some I2C controllers are only working with single-burst write transaction. Changes since v1: - Fix broken build. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 52

[PATCH net-next 3/3] ptp: idt82p33: optimize _idt82p33_adjfine

2020-11-04 Thread min.li.xe
From: Min Li Use div_s64 so that the neg_adj is not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_idt82p33.c b/drivers/ptp/ptp_idt82p33.c index b1528a0..e970379d 100644 ---

[PATCH net-next 1/3] ptp: idt82p33: add adjphase support

2020-11-04 Thread min.li.xe
From: Min Li Add idt82p33_adjphase() to support PHC write phase mode. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 226 - drivers/ptp/ptp_idt82p33.h | 2 + 2 files changed, 164 insertions(+), 64 deletions(-) diff --git

[PATCH net-next 2/3] ptp: idt82p33: use i2c_master_send for bus write

2020-11-04 Thread min.li.xe
From: Min Li Refactor idt82p33_xfer and use i2c_master_send for write operation. Because some I2C controllers are only working with single-burst write transaction. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 52 +-

[PATCH v2 net 1/1] ptp: idt82p33: add adjphase support

2020-11-02 Thread min.li.xe
From: Min Li Add idt82p33_adjwritephase() to support PHC write phase mode. Changes since v1: - Fix broken build on 32 bit machine due to 64 bit division. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 317 ++--- drivers/ptp/ptp_idt82p33.h | 3

[PATCH net 1/1] ptp: idt82p33: add adjphase support

2020-10-30 Thread min.li.xe
From: Min Li Add idt82p33_adjwritephase() to support PHC write phase mode. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 307 +++-- drivers/ptp/ptp_idt82p33.h | 3 + 2 files changed, 243 insertions(+), 67 deletions(-) diff --git

[PATCH v2 net] ptp: ptp_clockmatrix: use i2c_master_send for i2c write

2020-08-18 Thread min.li.xe
From: Min Li The old code for i2c write would break on some controllers, which fails at handling Repeated Start Condition. So we will just use i2c_master_send to handle write in one transanction. Changes since v1: - Remove indentation change Signed-off-by: Min Li ---

[PATCH net] ptp: ptp_clockmatrix: use i2c_master_send for i2c write

2020-08-17 Thread min.li.xe
From: Min Li The old code for i2c write would break on some controllers, which fails at handling Repeated Start Condition. So we will just use i2c_master_send to handle write in one transanction. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 56

[PATCH net 1/4] ptp: ptp_idt82p33: update to support adjphase

2020-08-07 Thread min.li.xe
From: Min Li Add adjphase support for idt82p33xxx synchronization management unit. Also fix n_per_out to the actual number of outputs. Changes since v1: - Break into small changes Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 48 +- 1 file

[PATCH net 4/4] ptp: ptp_idt82p33: support individually configure output by index

2020-08-07 Thread min.li.xe
From: Min Li Enable/disable individual output by index instead of by output_mask Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 62 ++ drivers/ptp/ptp_idt82p33.h | 2 ++ 2 files changed, 48 insertions(+), 16 deletions(-) diff --git

[PATCH net 2/4] ptp: ptp_idt82p33: add more debug logs

2020-08-07 Thread min.li.xe
From: Min Li Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 88 +- 1 file changed, 79 insertions(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_idt82p33.c b/drivers/ptp/ptp_idt82p33.c index bd1fbcd..189bb81 100644 ---

[PATCH net 3/4] ptp: ptp_idt82p33: use do_aux_work for delay work

2020-08-07 Thread min.li.xe
From: Min Li Instead of declaring its own delay_work, use ptp_clock provided do_aux_work to configure sync_tod. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 24 drivers/ptp/ptp_idt82p33.h | 2 -- 2 files changed, 12 insertions(+), 14 deletions(-) diff

[PATCH net] ptp: ptp_idt82p33: update to support adjphase

2020-08-04 Thread min.li.xe
From: Min Li This update includes adjphase support, more debug logs, firmware name parameter, correct PTP_CLK_REQ_PEROUT support and use do_aux_work to do delay work. Signed-off-by: Min Li --- drivers/ptp/ptp_idt82p33.c | 233 +

[PATCH net] ptp: ptp_clockmatrix: update to support 4.8.7 firmware

2020-07-28 Thread min.li.xe
From: Min Li With 4.8.7 firmware, adjtime can change delta instead of absolute time, which greately increases snap accuracy. PPS alignment doesn't have to be set for every single TOD change. Other minor changes includes: adding more debug logs, increasing snap accuracy for pre 4.8.7 firmware and

[PATCH net 1/1] docs: ptp.rst: add support for Renesas (IDT) ClockMatrix

2020-07-14 Thread min.li.xe
From: Min Li Add below to “Ancillary clock features” section - Low Pass Filter (LPF) access from user space Add below to list of “Supported hardware” section + Renesas (IDT) ClockMatrix™ Signed-off-by: Min Li --- Documentation/driver-api/ptp.rst | 12 1 file changed, 12

[PATCH net-next] ptp: add debugfs support for IDT family of timing devices

2020-07-10 Thread min.li.xe
From: Min Li This patch is to add debugfs support for ptp_clockmatrix and ptp_idt82p33. It will create a debugfs directory called idtptp{x} and x is the ptp index. Three inerfaces are present, which are cmd, help and regs. help is read only and will display a brief help message. regs is read