lkml.org 
[lkml]   [2020]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 10/11] net: dsa: microchip: ksz9477: add Pulse Per Second (PPS) support
On Thu, Nov 12, 2020 at 04:35:36PM +0100, Christian Eggers wrote:
> static int ksz9477_ptp_enable(struct ptp_clock_info *ptp, struct ptp_clock_request *req, int on)
> {
> - return -ENOTTY;
> + struct ksz_device *dev = container_of(ptp, struct ksz_device, ptp_caps);
> + int ret;
> +
> + switch (req->type) {
> + case PTP_CLK_REQ_PPS:
> + mutex_lock(&dev->ptp_mutex);
> + ret = ksz9477_ptp_enable_pps(dev, on);
> + mutex_unlock(&dev->ptp_mutex);
> + return ret;
> + default:
> + return -EINVAL;
> + }
> +
> + return 0;
> }

Richard, do you think we can clarify the intended usage of PTP_CLK_REQ_PPS
in the documentation? It doesn't appear to be written anywhere that
PTP_ENABLE_PPS is supposed to enable event generation for the drivers/pps
subsystem. You would sort of have to know before you could find out...

\
 
 \ /
  Last update: 2020-11-13 03:53    [W:1.557 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site