Re: [Linuxptp-devel] [PATCH v3 3/3] phc_ctl: add get_pins_cfg command to display pin functions

2023-06-23 Thread Jacob Keller
On 6/23/2023 2:08 AM, Erez wrote: > On Fri, 23 Jun 2023 at 09:07, Jacob Keller wrote: > >> Add a new function to phc_ctl to display the devices pin configuration >> data. First, obtain the device capabilities to determine the number of >> pins. Then, for each pin, print the name, function, and

Re: [Linuxptp-devel] [PATCH v3 1/3] phc: dynamically try PTP_PIN_SETFUNC2 and fallback to PTP_PIN_SETFUNC

2023-06-23 Thread Jacob Keller
On 6/23/2023 1:44 AM, Erez wrote: > On Fri, 23 Jun 2023 at 09:07, Jacob Keller wrote: > >> The phc library currently selects whether to use PTP_PIN_SETFUNC2 over >> PTP_PIN_SETFUNC based on whether the kernel headers it is compiled against >> have the PTP_PIN_SETFUNC2 defined. >> >> This means

Re: [Linuxptp-devel] [PATCH v3 3/3] phc_ctl: add get_pins_cfg command to display pin functions

2023-06-23 Thread Erez
On Fri, 23 Jun 2023 at 09:07, Jacob Keller wrote: > Add a new function to phc_ctl to display the devices pin configuration > data. First, obtain the device capabilities to determine the number of > pins. Then, for each pin, print the name, function, and channel > information. > > Signed-off-by: J

Re: [Linuxptp-devel] [PATCH v3 1/3] phc: dynamically try PTP_PIN_SETFUNC2 and fallback to PTP_PIN_SETFUNC

2023-06-23 Thread Erez
On Fri, 23 Jun 2023 at 09:07, Jacob Keller wrote: > The phc library currently selects whether to use PTP_PIN_SETFUNC2 over > PTP_PIN_SETFUNC based on whether the kernel headers it is compiled against > have the PTP_PIN_SETFUNC2 defined. > > This means that the use of PTP_PIN_SETFUNC vs PTP_PIN_SE

[Linuxptp-devel] [PATCH v3 1/3] phc: dynamically try PTP_PIN_SETFUNC2 and fallback to PTP_PIN_SETFUNC

2023-06-23 Thread Jacob Keller
The phc library currently selects whether to use PTP_PIN_SETFUNC2 over PTP_PIN_SETFUNC based on whether the kernel headers it is compiled against have the PTP_PIN_SETFUNC2 defined. This means that the use of PTP_PIN_SETFUNC vs PTP_PIN_SETFUNC2 depends on whether the headers we compiled against hav

[Linuxptp-devel] [PATCH v3 2/3] phc_ctl: use phc_get_caps instead of direct ioctl invocation

2023-06-23 Thread Jacob Keller
The phc.c file already has phc_get_caps to obtain the capabilities for a PHC clock. Expose this and use it in phc_ctl.c instead of re-implementing it. Signed-off-by: Jacob Keller --- phc.c | 4 +--- phc.h | 11 +++ phc_ctl.c | 3 +-- 3 files changed, 13 insertions(+), 5 deletio

[Linuxptp-devel] [PATCH v3 0/3] add get_pins_cfg command to display pin functions

2023-06-23 Thread Jacob Keller
Modify the phc_ctl utility to add a helpful get_pins_cfg command to display the current pin configuration. This is a follow up of a previous v2 I sent a long time ago at [1], but includes a couple of additional cleanups. First, I modified phc.c to dynamically check and use PTP_PIN_SETFUNC2 if avai

[Linuxptp-devel] [PATCH v3 3/3] phc_ctl: add get_pins_cfg command to display pin functions

2023-06-23 Thread Jacob Keller
Add a new function to phc_ctl to display the devices pin configuration data. First, obtain the device capabilities to determine the number of pins. Then, for each pin, print the name, function, and channel information. Signed-off-by: Jacob Keller --- missing.h | 5 + phc.c | 10