[PATCH 2/2] GPIO: LPC32xx: Add output reading to GPO P3
Arnd Bergmann
arnd at arndb.de
Thu Feb 23 08:40:48 EST 2012
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 at antcom.de>
>
Acked-by: Arnd Bergmann <arnd at 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
More information about the linux-arm-kernel
mailing list