Re: [Linuxptp-devel] [PATCH 1/2] phc_ctl: display all capability information

2019-10-14 Thread Keller, Jacob E
> -Original Message-
> From: Richard Cochran 
> Sent: Saturday, October 12, 2019 8:26 PM
> To: Keller, Jacob E 
> Cc: linuxptp-devel@lists.sourceforge.net
> Subject: Re: [Linuxptp-devel] [PATCH 1/2] phc_ctl: display all capability
> information
> 
> On Thu, Sep 26, 2019 at 10:47:21AM -0700, Jacob Keller wrote:
> > @@ -320,12 +320,16 @@ static int do_caps(clockid_t clkid, int cmdc, char
> *cmdv[])
> > "  %d programable alarms\n"
> > "  %d external time stamp channels\n"
> > "  %d programmable periodic signals\n"
> > -   "  %s pulse per second support",
> > +   "  %d configurable input/output pins\n"
> > +   "  %s pulse per second support\n"
> > +   "  %s cross timestamping support\n",
> > caps.max_adj,
> > caps.n_alarm,
> > caps.n_ext_ts,
> > caps.n_per_out,
> > -   caps.pps ? "has" : "doesn't have");
> > +   caps.n_pins,
> > +   caps.pps ? "has" : "doesn't have",
> > +   caps.cross_timestamping ? "has" : "doesn't have");
> 
> On an older kernel:
> 
> Building m68k
> /home/richard/git/linuxptp/phc_ctl.c: In function 'do_caps':
> /home/richard/git/linuxptp/phc_ctl.c:318:2: error: 'struct ptp_clock_caps' 
> has no
> member named 'cross_timestamping'
> make: *** [: phc_ctl.o] Error 1
> 
> Probably the easiest way to handle this is to cast to a local
> structure definition that is up to date...
> 
> Thanks,
> Richard

Ahh, yep. Will look into that. Thanks!

-Jake


___
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel


Re: [Linuxptp-devel] [PATCH 1/2] phc_ctl: display all capability information

2019-10-12 Thread Richard Cochran
On Thu, Sep 26, 2019 at 10:47:21AM -0700, Jacob Keller wrote:
> @@ -320,12 +320,16 @@ static int do_caps(clockid_t clkid, int cmdc, char 
> *cmdv[])
>   "  %d programable alarms\n"
>   "  %d external time stamp channels\n"
>   "  %d programmable periodic signals\n"
> - "  %s pulse per second support",
> + "  %d configurable input/output pins\n"
> + "  %s pulse per second support\n"
> + "  %s cross timestamping support\n",
>   caps.max_adj,
>   caps.n_alarm,
>   caps.n_ext_ts,
>   caps.n_per_out,
> - caps.pps ? "has" : "doesn't have");
> + caps.n_pins,
> + caps.pps ? "has" : "doesn't have",
> + caps.cross_timestamping ? "has" : "doesn't have");

On an older kernel:

Building m68k
/home/richard/git/linuxptp/phc_ctl.c: In function 'do_caps':
/home/richard/git/linuxptp/phc_ctl.c:318:2: error: 'struct ptp_clock_caps' has 
no member named 'cross_timestamping'
make: *** [: phc_ctl.o] Error 1

Probably the easiest way to handle this is to cast to a local
structure definition that is up to date...

Thanks,
Richard


___
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel


[Linuxptp-devel] [PATCH 1/2] phc_ctl: display all capability information

2019-09-26 Thread Jacob Keller
The capability command for phc_ctl does not display the number of pins
or the cross timestamping support. Add this as output so that the user
can see the complete device capabilities.

Signed-off-by: Jacob Keller 
---
 phc_ctl.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/phc_ctl.c b/phc_ctl.c
index e55af593471a..5a01e9d69b0f 100644
--- a/phc_ctl.c
+++ b/phc_ctl.c
@@ -320,12 +320,16 @@ static int do_caps(clockid_t clkid, int cmdc, char 
*cmdv[])
"  %d programable alarms\n"
"  %d external time stamp channels\n"
"  %d programmable periodic signals\n"
-   "  %s pulse per second support",
+   "  %d configurable input/output pins\n"
+   "  %s pulse per second support\n"
+   "  %s cross timestamping support\n",
caps.max_adj,
caps.n_alarm,
caps.n_ext_ts,
caps.n_per_out,
-   caps.pps ? "has" : "doesn't have");
+   caps.n_pins,
+   caps.pps ? "has" : "doesn't have",
+   caps.cross_timestamping ? "has" : "doesn't have");
return 0;
 }
 
-- 
2.23.0.245.gf157bbb9169d



___
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel