[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <528FA509.6080907@wwwdotorg.org>
Date: Fri, 22 Nov 2013 11:40:09 -0700
From: Stephen Warren <swarren@...dotorg.org>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-acpi@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <acourbot@...dia.com>
CC: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Chris Ball <cjb@...top.org>,
Johannes Berg <johannes@...solutions.net>,
Rhyland Klein <rklein@...dia.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Rob Landley <rob@...dley.net>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Thierry Reding <thierry.reding@...il.com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/7] ARM: tegra: add gpiod_lookup table for paz00
On 11/22/2013 05:14 AM, Mika Westerberg wrote:
> From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
>
> This makes it possible to request the gpio descriptors in
> rfkill-gpio driver regardless of the platform.
Patches 1-3,
Tested-by: Stephen Warren <swarren@...dia.com>
All the testing I did was to "cat /sys/kernel/debug/gpios" to make sure
those two GPIOs had been correctly acquired by the driver, and that they
changed state as expected via the command-line "rfkill {un,}block" commands.
However, please note that I had to apply a couple fixes to the gpiolib
core to get this working:
1)
To solve the following build warning:
> In file included from arch/arm/mach-tegra/board-paz00.c:21:0:
> include/linux/gpio/driver.h:102:17: warning: ‘struct of_phandle_args’ declared inside parameter list [enabled by default]
> include/linux/gpio/driver.h:102:17: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
I applied:
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index 82eac610ce1a..5133cf29803a 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -5,6 +5,7 @@
>
> struct device;
> struct gpio_desc;
> +struct of_phandle_args;
> struct seq_file;
>
> /**
2)
In order to get the GPIO lookups from the rfkill driver working, I applied:
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index ac53a9593662..b73c39f99858 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -2368,7 +2368,7 @@ static struct gpio_desc *gpiod_find(struct device *dev, const char *con_id,
> continue;
> }
>
> - if (chip->ngpio >= p->chip_hwnum) {
> + if (chip->ngpio <= p->chip_hwnum) {
> dev_warn(dev, "GPIO chip %s has %d GPIOs\n",
> chip->label, chip->ngpio);
> continue;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists