linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: baruch@tkos.co.il (Baruch Siach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] msm: gpio: Add v2 gpio support to MSM SoCs.
Date: Sat, 13 Nov 2010 21:25:55 +0200	[thread overview]
Message-ID: <20101113192555.GA23794@tarshish> (raw)
In-Reply-To: <1289585342-21341-1-git-send-email-gbean@codeaurora.org>

Hi Gregory,

On Fri, Nov 12, 2010 at 10:09:01AM -0800, Gregory Bean wrote:
> Beginning with the MSM8x60, the hardware block responsible for gpio
> support changes.  Provide gpiolib support for the new v2 architecture.
> 
> Signed-off-by: Gregory Bean <gbean@codeaurora.org>
> ---

[snip]

> +static inline void clr_gpio_bits(unsigned n, void __iomem *reg)
> +{
> +	writel(readl(reg) & ~n, reg);

IMO you should move the locking here. And since the only user of this function 
is msm_gpio_direction_input, I'd eliminate it altogether.

> +}

[snip]

> +static int msm_gpio_direction_input(struct gpio_chip *chip, unsigned 
> offset)
> +{
> +	unsigned long irq_flags;
> +
> +	spin_lock_irqsave(&tlmm_lock, irq_flags);
> +	clr_gpio_bits(BIT(GPIO_OE_BIT), GPIO_CONFIG(offset));
> +	spin_unlock_irqrestore(&tlmm_lock, irq_flags);
> +	return 0;
> +}

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

      parent reply	other threads:[~2010-11-13 19:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 18:09 [PATCH 1/2] msm: gpio: Add v2 gpio support to MSM SoCs Gregory Bean
2010-11-12 18:09 ` [PATCH 2/2] msm: gpio: Add irq support to v2 gpiolib Gregory Bean
2010-11-13 19:25 ` Baruch Siach [this message]

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=20101113192555.GA23794@tarshish \
    --to=baruch@tkos.co.il \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).