All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] GPIO: LPC32xx: Add output reading to GPO P3
Date: Thu, 23 Feb 2012 13:40:48 +0000	[thread overview]
Message-ID: <201202231340.48558.arnd@arndb.de> (raw)
In-Reply-To: <1329773948-4655-2-git-send-email-stigge@antcom.de>

On Monday 20 February 2012, Roland Stigge wrote:
> The chip offers the function to detect the current state of output of the GPO
> P3 pins. Useful for reading GPIO output state in Linux' GPIO API, e.g. via
> sysfs
> 
> Signed-off-by: Roland Stigge <stigge@antcom.de>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

> +static int __get_gpo_state_p3(struct lpc32xx_gpio_chip *group,
> +       unsigned pin)
> +{
> +       return GPO3_PIN_IN_SEL(__raw_readl(group->gpio_grp->outp_state), pin);
> +}
> +

It would be nice to convert this to use readl_relaxed() everywhere instead
of __raw_readl(), but that is probably better done separately.

	Arnd

  reply	other threads:[~2012-02-23 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 21:39 [PATCH 1/2] GPIO: LPC32xx: Fix missing bit selection mask Roland Stigge
2012-02-20 21:39 ` [PATCH 2/2] GPIO: LPC32xx: Add output reading to GPO P3 Roland Stigge
2012-02-23 13:40   ` Arnd Bergmann [this message]
2012-02-21 14:02 ` [PATCH 1/2] GPIO: LPC32xx: Fix missing bit selection mask Wolfram Sang
2012-02-23  9:58   ` Arnd Bergmann

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=201202231340.48558.arnd@arndb.de \
    --to=arnd@arndb.de \
    --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 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.