From: JaeJoon Jung <rgbi3307@gmail.com>
To: Yash Shah <yash.shah@sifive.com>
Cc: linux-riscv <linux-riscv@lists.infradead.org>
Subject: Re: [bug report] GPIO & Hierarchy IRQ support for HiFive Unleashed
Date: Thu, 20 Feb 2020 06:14:33 +0900 [thread overview]
Message-ID: <CAHOvCC5EeHiB4wjhSoh2TikaGTDqzPEg3ZRRxpp1=sEUfV02Aw@mail.gmail.com> (raw)
In-Reply-To: <CH2PR13MB33684ED58B945BF678D508908C100@CH2PR13MB3368.namprd13.prod.outlook.com>
Great, thanks!
I am interested in RISC-V and SiFive.
If I find another bug, I will report.
JaeJoon Jung.
On Wed, 19 Feb 2020 at 12:56, Yash Shah <yash.shah@sifive.com> wrote:
>
> > -----Original Message-----
> > From: JaeJoon Jung <rgbi3307@gmail.com>
> > Sent: 30 January 2020 21:47
> > To: Yash Shah <yash.shah@sifive.com>
> > Cc: linux-riscv <linux-riscv@lists.infradead.org>
> > Subject: [bug report] GPIO & Hierarchy IRQ support for HiFive Unleashed
> >
> > Hello Yash Shah,
> >
> > I am testing the your patch:
> > [PATCH v4 0/6] GPIO & Hierarchy IRQ support for HiFive Unleashed from
> > 2019-12-10 11:11 Yash Shah
> >
> > I found out that you repaired the generic GPIO using bgpio_init(...) API.
> > bgpio_init() has 9 parameters, and the last is flags.
> > The flag getting to bgpio_init() is must be BGPIOF_READ_OUTPUT_REG_SET.
> >
> > Because FU540 GPIOs have different input/output register, If GPIO direction
> > is input(SIFIVE_GPIO_INPUT_VAL), it must be read input
> > value(SIFIVE_GPIO_INPUT_EN).
> > If GPIO direction is output(SIFIVE_GPIO_OUTPUT_VAL), it must be read
> > output value(SIFIVE_GPIO_OUTPUT_EN).
> >
> > If The flag is 0, GPIO output value is being reset and the value is reading 0
> > always.
> >
> > diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c index
> > 23d5e22694d1..1de1af452fcb 100644
> > --- a/drivers/gpio/gpio-sifive.c
> > +++ b/drivers/gpio/gpio-sifive.c
> > @@ -206,7 +206,7 @@ static int sifive_gpio_probe(struct platform_device
> > *pdev)
> > NULL,
> > chip->base + SIFIVE_GPIO_OUTPUT_EN,
> > chip->base + SIFIVE_GPIO_INPUT_EN,
> > - 0);
> > + BGPIOF_READ_OUTPUT_REG_SET);
> > if (ret) {
> > dev_err(dev, "unable to init generic GPIO\n");
> > return ret;
> >
> > Yours,
> > JaeJoon Jung
>
> Thanks for the bug report. I will look into this and send a fix.
>
> - Yash
prev parent reply other threads:[~2020-02-19 21:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 16:16 [bug report] GPIO & Hierarchy IRQ support for HiFive Unleashed JaeJoon Jung
2020-02-19 3:56 ` Yash Shah
2020-02-19 21:14 ` JaeJoon Jung [this message]
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='CAHOvCC5EeHiB4wjhSoh2TikaGTDqzPEg3ZRRxpp1=sEUfV02Aw@mail.gmail.com' \
--to=rgbi3307@gmail.com \
--cc=linux-riscv@lists.infradead.org \
--cc=yash.shah@sifive.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;
as well as URLs for NNTP newsgroup(s).