All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-acpi@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <acourbot@nvidia.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Chris Ball <cjb@laptop.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Rhyland Klein <rklein@nvidia.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Rob Landley <rob@landley.net>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/7] ARM: tegra: add gpiod_lookup table for paz00
Date: Fri, 22 Nov 2013 11:40:09 -0700	[thread overview]
Message-ID: <528FA509.6080907@wwwdotorg.org> (raw)
In-Reply-To: <1385122474-14926-3-git-send-email-mika.westerberg@linux.intel.com>

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-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-acpi@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <acourbot@nvidia.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Chris Ball <cjb@laptop.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Rhyland Klein <rklein@nvidia.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Rob Landley <rob@landley.net>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/7] ARM: tegra: add gpiod_lookup table for paz00
Date: Fri, 22 Nov 2013 11:40:09 -0700	[thread overview]
Message-ID: <528FA509.6080907@wwwdotorg.org> (raw)
In-Reply-To: <1385122474-14926-3-git-send-email-mika.westerberg@linux.intel.com>

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;


  reply	other threads:[~2013-11-22 18:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 12:14 [PATCH v2 0/7] gpio / ACPI: convert users to gpiod_* and drop acpi_gpio.h Mika Westerberg
2013-11-22 12:14 ` [PATCH v2 1/7] net: rfkill: gpio: convert to descriptor-based GPIO interface Mika Westerberg
2013-11-22 12:14 ` [PATCH v2 2/7] ARM: tegra: add gpiod_lookup table for paz00 Mika Westerberg
2013-11-22 18:40   ` Stephen Warren [this message]
2013-11-22 18:40     ` Stephen Warren
2013-11-23  5:36     ` Alexandre Courbot
2013-11-23  5:36       ` Alexandre Courbot
2013-11-22 12:14 ` [PATCH v2 3/7] net: rfkill: gpio: remove gpio conversion support Mika Westerberg
2013-11-22 18:40   ` Stephen Warren
2013-11-22 20:56     ` Heikki Krogerus
2013-11-22 21:00       ` Stephen Warren
2013-11-25  8:35         ` Heikki Krogerus
2013-11-23  8:59   ` Alexandre Courbot
2013-11-25  8:41     ` Heikki Krogerus
2013-11-25  8:47       ` Alex Courbot
2013-11-25  9:02         ` Heikki Krogerus
2013-11-25  9:05           ` Alex Courbot
2013-11-22 12:14 ` [PATCH v2 4/7] mmc: sdhci-acpi: covert to use GPIO descriptor API Mika Westerberg
2013-11-22 13:39   ` Adrian Hunter
2013-11-23  9:23   ` Alexandre Courbot
2013-11-22 12:14 ` [PATCH v2 5/7] gpio / ACPI: register to ACPI events automatically Mika Westerberg
2013-11-22 12:14 ` [PATCH v2 6/7] gpio / ACPI: get rid of acpi_gpio.h Mika Westerberg
2013-11-23  9:21   ` Alexandre Courbot
2013-11-25  8:54     ` Mika Westerberg
2013-11-25  8:51       ` Alex Courbot
2013-11-25 10:18         ` Mika Westerberg
2013-11-22 12:14 ` [PATCH v2 7/7] Documentation / ACPI: update to GPIO descriptor API Mika Westerberg
2013-11-22 12:41 ` [PATCH v2 0/7] gpio / ACPI: convert users to gpiod_* and drop acpi_gpio.h Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528FA509.6080907@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=acourbot@nvidia.com \
    --cc=adrian.hunter@intel.com \
    --cc=cjb@laptop.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rklein@nvidia.com \
    --cc=rob@landley.net \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.