From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [GIT PULL] On-demand device probing Date: Mon, 19 Oct 2015 16:43:24 +0100 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-Transfer-Encoding: QUOTED-PRINTABLE Return-path: 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 Content-Disposition: inline In-Reply-To: <1445268580.53393.183.camel@infradead.org> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org 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 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. >=20 > 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 =E2=80=94 while in DT, properties which reference G= PIO 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. --=20 =46TTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html