Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Thu, Nov 12, 2015 at 02:37:53PM -0600, Bassam Alsanie wrote: > I will be going over the PHC APIs and some of the kernel PHC modules to get > deeper understand. > Just to let you know why my questions seem little bit weird. I am working > on developing a user mode framework for to accessing the h

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Keller, Jacob E
On Thu, 2015-11-12 at 14:37 -0600, Bassam Alsanie wrote: I will be going over the PHC APIs and some of the kernel PHC modules to get deeper understand. Just to let you know why my questions seem little bit weird. I am working on developing a user mode framework for to accessing the hardware (for

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Bassam Alsanie
On Thu, Nov 12, 2015 at 11:16 AM, Richard Cochran wrote: > On Thu, Nov 12, 2015 at 10:15:04AM -0600, Bassam Alsanie wrote: > > and my custom clock I can compute the frequency shift as the following: > > > > __u16 fraction = ((__u64) tx.freq & 0x); > > __u16 integer = (__u64) tx.f

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Thu, Nov 12, 2015 at 10:15:04AM -0600, Bassam Alsanie wrote: > and my custom clock I can compute the frequency shift as the following: > > __u16 fraction = ((__u64) tx.freq & 0x); > __u16 integer = (__u64) tx.freq >> 16; > __u64 requestedPpb = (integer * 1000) + fraction; > >

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Bassam Alsanie
On Thu, Nov 12, 2015 at 2:08 AM, Richard Cochran wrote: > On Wed, Nov 11, 2015 at 02:37:28PM -0600, Bassam Alsanie wrote: > > I need to make my homework first. > > After looking into the function adjtimes things made more sense to me. > > The missing piece in my understand for now that the timex.

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Wed, Nov 11, 2015 at 02:37:28PM -0600, Bassam Alsanie wrote: > I need to make my homework first. > After looking into the function adjtimes things made more sense to me. > The missing piece in my understand for now that the timex.freq unit is in > ppm and its long, so no fractions for the ppb.