mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jonas Jensen <jonas.jensen@gmail.com>
Cc: linux-gpio@vger.kernel.org, grant.likely@linaro.org,
	linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arm@kernel.org,
	mark.rutland@arm.com, devicetree@vger.kernel.org
Subject: Re: [PATCH v7] gpio: Add MOXA ART GPIO driver
Date: Fri, 29 Nov 2013 20:06:31 +0100	[thread overview]
Message-ID: <201311292006.31661.arnd@arndb.de> (raw)
In-Reply-To: <1385723494-8033-1-git-send-email-jonas.jensen@gmail.com>

On Friday 29 November 2013, Jonas Jensen wrote:
> Add GPIO driver for MOXA ART SoCs.
> 
> Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>

Acked-by: Arnd Bergmann <arnd@arndb.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

  reply	other threads:[~2013-11-29 19:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 13:49 [PATCH] " Jonas Jensen
2013-07-16 12:00 ` [PATCH v2] " Jonas Jensen
2013-07-17  9:34   ` [PATCH v3] " Jonas Jensen
2013-07-29 13:06     ` [PATCH v4] " Jonas Jensen
2013-08-02 11:34       ` Mark Rutland
2013-08-16 14:05       ` Linus Walleij
2013-10-11 14:53       ` [PATCH v5] " Jonas Jensen
2013-10-11 15:44         ` Linus Walleij
2013-10-14 11:15           ` Jonas Jensen
2013-10-17  9:24             ` Linus Walleij
2013-11-28 15:19         ` [PATCH v6] " Jonas Jensen
2013-11-28 16:37           ` Arnd Bergmann
2013-11-29 20:21             ` Linus Walleij
2013-11-29 21:45               ` Arnd Bergmann
2013-11-29 11:11           ` [PATCH v7] " Jonas Jensen
2013-11-29 19:06             ` Arnd Bergmann [this message]
2013-11-29 20:29             ` Linus Walleij
2013-12-02 10:27             ` [PATCH] gpio: MOXA ART: rename moxart_gpio_base to base Jonas Jensen
2013-12-04 12:28               ` Linus Walleij

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=201311292006.31661.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=arm@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=jonas.jensen@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome