From: Tomasz Figa <tomasz.figa@gmail.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Kukjin Kim <kgene.kim@samsung.com>,
Olof Johansson <olof@lixom.net>, Simon Glass <sjg@chromium.org>,
Luigi Semenzato <semenzato@chromium.org>,
ilho215.lee@samsung.com, eunki_kim@samsung.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] pinctrl: exynos: reorder xyz_irq_unmask() so future patch can ack
Date: Thu, 13 Jun 2013 13:14:25 +0200 [thread overview]
Message-ID: <2067345.uNWy6pBO6B@flatron> (raw)
In-Reply-To: <1371058399-31933-2-git-send-email-dianders@chromium.org>
On Wednesday 12 of June 2013 10:33:18 Doug Anderson wrote:
> This patch does nothing but reorder the functions to improve the
> readability of a future patch.
>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
> drivers/pinctrl/pinctrl-exynos.c | 52
> ++++++++++++++++++++-------------------- 1 file changed, 26
> insertions(+), 26 deletions(-)
IMHO just moving _ack() above _mask() (or _unmask()) would be enough,
without touching _mask() and _unmask() in this patch, but have my
Acked-by: Tomasz Figa <t.figa@samsung.com>
Best regards,
Tomasz
P.S. I think you might have missed linux-arm-kernel and linux-samsung-soc
in recipients list of this series.
> diff --git a/drivers/pinctrl/pinctrl-exynos.c
> b/drivers/pinctrl/pinctrl-exynos.c index c29a28e..c0729a3 100644
> --- a/drivers/pinctrl/pinctrl-exynos.c
> +++ b/drivers/pinctrl/pinctrl-exynos.c
> @@ -50,7 +50,7 @@ static const struct of_device_id exynos_wkup_irq_ids[]
> = { { }
> };
>
> -static void exynos_gpio_irq_unmask(struct irq_data *irqd)
> +static void exynos_gpio_irq_mask(struct irq_data *irqd)
> {
> struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
> struct samsung_pinctrl_drv_data *d = bank->drvdata;
> @@ -61,13 +61,22 @@ static void exynos_gpio_irq_unmask(struct irq_data
> *irqd) spin_lock_irqsave(&bank->slock, flags);
>
> mask = readl(d->virt_base + reg_mask);
> - mask &= ~(1 << irqd->hwirq);
> + mask |= 1 << irqd->hwirq;
> writel(mask, d->virt_base + reg_mask);
>
> spin_unlock_irqrestore(&bank->slock, flags);
> }
>
> -static void exynos_gpio_irq_mask(struct irq_data *irqd)
> +static void exynos_gpio_irq_ack(struct irq_data *irqd)
> +{
> + struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
> + struct samsung_pinctrl_drv_data *d = bank->drvdata;
> + unsigned long reg_pend = d->ctrl->geint_pend + bank->eint_offset;
> +
> + writel(1 << irqd->hwirq, d->virt_base + reg_pend);
> +}
> +
> +static void exynos_gpio_irq_unmask(struct irq_data *irqd)
> {
> struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
> struct samsung_pinctrl_drv_data *d = bank->drvdata;
> @@ -78,21 +87,12 @@ static void exynos_gpio_irq_mask(struct irq_data
> *irqd) spin_lock_irqsave(&bank->slock, flags);
>
> mask = readl(d->virt_base + reg_mask);
> - mask |= 1 << irqd->hwirq;
> + mask &= ~(1 << irqd->hwirq);
> writel(mask, d->virt_base + reg_mask);
>
> spin_unlock_irqrestore(&bank->slock, flags);
> }
>
> -static void exynos_gpio_irq_ack(struct irq_data *irqd)
> -{
> - struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
> - struct samsung_pinctrl_drv_data *d = bank->drvdata;
> - unsigned long reg_pend = d->ctrl->geint_pend + bank->eint_offset;
> -
> - writel(1 << irqd->hwirq, d->virt_base + reg_pend);
> -}
> -
> static int exynos_gpio_irq_set_type(struct irq_data *irqd, unsigned int
> type) {
> struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
> @@ -268,7 +268,7 @@ err_domains:
> return ret;
> }
>
> -static void exynos_wkup_irq_unmask(struct irq_data *irqd)
> +static void exynos_wkup_irq_mask(struct irq_data *irqd)
> {
> struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd);
> struct samsung_pinctrl_drv_data *d = b->drvdata;
> @@ -279,13 +279,22 @@ static void exynos_wkup_irq_unmask(struct irq_data
> *irqd) spin_lock_irqsave(&b->slock, flags);
>
> mask = readl(d->virt_base + reg_mask);
> - mask &= ~(1 << irqd->hwirq);
> + mask |= 1 << irqd->hwirq;
> writel(mask, d->virt_base + reg_mask);
>
> spin_unlock_irqrestore(&b->slock, flags);
> }
>
> -static void exynos_wkup_irq_mask(struct irq_data *irqd)
> +static void exynos_wkup_irq_ack(struct irq_data *irqd)
> +{
> + struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd);
> + struct samsung_pinctrl_drv_data *d = b->drvdata;
> + unsigned long pend = d->ctrl->weint_pend + b->eint_offset;
> +
> + writel(1 << irqd->hwirq, d->virt_base + pend);
> +}
> +
> +static void exynos_wkup_irq_unmask(struct irq_data *irqd)
> {
> struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd);
> struct samsung_pinctrl_drv_data *d = b->drvdata;
> @@ -296,21 +305,12 @@ static void exynos_wkup_irq_mask(struct irq_data
> *irqd) spin_lock_irqsave(&b->slock, flags);
>
> mask = readl(d->virt_base + reg_mask);
> - mask |= 1 << irqd->hwirq;
> + mask &= ~(1 << irqd->hwirq);
> writel(mask, d->virt_base + reg_mask);
>
> spin_unlock_irqrestore(&b->slock, flags);
> }
>
> -static void exynos_wkup_irq_ack(struct irq_data *irqd)
> -{
> - struct samsung_pin_bank *b = irq_data_get_irq_chip_data(irqd);
> - struct samsung_pinctrl_drv_data *d = b->drvdata;
> - unsigned long pend = d->ctrl->weint_pend + b->eint_offset;
> -
> - writel(1 << irqd->hwirq, d->virt_base + pend);
> -}
> -
> static int exynos_wkup_irq_set_type(struct irq_data *irqd, unsigned int
> type) {
> struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd);
next prev parent reply other threads:[~2013-06-13 11:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 17:33 [PATCH 1/3] pinctrl: exynos: Add spinlocks to irq_mask and irq_unmask Doug Anderson
2013-06-12 17:33 ` [PATCH 2/3] pinctrl: exynos: reorder xyz_irq_unmask() so future patch can ack Doug Anderson
2013-06-13 11:14 ` Tomasz Figa [this message]
2013-06-13 12:01 ` Kukjin Kim
2013-06-13 12:32 ` Linus Walleij
2013-06-13 16:43 ` Doug Anderson
2013-06-12 17:33 ` [PATCH 3/3] pinctrl: exynos: ack level-triggered interrupts before unmasking Doug Anderson
2013-06-13 10:54 ` Tomasz Figa
2013-06-13 16:34 ` Doug Anderson
2013-06-13 16:40 ` Tomasz Figa
2013-06-13 12:04 ` Kukjin Kim
2013-06-13 16:38 ` Doug Anderson
2013-06-13 16:42 ` Tomasz Figa
2013-06-13 16:50 ` Doug Anderson
2013-06-13 23:13 ` Kukjin Kim
2013-06-14 0:00 ` Doug Anderson
2013-06-14 0:18 ` Kukjin Kim
2013-06-13 12:34 ` Linus Walleij
2013-06-13 11:03 ` [PATCH 1/3] pinctrl: exynos: Add spinlocks to irq_mask and irq_unmask Tomasz Figa
2013-06-13 12:00 ` Kukjin Kim
2013-06-13 12:29 ` Linus Walleij
2013-06-13 16:38 ` [PATCH v2 3/3] pinctrl: exynos: ack level-triggered interrupts before unmasking Doug Anderson
2013-06-13 16:44 ` Tomasz Figa
2013-06-13 18:20 ` Linus Walleij
2013-06-17 16:56 ` 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=2067345.uNWy6pBO6B@flatron \
--to=tomasz.figa@gmail.com \
--cc=dianders@chromium.org \
--cc=eunki_kim@samsung.com \
--cc=ilho215.lee@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=semenzato@chromium.org \
--cc=sjg@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox