From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754500AbcLBT2S (ORCPT ); Fri, 2 Dec 2016 14:28:18 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35210 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbcLBT2Q (ORCPT ); Fri, 2 Dec 2016 14:28:16 -0500 Date: Fri, 2 Dec 2016 20:28:10 +0100 From: Richard Cochran To: Grygorii Strashko Cc: Murali Karicheri , Wingman Kwok , "David S. Miller" , netdev@vger.kernel.org, Mugunthan V N , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Subject: Re: [PATCH 4/6] net: ethernet: ti: cpts: add ptp pps support Message-ID: <20161202192810.GA3259@netboy> References: <20161128230428.6872-1-grygorii.strashko@ti.com> <20161128230428.6872-5-grygorii.strashko@ti.com> <20161130184511.GB8209@netboy> <875d4cc2-8a47-b06d-fb46-0cacc28dbaee@ti.com> <20161130221738.GA13099@localhost.localdomain> <20161202095848.GA14586@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 02, 2016 at 11:58:34AM -0600, Grygorii Strashko wrote: > or I missed smth? You are missing three important points. 1. Unlike the code you posted, no edges will be lost. 2. The solution using the PWM is implemented in USER SPACE. If people use this way, then they will be forced to understand the inherit limitations. In addition, the behavior of servo will be under their control. 3. The update rate of the PHC is not once per second. It can be any rate at all, like 16 Hz for the telecom profile. You can't just blindly pick out an adjustment value once per second. Using the feedback from the time stamped PWM and adjusting THAT at the PWM rate (also not necessarily 1 PPS) is the right way. The second reply in that thread is an even better solution, leaving the PHC free running and adjusting the timer input clock (probably they used a VCO). Just hacking in some kind of kernel PPS with unknown accuracy is just asking for trouble later, since people will expect HW accuracy. So just get the input time stamps working, and make PWM control available to userspace in mainline (not sure about this, I guess it isn't), and leave the PPS part to a userspace utility. Thanks, Richard From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Cochran Subject: Re: [PATCH 4/6] net: ethernet: ti: cpts: add ptp pps support Date: Fri, 2 Dec 2016 20:28:10 +0100 Message-ID: <20161202192810.GA3259@netboy> References: <20161128230428.6872-1-grygorii.strashko@ti.com> <20161128230428.6872-5-grygorii.strashko@ti.com> <20161130184511.GB8209@netboy> <875d4cc2-8a47-b06d-fb46-0cacc28dbaee@ti.com> <20161130221738.GA13099@localhost.localdomain> <20161202095848.GA14586@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Murali Karicheri , Wingman Kwok , "David S. Miller" , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mugunthan V N , Sekhar Nori , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Grygorii Strashko Return-path: Content-Disposition: inline In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On Fri, Dec 02, 2016 at 11:58:34AM -0600, Grygorii Strashko wrote: > or I missed smth? You are missing three important points. 1. Unlike the code you posted, no edges will be lost. 2. The solution using the PWM is implemented in USER SPACE. If people use this way, then they will be forced to understand the inherit limitations. In addition, the behavior of servo will be under their control. 3. The update rate of the PHC is not once per second. It can be any rate at all, like 16 Hz for the telecom profile. You can't just blindly pick out an adjustment value once per second. Using the feedback from the time stamped PWM and adjusting THAT at the PWM rate (also not necessarily 1 PPS) is the right way. The second reply in that thread is an even better solution, leaving the PHC free running and adjusting the timer input clock (probably they used a VCO). Just hacking in some kind of kernel PPS with unknown accuracy is just asking for trouble later, since people will expect HW accuracy. So just get the input time stamps working, and make PWM control available to userspace in mainline (not sure about this, I guess it isn't), and leave the PPS part to a userspace utility. Thanks, Richard -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html