All of lore.kernel.org
 help / color / mirror / Atom feed
From: "S, Venkatraman" <svenkatr@ti.com>
To: Silesh C V <silesh@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	"kishore.kadiyala" <kishore.kadiyala@ti.com>,
	balajitk <balajitk@ti.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] OMAP: HSMMC: Fix GPIO muxing
Date: Tue, 28 Jun 2011 17:07:05 +0530	[thread overview]
Message-ID: <BANLkTin39hkDNa+v=29PLMZRdBtWGCfseA@mail.gmail.com> (raw)
In-Reply-To: <1309250759-18472-1-git-send-email-silesh@ti.com>

On Tue, Jun 28, 2011 at 2:15 PM, Silesh C V <silesh@ti.com> wrote:
> Use generic gpio call to check the validity of the gpio. Note that
> this includes gpio 0 also which was missing before.
>
> Signed-off-by: Silesh C V <silesh@ti.com>
> ---
>  arch/arm/mach-omap2/hsmmc.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index 66868c5..a9b45c7 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -13,6 +13,7 @@
>  #include <linux/slab.h>
>  #include <linux/string.h>
>  #include <linux/delay.h>
> +#include <linux/gpio.h>
>  #include <mach/hardware.h>
>  #include <plat/mmc.h>
>  #include <plat/omap-pm.h>
> @@ -213,12 +214,10 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
>  static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
>                        int controller_nr)
>  {
> -       if ((mmc_controller->slots[0].switch_pin > 0) && \
> -               (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
> +       if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
>                omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
>                                        OMAP_PIN_INPUT_PULLUP);
> -       if ((mmc_controller->slots[0].gpio_wp > 0) && \
> -               (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
> +       if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
>                omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
>                                        OMAP_PIN_INPUT_PULLUP);
>        if (cpu_is_omap34xx()) {
> --
> 1.7.1
>

Looks good to me.
Reviewed-by: Venkatraman S <svenkatr@ti.com>

WARNING: multiple messages have this Message-ID (diff)
From: svenkatr@ti.com (S, Venkatraman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] OMAP: HSMMC: Fix GPIO muxing
Date: Tue, 28 Jun 2011 17:07:05 +0530	[thread overview]
Message-ID: <BANLkTin39hkDNa+v=29PLMZRdBtWGCfseA@mail.gmail.com> (raw)
In-Reply-To: <1309250759-18472-1-git-send-email-silesh@ti.com>

On Tue, Jun 28, 2011 at 2:15 PM, Silesh C V <silesh@ti.com> wrote:
> Use generic gpio call to check the validity of the gpio. Note that
> this includes gpio 0 also which was missing before.
>
> Signed-off-by: Silesh C V <silesh@ti.com>
> ---
> ?arch/arm/mach-omap2/hsmmc.c | ? ?7 +++----
> ?1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index 66868c5..a9b45c7 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -13,6 +13,7 @@
> ?#include <linux/slab.h>
> ?#include <linux/string.h>
> ?#include <linux/delay.h>
> +#include <linux/gpio.h>
> ?#include <mach/hardware.h>
> ?#include <plat/mmc.h>
> ?#include <plat/omap-pm.h>
> @@ -213,12 +214,10 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
> ?static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
> ? ? ? ? ? ? ? ? ? ? ? ?int controller_nr)
> ?{
> - ? ? ? if ((mmc_controller->slots[0].switch_pin > 0) && \
> - ? ? ? ? ? ? ? (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
> + ? ? ? if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
> ? ? ? ? ? ? ? ?omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OMAP_PIN_INPUT_PULLUP);
> - ? ? ? if ((mmc_controller->slots[0].gpio_wp > 0) && \
> - ? ? ? ? ? ? ? (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
> + ? ? ? if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
> ? ? ? ? ? ? ? ?omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OMAP_PIN_INPUT_PULLUP);
> ? ? ? ?if (cpu_is_omap34xx()) {
> --
> 1.7.1
>

Looks good to me.
Reviewed-by: Venkatraman S <svenkatr@ti.com>

  reply	other threads:[~2011-06-28 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28  8:45 [PATCH] OMAP: HSMMC: Fix GPIO muxing Silesh C V
2011-06-28  8:45 ` Silesh C V
2011-06-28 11:37 ` S, Venkatraman [this message]
2011-06-28 11:37   ` S, Venkatraman
2011-06-28 13:50 ` Igor Grinberg
2011-06-28 13:50   ` Igor Grinberg
2011-06-29  1:26   ` Silesh C V
2011-06-29  1:26     ` Silesh C V

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='BANLkTin39hkDNa+v=29PLMZRdBtWGCfseA@mail.gmail.com' \
    --to=svenkatr@ti.com \
    --cc=balajitk@ti.com \
    --cc=kishore.kadiyala@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=silesh@ti.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.