Hi Richard,

On 30/04/20 7:24 PM, Richard Cochran wrote:
> On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote:
>> - I could not fit pwm servo within existing servo implementations. Let
>>   me know if you have any idea to do it.
> 
> Why not just use the exising PI servo?

The main reason I couldn't fit in existing servo is as below:
- PWM period calculated and programmed in the current cycle gets reflected in
the next cycle.
- So, the adjustment calculated should account for current running period and
program the next period accordingly.
Is there a way that we can fit this model in the existing clock servo? Please
correct me if I am wrong.

> 
>> +static void usage(char *progname)
>> +{
>> +    fprintf(stderr,
>> +            "\n"
>> +            "usage: %s [options]\n\n"
>> +            "\n"
>> +            " -p [dev]      Clock device to use\n"
>> +            " -e [id]       PTP index for event/trigger\n"
> 
> Alphabetical ordering, please.

Sure.

> 
>> +            " -w [id]       PWM chip device id\n"
>> +            " -c [id]       PWM channel id from PWM chip\n"
>> +            " -l [num]      set the logging level to 'num'\n"
> 
> Add -m -q -v flags, just like in the other programs.

Okay, will fix it in v2.

> 
>> +            " -h            prints this message and exits\n"
>> +            "\n",
>> +            progname);
>> +}
> 
>> +    while (EOF != (c = getopt(argc, argv, "p:e:w:c:l:h"))) {
> 
> Alphabetical ordering, please.

Sure.

> 
>> +            switch (c) {
>> +            case 'p':
>> +                    ptp_dev = optarg;
>> +                    break;
>> +            case 'e':
>> +                    event_index = atoi(optarg);
>> +                    break;
> 
> Alphabetical ordering, please.

Sure.

> 
>> +
>> +    while(is_running()) {
> 
> space ------ ^

Sure, will fix it in v2.

> 
>> +            if (phc_read_extts(clkid, &ts))
>> +                    continue;
>> +
>> +            fprintf(stdout, "Timestamp = %lld.%09lld\n", ts / NS_PER_SEC,
>> +                    ts % NS_PER_SEC);
> 
> pr_debug?

okay, will fix it in v2.

Thanks and regards,
Lokesh

> 
> Thanks,
> Richard
> 


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

Reply via email to