lkml.org 
[lkml]   [2019]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] PTP: add support for one-shot output
On Fri, Aug 30, 2019 at 11:00:20AM +0300, Felipe Balbi wrote:
> seems like this should be defined together with the other flags? If
> that's the case, it seems like we would EXTTS and PEROUT masks.

Yes, let's make the meanings of the bit fields clear...

--- ptp_clock.h ---

/*
* Bits of the ptp_extts_request.flags field:
*/
#define PTP_ENABLE_FEATURE BIT(0)
#define PTP_RISING_EDGE BIT(1)
#define PTP_FALLING_EDGE BIT(2)
#define PTP_EXTTS_VALID_FLAGS (PTP_ENABLE_FEATURE | \
PTP_RISING_EDGE | \
PTP_FALLING_EDGE)

/*
* Bits of the ptp_perout_request.flags field:
*/
#define PTP_PEROUT_ONE_SHOT BIT(0)
#define PTP_PEROUT_VALID_FLAGS (PTP_PEROUT_ONE_SHOT)

struct ptp_extts_request {
unsigned int flags; /* Bit field of PTP_EXTTS_VALID_FLAGS. */
};

struct ptp_perout_request {
unsigned int flags; /* Bit field of PTP_PEROUT_VALID_FLAGS. */
};


Thanks,
Richard

\
 
 \ /
  Last update: 2019-08-31 17:03    [W:0.250 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site