net: mscc: ocelot: add support for PTP waveform configuration
authorVladimir Oltean <olteanv@gmail.com>
Thu, 16 Jul 2020 22:45:31 +0000 (01:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jul 2020 02:22:57 +0000 (19:22 -0700)
commitecf9f9b77c637a3d9347a7c85b33964abac989ac
tree6303c3b6958fdc5286c46b9ec3db56c0ab651a68
parentb6bd41363a1ca39282496803cc32f7515ed917fe
net: mscc: ocelot: add support for PTP waveform configuration

For PPS output (perout period is 1.000000000), accept the new "phase"
parameter from the periodic output request structure.

For both PPS and freeform output, accept the new "on" argument for
specifying the duty cycle of the generated signal. Preserve the old
defaults for this "on" time: 1 us for PPS, and half the period for
freeform output.

Also preserve the old behavior that accepted the "phase" via the "start"
argument.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_ptp.c