ptp: Add a ptp clock driver for IDT 82P33 SMU.
authorMin Li <min.li.xe@renesas.com>
Fri, 21 Feb 2020 20:03:51 +0000 (15:03 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 21:08:46 +0000 (13:08 -0800)
commit57a10d8c1123068e3cb06434fbc9634f945d3062
tree2f4b588e75fbe98919819558d3004a30e4f30ddc
parent04eed745615244525fb918fa7c0a86e811371536
ptp: Add a ptp clock driver for IDT 82P33 SMU.

The IDT 82P33 Synchronization Management Unit (SMU) family provides
tools to manage timing references, clock sources and
timing paths for IEEE 1588 / Precision Time Protocol (PTP) and
Synchronous Ethernet (SyncE) based clocks. The device supports up
to three independent timing paths that control: PTP clock synthesis;
SyncE clock generation; and general purpose frequency translation.
The device supports physical layer timing with Digital PLLs (DPLLs)
and it supports packet based timing with Digitally Controlled
Oscillators (DCOs). This patch adds support for ptp clock based on
the device.

Changes since v1:
 - As suggested by Richard Cochran:
   1. Replace _mask_bit_count with the existing hweight8
   2. Prefix all functions with idt82p33
   3. Fix white space issues in Kconfig and Makefile
   4. Remove forward declaration
   5. Use adjfine instead of adjfreq for better resolution

 - As suggested by David Miller:
   1. Replace CHAN_INIT macro with a static function
      idt82p33_channel_init
   2. Employ reverse christmas tree ordering for local
      variables
   3. Fix indentation problem by appropriate number of
      TAB then SPACE character

Signed-off-by: Min Li <min.li.xe@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/Kconfig
drivers/ptp/Makefile
drivers/ptp/ptp_idt82p33.c [new file with mode: 0644]
drivers/ptp/ptp_idt82p33.h [new file with mode: 0644]