Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4368dada authored by Shalom Toledo's avatar Shalom Toledo Committed by David S. Miller
Browse files

ptp: ptp_clock: Publish scaled_ppm_to_ppb



Publish scaled_ppm_to_ppb to allow drivers to use it.

Signed-off-by: default avatarShalom Toledo <shalomt@mellanox.com>
Reviewed-by: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1078645a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static void enqueue_external_timestamp(struct timestamp_event_queue *queue,
	spin_unlock_irqrestore(&queue->lock, flags);
}

static s32 scaled_ppm_to_ppb(long ppm)
s32 scaled_ppm_to_ppb(long ppm)
{
	/*
	 * The 'freq' field in the 'struct timex' is in parts per
@@ -82,6 +82,7 @@ static s32 scaled_ppm_to_ppb(long ppm)
	ppb >>= 13;
	return (s32) ppb;
}
EXPORT_SYMBOL(scaled_ppm_to_ppb);

/* posix clock implementation */

+8 −0
Original line number Diff line number Diff line
@@ -212,6 +212,14 @@ extern void ptp_clock_event(struct ptp_clock *ptp,

extern int ptp_clock_index(struct ptp_clock *ptp);

/**
 * scaled_ppm_to_ppb() - convert scaled ppm to ppb
 *
 * @ppm:    Parts per million, but with a 16 bit binary fractional field
 */

extern s32 scaled_ppm_to_ppb(long ppm);

/**
 * ptp_find_pin() - obtain the pin index of a given auxiliary function
 *