ptp4l: modify clock_create to take servo as argument
this patch modifies the clock_create to take the servo type as an argument Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>master
parent
d67892abd7
commit
d951ba421f
5
clock.c
5
clock.c
|
@ -398,7 +398,8 @@ UInteger8 clock_class(struct clock *c)
|
|||
}
|
||||
|
||||
struct clock *clock_create(int phc_index, struct interface *iface, int count,
|
||||
enum timestamp_type timestamping, struct defaultDS *ds)
|
||||
enum timestamp_type timestamping, struct defaultDS *ds,
|
||||
enum servo_type servo)
|
||||
{
|
||||
int i, fadj = 0, max_adj, sw_ts = timestamping == TS_SOFTWARE ? 1 : 0;
|
||||
struct clock *c = &the_clock;
|
||||
|
@ -437,7 +438,7 @@ struct clock *clock_create(int phc_index, struct interface *iface, int count,
|
|||
if (c->clkid != CLOCK_INVALID) {
|
||||
fadj = (int) clock_ppb_read(c->clkid);
|
||||
}
|
||||
c->servo = servo_create(CLOCK_SERVO_PI, -fadj, max_adj, sw_ts);
|
||||
c->servo = servo_create(servo, -fadj, max_adj, sw_ts);
|
||||
if (!c->servo) {
|
||||
pr_err("Failed to create clock servo");
|
||||
return NULL;
|
||||
|
|
4
clock.h
4
clock.h
|
@ -66,10 +66,12 @@ UInteger8 clock_class(struct clock *c);
|
|||
* @param count The number of elements in @a interfaces.
|
||||
* @param timestamping The timestamping mode for this clock.
|
||||
* @param ds A pointer to a default data set for the clock.
|
||||
* @param servo The servo that this clock will use.
|
||||
* @return A pointer to the single global clock instance.
|
||||
*/
|
||||
struct clock *clock_create(int phc_index, struct interface *iface, int count,
|
||||
enum timestamp_type timestamping, struct defaultDS *ds);
|
||||
enum timestamp_type timestamping, struct defaultDS *ds,
|
||||
enum servo_type servo);
|
||||
|
||||
/**
|
||||
* Obtains a clock's default data set.
|
||||
|
|
Loading…
Reference in New Issue