From: Marc Zyngier <maz@kernel.org>
To: qianggui.song <Qianggui.Song@amlogic.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Kevin Hilman <khilman@baylibre.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>
Subject: Re: [PATCH 4/4] irqchip/meson-gpio: Add support for meson s4 SoCs
Date: Mon, 10 Jan 2022 14:54:36 +0000 [thread overview]
Message-ID: <87lezntzdf.wl-maz@kernel.org> (raw)
In-Reply-To: <835a3f28-ec6a-9cd2-d574-5ef87b630fb3@amlogic.com>
On Mon, 10 Jan 2022 12:32:23 +0000,
qianggui.song <Qianggui.Song@amlogic.com> wrote:
>
>
>
> On 1/8/22 7:06 PM, Marc Zyngier wrote:
> >
> > On Sat, 08 Jan 2022 08:42:18 +0000,
> > Qianggui Song <qianggui.song@amlogic.com> wrote:
> >>
> >> The meson s4 SoCs support 12 gpio irq lines compared with previous
> >> serial chips and have something different, details are as below.
> >>
> >> IRQ Number:
> >> - 80:68 13 pins on bank Z
> >> - 67:48 20 pins on bank X
> >> - 47:36 12 pins on bank H
> >> - 35:24 12 pins on bank D
> >> - 23:22 2 pins on bank E
> >> - 21:14 8 pins on bank C
> >> - 13:0 13 pins on bank B
> >>
> >> - PADCTRL_GPIO_IRQ_CTRL0
> >> bit[31]: enable/disable the whole irq lines
> >
> > s/the whole/all the/
> Okay
> >
> >> bit[12-23]: single edge trigger
> >> bit[0-11]: poll trigger
> >>
> >> - PADCTRL_GPIO_IRQ_CTRL[X]
> >> - bit[0-16]: 7 bits to chooge gpio source for irq line 2*[X] - 2
> >
> > choose?
> yes it is choose
> >
> >> - bit[16-22]:7 bits to chooge gpio source for irq line 2*[X] - 1
> >> where X = 1-6
> >>
> >> - PADCTRL_GPIO_IRQ_CTRL[7]
> >> bit[0-11]: both edge trigger
> >
> > This information would fit better in the code than in the commit
> > message.
> >
> will copy this to code.
> >>
> >> Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
> >> ---
> >> drivers/irqchip/irq-meson-gpio.c | 51 ++++++++++++++++++++++++++++++++
> >> 1 file changed, 51 insertions(+)
> >>
> >> diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
> >> index 98419428fcbd..c5d20a866c37 100644
> >> --- a/drivers/irqchip/irq-meson-gpio.c
> >> +++ b/drivers/irqchip/irq-meson-gpio.c
> >> @@ -42,6 +42,11 @@
> >> #define REG_PIN_SEL_SHIFT(x) (((x) % 4) * 8)
> >> #define REG_FILTER_SEL_SHIFT(x) ((x) * 4)
> >> +/* use for s4 chips */
> >
> > s/use/Used/
> okay
> >
> >> +#define REG_EDGE_POL_S4 0x1c
> >> +#define REG_EDGE_POL_MASK_S4(x) \
> >> + ({typeof(x) _x = (x); BIT(_x) | BIT(12 + (_x)); })
> >
> > Why on Earth should this macro handle multiple types?
> If I use #define REG_EDGE_POL_MASK_S4(x) (BIT(x) | BIT(12 + (x)), when
> run git format-patch -1 --stdout | ./script/checkpath.pl --strict -,
> will get a message
> CHECK: Macro argument reuse 'x' - possible side-effects?
Well, either expand the macro directly in the code (after all, there
is only one use for it) or make this a C function instead of a macro.
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: qianggui.song <Qianggui.Song@amlogic.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Kevin Hilman <khilman@baylibre.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>
Subject: Re: [PATCH 4/4] irqchip/meson-gpio: Add support for meson s4 SoCs
Date: Mon, 10 Jan 2022 14:54:36 +0000 [thread overview]
Message-ID: <87lezntzdf.wl-maz@kernel.org> (raw)
In-Reply-To: <835a3f28-ec6a-9cd2-d574-5ef87b630fb3@amlogic.com>
On Mon, 10 Jan 2022 12:32:23 +0000,
qianggui.song <Qianggui.Song@amlogic.com> wrote:
>
>
>
> On 1/8/22 7:06 PM, Marc Zyngier wrote:
> >
> > On Sat, 08 Jan 2022 08:42:18 +0000,
> > Qianggui Song <qianggui.song@amlogic.com> wrote:
> >>
> >> The meson s4 SoCs support 12 gpio irq lines compared with previous
> >> serial chips and have something different, details are as below.
> >>
> >> IRQ Number:
> >> - 80:68 13 pins on bank Z
> >> - 67:48 20 pins on bank X
> >> - 47:36 12 pins on bank H
> >> - 35:24 12 pins on bank D
> >> - 23:22 2 pins on bank E
> >> - 21:14 8 pins on bank C
> >> - 13:0 13 pins on bank B
> >>
> >> - PADCTRL_GPIO_IRQ_CTRL0
> >> bit[31]: enable/disable the whole irq lines
> >
> > s/the whole/all the/
> Okay
> >
> >> bit[12-23]: single edge trigger
> >> bit[0-11]: poll trigger
> >>
> >> - PADCTRL_GPIO_IRQ_CTRL[X]
> >> - bit[0-16]: 7 bits to chooge gpio source for irq line 2*[X] - 2
> >
> > choose?
> yes it is choose
> >
> >> - bit[16-22]:7 bits to chooge gpio source for irq line 2*[X] - 1
> >> where X = 1-6
> >>
> >> - PADCTRL_GPIO_IRQ_CTRL[7]
> >> bit[0-11]: both edge trigger
> >
> > This information would fit better in the code than in the commit
> > message.
> >
> will copy this to code.
> >>
> >> Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
> >> ---
> >> drivers/irqchip/irq-meson-gpio.c | 51 ++++++++++++++++++++++++++++++++
> >> 1 file changed, 51 insertions(+)
> >>
> >> diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
> >> index 98419428fcbd..c5d20a866c37 100644
> >> --- a/drivers/irqchip/irq-meson-gpio.c
> >> +++ b/drivers/irqchip/irq-meson-gpio.c
> >> @@ -42,6 +42,11 @@
> >> #define REG_PIN_SEL_SHIFT(x) (((x) % 4) * 8)
> >> #define REG_FILTER_SEL_SHIFT(x) ((x) * 4)
> >> +/* use for s4 chips */
> >
> > s/use/Used/
> okay
> >
> >> +#define REG_EDGE_POL_S4 0x1c
> >> +#define REG_EDGE_POL_MASK_S4(x) \
> >> + ({typeof(x) _x = (x); BIT(_x) | BIT(12 + (_x)); })
> >
> > Why on Earth should this macro handle multiple types?
> If I use #define REG_EDGE_POL_MASK_S4(x) (BIT(x) | BIT(12 + (x)), when
> run git format-patch -1 --stdout | ./script/checkpath.pl --strict -,
> will get a message
> CHECK: Macro argument reuse 'x' - possible side-effects?
Well, either expand the macro directly in the code (after all, there
is only one use for it) or make this a C function instead of a macro.
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-01-10 14:54 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-08 8:42 [PATCH 0/4] irqchip/meson-gpio: Add support for Meson-S4 SoC Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 8:42 ` [PATCH 1/4] dt-bindings: interrupt-controller: New binding for Meson-S4 SoCs Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-09 15:27 ` Christian Hewitt
2022-01-09 15:27 ` Christian Hewitt
2022-01-09 15:27 ` Christian Hewitt
2022-01-10 12:33 ` qianggui.song
2022-01-10 12:33 ` qianggui.song
2022-01-08 8:42 ` [PATCH 2/4] irqchip/meson-gpio: support more than 8 channels gpio irq line Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 10:37 ` Marc Zyngier
2022-01-08 10:37 ` Marc Zyngier
2022-01-08 10:37 ` Marc Zyngier
2022-01-10 12:27 ` qianggui.song
2022-01-10 12:27 ` qianggui.song
2022-01-08 8:42 ` [PATCH 3/4] irqchip/meson-gpio: add select trigger type callback Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 10:44 ` Marc Zyngier
2022-01-08 10:44 ` Marc Zyngier
2022-01-08 10:44 ` Marc Zyngier
2022-01-10 12:28 ` qianggui.song
2022-01-10 12:28 ` qianggui.song
2022-01-08 8:42 ` [PATCH 4/4] irqchip/meson-gpio: Add support for meson s4 SoCs Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 8:42 ` Qianggui Song
2022-01-08 11:06 ` Marc Zyngier
2022-01-08 11:06 ` Marc Zyngier
2022-01-08 11:06 ` Marc Zyngier
2022-01-10 12:32 ` qianggui.song
2022-01-10 12:32 ` qianggui.song
2022-01-10 14:54 ` Marc Zyngier [this message]
2022-01-10 14:54 ` Marc Zyngier
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=87lezntzdf.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Qianggui.Song@amlogic.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=tglx@linutronix.de \
/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.