From: Vincent Cheng
The logic for the Automotive Profile added a message interval update
mechanism that triggers whenever the servo enters the "stable locked"
state. This SERVO_LOCKED_STABLE state is active when the
configuration option servo_offset_threshold is non-zero and
servo_offset_thresho
Recently the Linux kernel's PTP Hardware Clock interface was expanded
to include a "write phase" mode where the clock servo in implemented
in hardware. This mode hearkens back to the tradition ntp_adjtime
interface, passing a measured offset into the kernel's servo.
This patch adds a new configur
Signed-off-by: Richard Cochran
---
pmc.c| 5 +
pmc_common.c | 22 ++
2 files changed, 27 insertions(+)
diff --git a/pmc.c b/pmc.c
index f074621..490c140 100644
--- a/pmc.c
+++ b/pmc.c
@@ -305,6 +305,11 @@ static void pmc_show(struct ptp_message *msg, FILE *fp)
IEEE 1588 v2.1 and ITU G.8275.1/2 call for an optional "synchronization
uncertain" flag passed in Announce messages along with the other flags
from the time properties data set. The value of the flag depends is a
logical OR function of the inputs from the remote master and the local
process. This
When using the "free running" option, a slaved port remains in the
UNCALIBRATED state. If the actual servo resides in and external program,
for example when following the 802.1AS recommendations, that program can
signal the synchronization state using the "synchronization uncertain"
management mes
The transport layer's functional interface foresees having error codes
percolate back up to the caller. However, up until now, the udp module
simply returned -1 for any error. This patch lets the code return the
specific error instead.
Signed-off-by: Richard Cochran
---
udp.c | 2 +-
1 file ch
Code in other modules will need this special port ID value. This patch
makes it available through the port header file.
Signed-off-by: Richard Cochran
---
port.h | 3 +++
port_signaling.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/port.h b/port.h
index e3
The transport layer's functional interface foresees having error codes
percolate back up to the caller. However, up until now, the uds module
simply returned -1 for any error. This patch lets the code return the
specific error instead. In addition, it removes the gratuitous printing
of the error
The port_forward_to() method clobbers the specific error code returned
by the transport layer with -1. This patch lets the code preserve the
specific error in question.
Signed-off-by: Richard Cochran
---
port.c | 6 --
port.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --
The transport layer's functional interface foresees having error codes
percolate back up to the caller. However, up until now, the udp6 module
simply returned -1 for any error. This patch lets the code return the
specific error instead.
Signed-off-by: Richard Cochran
---
udp6.c | 2 +-
1 file
The IEEE 1588v2.1 standard introduces a new optional feature called
slave event monitoring. While implementing that, I found a number of
small issues that wanted cleaning up. This series presents patches
addressing them.
Richard Cochran (11):
transport: Correct grammar in the doxygen comments.
Signed-off-by: Richard Cochran
---
transport.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/transport.h b/transport.h
index 5b8c413..7a7f87b 100644
--- a/transport.h
+++ b/transport.h
@@ -70,7 +70,7 @@ int transport_recv(struct transport *t, int fd, struct
ptp_messag
The current code truncates the size of path trace TLVs which exceed the
expected maximum based on the largest possible message size. However if
another TLV follows, then a gap would appear, that is, an area in the
message buffer not pointed to by any TLV descriptor. In order to avoid
forwarding s
The transport layer's functional interface foresees having error codes
percolate back up to the caller. However, up until now, the sk module
simply returned -1 for any error. This patch lets the code return the
specific error instead.
Signed-off-by: Richard Cochran
---
sk.c | 14 +++---
The transport layer's functional interface foresees having error codes
percolate back up to the caller. However, up until now, the raw module
simply returned -1 for any error. This patch lets the code return the
specific error instead. In addition, it removes the gratuitous printing
of the error
Signed-off-by: Richard Cochran
---
port.h | 3 +++
port_signaling.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/port.h b/port.h
index 80c543e..0b07d55 100644
--- a/port.h
+++ b/port.h
@@ -210,6 +210,9 @@ struct port *port_open(const char *phc_device,
The utility function to compare port IDs takes pointers, but it only needs
to read the referenced data. This patch marks the parameters as const,
allowing passing constants in the future.
Signed-off-by: Richard Cochran
---
util.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --g
On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote:
> phc2pwm.c | 233 ++
> 2 files changed, 237 insertions(+), 2 deletions(-)
> create mode 100644 phc2pwm.c
I wanted to try this today. There are some issues:
/home/richard/git/linux
Hi Richard,
On 16/05/20 10:24 PM, Richard Cochran wrote:
> On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote:
>> phc2pwm.c | 233 ++
>> 2 files changed, 237 insertions(+), 2 deletions(-)
>> create mode 100644 phc2pwm.c
>
> I wanted
On Sat, May 16, 2020 at 10:35:33PM +0530, Lokesh Vutla wrote:
> Hi Richard,
>
> On 16/05/20 10:24 PM, Richard Cochran wrote:
> > On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote:
> >> phc2pwm.c | 233 ++
> >> 2 files changed, 237 ins
Hi Richard,
On 16/05/20 10:44 PM, Richard Cochran wrote:
> On Sat, May 16, 2020 at 10:35:33PM +0530, Lokesh Vutla wrote:
>> Hi Richard,
>>
>> On 16/05/20 10:24 PM, Richard Cochran wrote:
>>> On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote:
phc2pwm.c | 233 +++
This series adds support for an userpace utility to sync a pwm with PTP
clock. This can be used only on a specific hardware configutaion:
- A PTP supporting IP that is not capable of generating PPS signal
- A PWM signal that is connected to the above PTP hardware
- On every rising edge of PWM, PTP
Add pwm helper api calls to control PWM using /sys/class entries.
Following apis are supported:
- pwm_chan_enable
- pwm_chan_disable
- pwm_chan_set_period
- pwm_chan_set_duty_cycle
- pwm_chan_create
Signed-off-by: Lokesh Vutla
---
makefile | 2 +-
pwm.c| 223 +++
Phc2pwm is an utility program to synchronize a pwm with ptp clock
to generate PPS.
This is mainly intended for the below hardware configuration:
- A PTP supporting IP that is not capable of generating PPS signal
- A PWM signal that is connected to the above PTP hardware
- On every rising edge of PW
Add helper apis to:
- Enable external timestamps
- Disable external timestamps
- Read external timestamps
Signed-off-by: Lokesh Vutla
---
phc.c | 48
phc.h | 29 +
2 files changed, 77 insertions(+)
diff --git a/phc.c b
On Sat, May 16, 2020 at 11:53:57PM +0530, Lokesh Vutla wrote:
> +#define PWM_CHAN_EXPORT "/sys/class/pwm/pwmchip%d/export"
> +#define PWM_CHAN_ENABLE "/sys/class/pwm/pwmchip%d/pwm%d/enable"
> +#define PWM_CHAN_PERIOD "/sys/class/pwm/pwmchip%d/pwm%d/period"
H
On Sat, May 16, 2020 at 11:53:58PM +0530, Lokesh Vutla wrote:
> diff --git a/makefile b/makefile
> index a965bd4..094c062 100644
> --- a/makefile
> +++ b/makefile
> @@ -22,7 +22,7 @@ CC = $(CROSS_COMPILE)gcc
> VER = -DVER=$(version)
> CFLAGS = -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_C
On Sat, May 16, 2020 at 11:53:58PM +0530, Lokesh Vutla wrote:
> + while (is_running()) {
> + if (phc_read_extts(clkid, &ts))
> + continue;
> +
> + fprintf(stdout, "Timestamp = %lld.%09lld\n", ts / NS_PER_SEC,
> + ts % NS_PER_SEC);
On Sat, May 16, 2020 at 11:53:58PM +0530, Lokesh Vutla wrote:
> +int main(int argc, char *argv[])
> +{
> + unsigned int pwm_chip = 0, pwm_chan = 0, event_index = 0;
> + int c, err, level = LOG_INFO;
> + char *progname, *ptp_dev;
> + struct pwm_chan *chan;
> + struct pwm_servo ps
On Sat, May 16, 2020 at 01:42:51PM -0700, Richard Cochran wrote:
> > + clkid = phc_open(ptp_dev);
> > + if (clkid == CLOCK_INVALID)
> > + return -1;
Also, printing a error message in this case would be helpful to the
user.
Thanks,
Richard
__
On Fri, Apr 17, 2020 at 10:00:06AM +0530, Lokesh Vutla wrote:
> Following dependencies are needed in kernel for testing:
> - Grygorii's series to support HW_TS_PUSH[2]
> - Add pwm node in BBB DT.
> All dependencies are available at[3].
> [3] https://github.com/lokeshvutla/linux.git devel/bbb-pps-g
31 matches
Mail list logo