Return-path: Received: from charlotte.tuxdriver.com ([70.61.120.58]:42966 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbaJ0PaU (ORCPT ); Mon, 27 Oct 2014 11:30:20 -0400 Date: Mon, 27 Oct 2014 11:21:58 -0400 From: "John W. Linville" To: Johannes Berg Cc: Mika Westerberg , "Rafael J. Wysocki" , Alexandre Courbot , Linus Walleij , Arnd Bergmann , Grant Likely , Heikki Krogerus , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: rfkill: gpio: Add default GPIO driver mappings for ACPI Message-ID: <20141027152158.GC19976@tuxdriver.com> (sfid-20141027_163147_885627_5C98CC81) References: <1414404914-163837-1-git-send-email-mika.westerberg@linux.intel.com> <1414409035.3836.4.camel@jlt4.sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1414409035.3836.4.camel@jlt4.sipsolutions.net> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, Oct 27, 2014 at 12:23:55PM +0100, Johannes Berg wrote: > On Mon, 2014-10-27 at 12:15 +0200, Mika Westerberg wrote: > > The driver uses devm_gpiod_get_index(..., index) so that the index refers > > directly to the GpioIo resource under the ACPI device. The problem with > > this is that if the ordering changes we get wrong GPIOs. > > > > With ACPI 5.1 _DSD we can now use names instead to reference GPIOs > > analogous to Device Tree. However, we still have systems out there that do > > not provide _DSD at all. These systems must be supported as well. > > > > Luckily we now have acpi_dev_add_driver_gpios() that can be used to provide > > mappings for systems where _DSD is not provided and still take advantage of > > _DSD if it exists. > > > > This patch changes the driver to create default GPIO mappings if we are > > running on ACPI system. > > > > While there we can drop the indices completely and use devm_gpiod_get() > > with name instead. > > > > Signed-off-by: Mika Westerberg > > --- > > Hi, > > > > This patch is based on top of linux-pm/device-properties [1] and following > > patch from Rafael [2]. > > > > Johannes, John, > > > > If you are happy with the patch, can you ACK it so that we can merge it > > with the rest of the device-properties patches. Thanks. > > Acked-by: Johannes Berg > Reviewed-by: Johannes Berg Acked-by: John W. Linville -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready.