lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMz4kuKwj9o6P+m3P34paxJUmHhO9snuhG6pq_ksvN1oWvN3Qg@mail.gmail.com>
Date:   Tue, 15 Jan 2019 20:00:18 +0800
From:   Baolin Wang <baolin.wang@...aro.org>
To:     Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>, neo.hou@...soc.com,
        Mark Brown <broonie@...nel.org>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] gpio: sprd: Fix the incorrect data register

On Tue, 15 Jan 2019 at 18:47, Bartosz Golaszewski
<bgolaszewski@...libre.com> wrote:
>
> wt., 15 sty 2019 o 08:53 Baolin Wang <baolin.wang@...aro.org> napisaƂ(a):
> >
> > From: Neo Hou <neo.hou@...soc.com>
> >
> > Since differnt type EICs have its own data register to read, thus fix the
> > incorrect data register.
> >
> > Signed-off-by: Neo Hou <neo.hou@...soc.com>
> > Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
> > ---
> >  drivers/gpio/gpio-eic-sprd.c |   13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
> > index e0d6a0a..257df59 100644
> > --- a/drivers/gpio/gpio-eic-sprd.c
> > +++ b/drivers/gpio/gpio-eic-sprd.c
> > @@ -180,7 +180,18 @@ static void sprd_eic_free(struct gpio_chip *chip, unsigned int offset)
> >
> >  static int sprd_eic_get(struct gpio_chip *chip, unsigned int offset)
> >  {
> > -       return sprd_eic_read(chip, offset, SPRD_EIC_DBNC_DATA);
> > +       struct sprd_eic *sprd_eic = gpiochip_get_data(chip);
> > +
> > +       switch (sprd_eic->type) {
> > +       case SPRD_EIC_DEBOUNCE:
> > +               return sprd_eic_read(chip, offset, SPRD_EIC_DBNC_DATA);
> > +       case SPRD_EIC_ASYNC:
> > +               return sprd_eic_read(chip, offset, SPRD_EIC_ASYNC_DATA);
> > +       case SPRD_EIC_SYNC:
> > +               return sprd_eic_read(chip, offset, SPRD_EIC_SYNC_DATA);
> > +       default:
> > +               return -ENOTSUPP;
> > +       }
> >  }
> >
> >  static int sprd_eic_direction_input(struct gpio_chip *chip, unsigned int offset)
> > --
> > 1.7.9.5
> >
>
> I guess both this and the second patch should go into stable and have
> a Fixes: tag?

Sure. I will send out v2 with a fix tag if no other issues.

-- 
Baolin Wang
Best Regards

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ