Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Yixun Lan <dlan@gentoo.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Conor Dooley <conor@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Yangyu Chen <cyy@cyyself.name>,
	Jisheng Zhang <jszhang@kernel.org>,
	Jesse Taube <mr.bossman075@gmail.com>,
	Inochi Amaoto <inochiama@outlook.com>,
	Icenowy Zheng <uwu@icenowy.me>,
	Meng Zhang <zhangmeng.kevin@linux.spacemit.com>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v3 1/3] dt-bindings: gpio: spacemit: add support for K1 SoC
Date: Sat, 28 Dec 2024 13:18:24 +0800	[thread overview]
Message-ID: <20241228051824-GYA1079860@gentoo> (raw)
In-Reply-To: <CACRpkdZPD2C2iPwOX_kW1Ug8jVkdHhhc7iFycHtzj5LQ0XWNgQ@mail.gmail.com>

Hi Linus:

thanks for your review

On 17:34 Fri 27 Dec     , Linus Walleij wrote:
> On Wed, Dec 25, 2024 at 1:33 AM Yixun Lan <dlan@gentoo.org> wrote:
> 
> > The GPIO controller of K1 support basic functions as input/output,
> > all pins can be used as interrupt which route to one IRQ line,
> > trigger type can be select between rising edge, failing edge, or both.
> > There are four GPIO banks, each consisting of 32 pins.
> (...)
> > +description:
> > +  The controller's registers are organized as sets of eight 32-bit
> > +  registers with each set controlling a bank of up to 32 pins.  A single
> > +  interrupt is shared for all of the banks handled by the controller.
> 
> I looked at the driver and came to the conclusion that it's better to use
> 4 different instances of the chip, one for each set of 32bit registers,
> so these 4 GPIO controllers are instantiated separately.
> 
sounds good to me, I will work according to this in next version

> The operating system can handle the shared interrupt, there is no
> need to use a single device instance just because the interrupt is
> shared.
> 
> DT bindings are operating system neutral, but for example in Linux
> (if we pretend this is just one possible example) then a driver
> handling a shared IRQ can be requested with the flag IRQF_SHARED
> and the driver can just return IRQ_HANDLED if it handled an IRQ
> or IRQ_NONE if it didn't handle the irq (so other instances can
> handle it).
> 
agree, make sense

> Yours,
> Linus Walleij

-- 
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55

  reply	other threads:[~2024-12-28  5:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-25  0:32 [PATCH v3 0/3] riscv: spacemit: add gpio support for K1 SoC Yixun Lan
2024-12-25  0:32 ` [PATCH v3 1/3] dt-bindings: gpio: spacemit: add " Yixun Lan
2024-12-27 16:19   ` Linus Walleij
2024-12-27 16:34   ` Linus Walleij
2024-12-28  5:18     ` Yixun Lan [this message]
2024-12-25  0:32 ` [PATCH v3 2/3] " Yixun Lan
2024-12-27 16:28   ` Linus Walleij
2024-12-25  0:32 ` [PATCH v3 3/3] riscv: dts: spacemit: add gpio " Yixun Lan

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=20241228051824-GYA1079860@gentoo \
    --to=dlan@gentoo.org \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=cyy@cyyself.name \
    --cc=devicetree@vger.kernel.org \
    --cc=inochiama@outlook.com \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mr.bossman075@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=uwu@icenowy.me \
    --cc=zhangmeng.kevin@linux.spacemit.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