Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755812Ab0HPS7p (ORCPT ); Mon, 16 Aug 2010 14:59:45 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:64847 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755319Ab0HPS7n (ORCPT ); Mon, 16 Aug 2010 14:59:43 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Q2Est6qLdBQBa9IO8UQJOOPCWzafYIeBgyiq6PG3sawRObVpjRNe9kwYFf1T3As99V g09vip8iOyPG/FpqqO8voG8T+g561bgHIOi5RnSzJo57Frk8UOdxgrIIZRiwnL1W6AyY nc7yJF/AZy7eJyy2KD4WOqdhqYgf6dzrN+WzM= Date: Mon, 16 Aug 2010 21:00:03 +0200 From: Richard Cochran To: Arnd Bergmann Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Krzysztof Halasa , Rodolfo Giometti Subject: Re: [PATCH 1/5] ptp: Added a brand new class driver for ptp clocks. Message-ID: <20100816190003.GB4166@riccoc20.at.omicron.at> References: <363bd749a38d0b785d8431e591bf54c38db4c2d7.1281956490.git.richard.cochran@omicron.at> <201008161626.24083.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201008161626.24083.arnd@arndb.de> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1417 Lines: 34 On Mon, Aug 16, 2010 at 04:26:23PM +0200, Arnd Bergmann wrote: > Have you considered integrating the subsystem into the Posix clock/timer > framework? Yes, but see below. > I can't really tell from reading the source if this is possible or > not, but my feeling is that if it can be done, that would be a much > nicer interface. We already have clock_gettime/clock_settime/ > timer_settime/... system calls, and while you'd need to add another > clockid and some syscalls, my feeling is that it will be more > usable in the end. You are not the first person to ask about this. See this link for longer explanation of why I did not go that way: http://marc.info/?l=linux-netdev&m=127669810232201&w=2 You *could* offer the PTP clock as a Linux clock source/event device, and I agree that it would be nicer. However, the problem is, what do you do with the PHY based clocks? Just one 16 bit read from a PHY clock can take 40 usec, and you need four such read operations just to get the current time value. Also, I really did not want to add or change any syscalls. I could not see a practical way to extend the existing syscalls to accommodate PTP clocks. Richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/