Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1378285ybt; Sat, 20 Jun 2020 08:42:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDPXLG2tqs/IDd07HmxRaIn0Y88Tzlf4S4KfbDAa+3sPjp+sU478jbEOhELH/5X4v6uzTE X-Received: by 2002:a17:906:4350:: with SMTP id z16mr8288907ejm.139.1592667753065; Sat, 20 Jun 2020 08:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592667753; cv=none; d=google.com; s=arc-20160816; b=gcL5lfKgYDMmr4i6yXrsngleroqteeypYOkibTbqkHDfMPkcrBhPEpcyFbDq6skmnY 0oj9Bp2toR3FnJqyH6R6xYYcNO4aEkdyf8jS+pcRt7CjUxZAzJQxrRNBqr8d63U2K8XH nQsR3O3GmDjsR/YZxkIXvuCrYfbVEAlyAZqh7RFa0t1MQ6TXki6NlvVLJFCdnuTwRCRc JFoRvKiP3G92b58gjGXaDjHo8vBparKrau5qBZSnrplE5DExMn8gL5i9JGx500dfOaQe sLZBmvCuFKzfotw/zl251GxF8GZlbDWZ5D2srNlcpf7dHLmKc6W7us4djzYZgnKR8l5S 4dqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SVSvU3wq3mnkdkComySiv2Fny8v5OHFAFbww4/P10mI=; b=s9I6BJscJu+A8SmUYUEJHe/pQ7pln1BPks1VL+26ynjJZ0kPdzFROJxHLuWroXqtdD wYqu+FJCH8Vb3/miG3KQgZ5uNBRysVAPsk4EBrHxFCQTwS8BSpjoAJsWSqZfeCWhNmth Nv/Dc7CThqX/YX9bRZkV5/vHSn/Ob30Bu9ubE+7BTxMV30XBbgVkhsMYUkPsjRXm7/PZ uMvrltd4+7Q8UTRY7Jrbpb7zdmr2vcayIdoqjI6NtiOKBCJVE/vkGY1ADYd3uR1teAIq MINd8SKLfaAdtA458mJLCvzma46gfoTU4Vs2jpVQ0hFcoHCLtLmLJAHEDVQ8ovHW9TUn MR7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k25si5479946eja.712.2020.06.20.08.42.08; Sat, 20 Jun 2020 08:42:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726898AbgFTPkL (ORCPT + 99 others); Sat, 20 Jun 2020 11:40:11 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50150 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725826AbgFTPkL (ORCPT ); Sat, 20 Jun 2020 11:40:11 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jmfbE-001PRD-2h; Sat, 20 Jun 2020 17:40:08 +0200 Date: Sat, 20 Jun 2020 17:40:08 +0200 From: Andrew Lunn To: Antoine Tenart Cc: davem@davemloft.net, f.fainelli@gmail.com, hkallweit1@gmail.com, richardcochran@gmail.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, allan.nielsen@microchip.com, foss@0leil.net Subject: Re: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support Message-ID: <20200620154008.GO304147@lunn.ch> References: <20200619122300.2510533-1-antoine.tenart@bootlin.com> <20200619122300.2510533-7-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200619122300.2510533-7-antoine.tenart@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 19, 2020 at 02:22:58PM +0200, Antoine Tenart wrote: > To get and set the PHC time, a GPIO has to be used and changes are only > retrieved or committed when on a rising edge. The same GPIO is shared by > all PHYs, so the granularity of the lock protecting it has to be > different from the ones protecting the 1588 registers (the VSC8584 PHY > has 2 1588 blocks, and a single load/save pin). I guess you thought about this GPIO quite a bit. It appears you have the mutex in the shared structure, but each PHY has its own gpio_desc, even though it should be for the same GPIO? The binding requires each PHY has the GPIO, even though it is the same GPIO. And there does not appear to be any checking that each PHY really does have the same GPIO. Ideally there would be a section in DT for the package, and this GPIO would be there. But i don't see an good way to do this. This does not feel right to me, but i've no good idea how it can be made better :-( Andrew