From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
linux-unisoc@lists.infradead.org,
Orson Zhai <orsonzhai@gmail.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/4] gpio: Add RDA Micro GPIO controller support
Date: Mon, 21 Oct 2019 11:49:26 +0530 [thread overview]
Message-ID: <20191021061926.GB12001@Mani-XPS-13-9360> (raw)
In-Reply-To: <CACRpkdbgFGciZMBF-_h5Wi47Hmco7tA9Pr7XegM8SpWxhqLT1A@mail.gmail.com>
Hi Linus,
On Mon, Oct 21, 2019 at 02:57:31AM +0200, Linus Walleij wrote:
> On Sat, Oct 19, 2019 at 6:05 PM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> > On Wed, Oct 16, 2019 at 02:41:32PM +0200, Linus Walleij wrote:
>
> > > select GPIO_GENERIC
> >
> > hmm.. I don't think this driver can use it. Please see the justification
> > below.
> (...)
> > As you can see in this driver, there are 2 separate registers needs to be
> > read in order to get the value. RDA_GPIO_VAL needs to be read when the pin
> > is in input state and RDA_GPIO_SET needs to be read when the pin is in output
> > state.
> >
> > The MMIO driver relies on a single `dat` register to read the GPIO state and
> > this won't fit for this driver and hence my justification for not using it.
>
> Use RDA_GPIO_VAL for dat, then set BGPIOF_READ_OUTPUT_REG_SET
> and the mmio core will do what you want I think? That's what the flag is
> for IIUC.
>
Ah, this should work. Sorry for missing this earlier.
> Maybe we should document it better :/
>
That's how everything is in kernel for me... If you don't look closer, you'll
not get it.
Thanks,
Mani
> Yours,
> Linus Walleij
_______________________________________________
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:[~2019-10-21 6:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 17:30 [PATCH v2 0/4] Add GPIO support for RDA8810PL SoC Manivannan Sadhasivam
2019-10-15 17:30 ` [PATCH v2 1/4] dt-bindings: gpio: Add devicetree binding for RDA Micro GPIO controller Manivannan Sadhasivam
2019-10-16 12:27 ` Linus Walleij
2019-10-21 6:15 ` Manivannan Sadhasivam
2019-10-15 17:30 ` [PATCH v2 2/4] ARM: dts: Add RDA8810PL GPIO controllers Manivannan Sadhasivam
2019-10-15 17:30 ` [PATCH v2 3/4] gpio: Add RDA Micro GPIO controller support Manivannan Sadhasivam
2019-10-15 17:33 ` Manivannan Sadhasivam
2019-10-16 12:41 ` Linus Walleij
2019-10-19 16:05 ` Manivannan Sadhasivam
2019-10-21 0:57 ` Linus Walleij
2019-10-21 6:19 ` Manivannan Sadhasivam [this message]
2019-10-15 17:30 ` [PATCH v2 4/4] MAINTAINERS: Add entry for RDA Micro GPIO driver and binding Manivannan Sadhasivam
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=20191021061926.GB12001@Mani-XPS-13-9360 \
--to=manivannan.sadhasivam@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-unisoc@lists.infradead.org \
--cc=orsonzhai@gmail.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