Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752931AbdLGQCn (ORCPT ); Thu, 7 Dec 2017 11:02:43 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:51411 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752820AbdLGQCi (ORCPT ); Thu, 7 Dec 2017 11:02:38 -0500 Date: Thu, 7 Dec 2017 17:02:35 +0100 From: Andrew Lunn To: Jerome Brunet Cc: Florian Fainelli , Kevin Hilman , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King Subject: Re: [PATCH net-next v2 3/8] net: phy: meson-gxl: add read and write helpers for bank registers Message-ID: <20171207160235.GL24750@lunn.ch> References: <20171207142715.32578-1-jbrunet@baylibre.com> <20171207142715.32578-4-jbrunet@baylibre.com> <20171207154610.GG24750@lunn.ch> <1512661873.7042.9.camel@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1512661873.7042.9.camel@baylibre.com> 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 Content-Length: 676 Lines: 17 > Banks actually comes from the datasheet, Yes. > I don't mind renaming it but I would be making things up. As you wish ? Keep it as is for the moment. > Does the usual pages comes with this weird toggle thing to open the access ? > Would we able to use these generic helpers with our this kind of quirks ? I don't think the API has been defined yet. But what has been discussed is adding functions to struct phy_driver. The driver can then implement whatever is needed to select a given page. There will then be helpers which take the lock, select the page, do the read/write, select page 0, and unlock. Supporting this funny toggle should not be a problem. Andrew