lkml.org 
[lkml]   [2013]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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@linux.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@nvidia.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-11-22 20:01    [W:0.103 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site