From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Jonas Jensen <jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Friday 29 November 2013, Jonas Jensen wrote:
> Add GPIO driver for MOXA ART SoCs.
>
> Signed-off-by: Jonas Jensen <jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
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 devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [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
WARNING: multiple messages have this Message-ID (diff)
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
next prev parent reply other threads:[~2013-11-29 19:06 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 13:49 [PATCH] gpio: Add MOXA ART GPIO driver Jonas Jensen
2013-07-10 13:49 ` Jonas Jensen
2013-07-16 12:00 ` [PATCH v2] " Jonas Jensen
2013-07-16 12:00 ` Jonas Jensen
2013-07-17 9:34 ` [PATCH v3] " Jonas Jensen
2013-07-17 9:34 ` Jonas Jensen
2013-07-29 13:06 ` [PATCH v4] " Jonas Jensen
2013-07-29 13:06 ` Jonas Jensen
2013-08-02 11:34 ` Mark Rutland
2013-08-02 11:34 ` Mark Rutland
2013-08-16 14:05 ` Linus Walleij
2013-08-16 14:05 ` Linus Walleij
2013-10-11 14:53 ` [PATCH v5] " Jonas Jensen
2013-10-11 14:53 ` Jonas Jensen
2013-10-11 15:44 ` Linus Walleij
2013-10-11 15:44 ` Linus Walleij
2013-10-14 11:15 ` Jonas Jensen
2013-10-14 11:15 ` Jonas Jensen
2013-10-17 9:24 ` Linus Walleij
2013-10-17 9:24 ` Linus Walleij
2013-11-28 15:19 ` [PATCH v6] " Jonas Jensen
2013-11-28 15:19 ` Jonas Jensen
2013-11-28 16:37 ` Arnd Bergmann
2013-11-28 16:37 ` Arnd Bergmann
2013-11-29 20:21 ` Linus Walleij
2013-11-29 20:21 ` Linus Walleij
2013-11-29 21:45 ` Arnd Bergmann
2013-11-29 21:45 ` Arnd Bergmann
2013-11-29 11:11 ` [PATCH v7] " Jonas Jensen
2013-11-29 11:11 ` Jonas Jensen
[not found] ` <1385723494-8033-1-git-send-email-jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-29 19:06 ` Arnd Bergmann [this message]
2013-11-29 19:06 ` Arnd Bergmann
2013-11-29 19:06 ` Arnd Bergmann
2013-11-29 20:29 ` Linus Walleij
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-02 10:27 ` Jonas Jensen
[not found] ` <1385980079-20175-1-git-send-email-jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-12-04 12:28 ` Linus Walleij
2013-12-04 12:28 ` Linus Walleij
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-r2ngtmty4d4@public.gmane.org \
--cc=arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=jonas.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.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.