From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754145AbbJSPoE (ORCPT ); Mon, 19 Oct 2015 11:44:04 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:48142 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752131AbbJSPn5 (ORCPT ); Mon, 19 Oct 2015 11:43:57 -0400 Date: Mon, 19 Oct 2015 16:43:24 +0100 From: Russell King - ARM Linux To: David Woodhouse Cc: Mark Brown , Rob Herring , Greg Kroah-Hartman , Tomeu Vizoso , Michael Turquette , Stephen Boyd , Vinod Koul , Dan Williams , Linus Walleij , Alexandre Courbot , Thierry Reding , David Airlie , Terje =?iso-8859-1?Q?Bergstr=F6m?= , Stephen Warren , Wolfram Sang , Frank Rowand , Grant Likely , Kishon Vijay Abraham I , Sebastian Reichel , Dmitry Eremin-Solenikov , Liam Girdwood , Felipe Balbi , Jingoo Han , Lee Jones , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , "linux-kernel@vger.kernel.org" , linux-clk@vger.kernel.org, dmaengine@vger.kernel.org, "linux-gpio@vger.kernel.org" , dri-devel , "linux-tegra@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-pm@vger.kernel.org" , Linux PWM List , Linux USB List , "linux-fbdev@vger.kernel.org" Subject: Re: [GIT PULL] On-demand device probing Message-ID: <20151019154324.GN32532@n2100.arm.linux.org.uk> References: <561E1378.6000906@collabora.com> <20151017065750.GA18607@kroah.com> <20151018192931.GY14956@sirena.org.uk> <20151018193757.GA9147@kroah.com> <20151018195330.GB14956@sirena.org.uk> <1445247881.53393.146.camel@infradead.org> <1445258870.53393.173.camel@infradead.org> <20151019145048.GI14956@sirena.org.uk> <1445268580.53393.183.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1445268580.53393.183.camel@infradead.org> 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 Mon, Oct 19, 2015 at 04:29:40PM +0100, David Woodhouse wrote: > I don't know that there *is* a coherent plan here to address it all. > > Certainly, we *will* need subsystems to have firmware-specific > knowledge in some cases. Take GPIO as an example; ACPI *has* a way to > describe GPIO, and properties which reference GPIO pins are intended to > work through that — while in DT, properties which reference GPIO pins > will have different contents. They'll be compatible at the driver > level, in the sense that there's a call to get a given GPIO given the > property name, but the subsystems *will* be doing different things > behind the scenes. It's a bit ironic that you've chosen GPIO as an example there. The "new" GPIO API (the gpiod_* stuff) only has a fwnode way to get the gpio descriptor. There's no of_* method. I'd like to use the gpiod_* stuff, but I feel that my options are rather limited: either use fwnode_get_named_gpiod() with &dev->of_node->fwnode, which seems like a hack by going underneath the covers of how fwnode is (partially) implemented with DT, or by using of_get_named_gpio() and the converting the gpio number to a descriptor via gpio_to_desc(). Both feel very hacky. If ACPI already handles GPIOs internally, then I'm left wondering why GPIO descriptor stuff went down the fwnode route at all - it seems rather pointless in this case, and it seems to make the use of the gpiod* interfaces where we _do_ need to use it (DT) harder and more hacky. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.