[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201311292006.31661.arnd@arndb.de>
Date: Fri, 29 Nov 2013 20:06:31 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Jonas Jensen <jonas.jensen@...il.com>
Cc: linux-gpio@...r.kernel.org, grant.likely@...aro.org,
linus.walleij@...aro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, arm@...nel.org, mark.rutland@....com,
devicetree@...r.kernel.org
Subject: Re: [PATCH v7] gpio: Add MOXA ART GPIO driver
On Friday 29 November 2013, Jonas Jensen wrote:
> Add GPIO driver for MOXA ART SoCs.
>
> Signed-off-by: Jonas Jensen <jonas.jensen@...il.com>
Acked-by: Arnd Bergmann <arnd@...db.de>
One more comment, no need to resend for another review if this is the only
thing you want to change:
> +struct moxart_gpio_chip {
> + struct gpio_chip gpio;
> + void __iomem *moxart_gpio_base;
> +};
If you rename 'moxart_gpio_base' to 'base'
> +static int moxart_gpio_get(struct gpio_chip *chip, unsigned offset)
> +{
> + struct moxart_gpio_chip *gc = to_moxart_gpio(chip);
> + u32 ret = readl(gc->moxart_gpio_base + GPIO_PIN_DIRECTION);
> +
> + if (ret & BIT(offset))
> + return !!(readl(gc->moxart_gpio_base + GPIO_DATA_OUT) &
> + BIT(offset));
> + else
> + return !!(readl(gc->moxart_gpio_base + GPIO_DATA_IN) &
> + BIT(offset));
> +}
These will fit in one line with no loss of readability.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists