On Mon, 26 Jun 2023 at 21:04, 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
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
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 | 8 +++
Extend phc_ctl with a new get_pins_cfg command which calls the
PTP_PIN_GETFUNC ioctl on a PHC clock and prints the pin configuration for
each pin.
Changes since v3:
* remove use of PTP_PIN_SETFUNC2 and PTP_PIN_GETFUNC2 at Erez's request
* avoid converting PTP_PF_NONE in pin_func_string()
* check c
All PHC have a negative clkid, while the variations of the system clock use
positive values. The do_caps() function hard codes a check against
CLOCK_REALTIME to avoid executing the PTP_CLOCK_GETCAPS ioctl on a non-PHC
clock.
Extend this to avoid operating on any system clock, allowing for the
pote
The phc_pin_setfunc() call uses PTP_PIN_SETFUNC2, attempting to hew the
newer PTP_PIN_SETFUNC2 ioctl. This would break on older kernels which lack
this ioctl. However, missing.h then provides a PTP_PIN_SETFUNC2 definition
which re-defines the macro to use the original ioctl PTP_PIN_SETFUNC.
This i
Add a new notification event for pmc clients to receive
PARENT_DATA_SET when a change is made there.
Signed-off-by: Miroslav Lichvar
---
clock.c| 26 +++---
notification.h | 1 +
pmc.c | 10 ++
pmc_common.c | 15 +++
4 files changed, 41