[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68dc9bba14776ecd07d1b9e6fe53956b892a4b56.camel@gmail.com>
Date: Mon, 05 Jul 2021 17:33:10 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Michael Walle <michael@...le.cc>,
Drew Fustini <drew@...gleboard.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Michael Zhu <michael.zhu@...rfivetech.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Fu Wei <tekkamanninja@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
linux-riscv <linux-riscv@...ts.infradead.org>,
devicetree <devicetree@...r.kernel.org>,
Emil Renner Berthing <kernel@...il.dk>,
Huan Feng <huan.feng@...rfivetech.com>
Subject: Re: [RFC PATH 2/2] gpio: starfive-jh7100: Add StarFive JH7100 GPIO
driver
Hi deee Ho Drew, Michael, All
On Mon, 2021-07-05 at 15:29 +0200, Michael Walle wrote:
> Hi Drew,
>
> Am 2021-07-02 23:06, schrieb Drew Fustini:
> > On Fri, Jul 02, 2021 at 07:03:19PM +0300, Andy Shevchenko wrote:
> > > On Thu, Jul 1, 2021 at 3:23 AM Drew Fustini <drew@...gleboard.org
> > > >
> > > wrote:
> > > > Add GPIO driver for the StarFive JH7100 SoC [1] used on the
> > > > BeagleV Starlight JH7100 board [2].
> > > >
> > > > [1] https://github.com/starfive-tech/beaglev_doc/
> > > > [2] https://github.com/beagleboard/beaglev-starlight
> > > > Signed-off-by: Emil Renner Berthing <kernel@...il.dk>
> > > > Signed-off-by: Huan Feng <huan.feng@...rfivetech.com>
> > > > Signed-off-by: Drew Fustini <drew@...gleboard.org>
> > >
> > > Seems some Co-developed-by are missing.
> >
> > Thank you for suggesting this. Huan Feng originally wrote the
> > driver.
> > Emil and I have made some changes to reorganize and clean it up for
> > submission.
> >
> > Do you think all three of us should list Co-developed-by: for our
> > names
> > in addition to the SOB?
> >
> > > Brief look into the code brings the Q. Can't you utilize gpio-
> > > regmap
> > > here? Why not?
> >
> > Michael Walle asked about this yesterday and it was my first time
> > looking at regmap and gpio-regmap. I've been reading the code and
> > it
> > does look like I should try convert this driver over to using
> > gpio-regmap.
> >
> > The open question in my mind is how to handle the interrupt type
> > (edge
> > trigged on positive or negative, level triggered on high or low).
> > Hopefully I can find some other examples that can help me think
> > about
> > how to do that correctly.
> regmap_irq_type".
> If you're lucky, you can just supply the corresponding values that
> fits
> your hardware.
I added some level IRQ type-configuration support to regmap_irq back
when I wrote the BD70528 support. You should be able to just fill the
bit-mask indicating IRQ types supported by your GPIO controller
hardware, and then the corresponding type register values. As far as I
remember the supported types and values are given "per IRQ". If my
memory serves me right there was a limitation that the regmap-IRQ does
not distinguish setup where GPIO controller supports rising and falling
edges - but not both. That would have required adding another type
flag.
> If it doesn't match your hardware at all, then you can
> keep your own functions, or if its slightly different, then maybe you
> can add support for your quirk in regmap-irq. You don't necessarily
> have
> to use regmap-irq together with gpio-regmap. You can also just use
> regmap-irq or gpio-regmap independently.
>
> A quick grep for "type_rising_" lists drivers/mfd/max77650.c and
> drivers/mfd/rohm-bd70528.c for example.
The BD70528 has not been used too much and is scheduled for removal. It
may have received only limited testing but it *should* be functional
though.
Best Regards
Matti Vaittinen
Powered by blists - more mailing lists