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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+Fz0PbNBXfC_0SYKVuHDic0ZREpHBk+oSqU5sO9Mq0AjY8_-w@mail.gmail.com>
Date:   Fri, 11 Mar 2022 14:50:18 +0900
From:   Lee Steve <steve.lee.analog@...il.com>
To:     "Sa, Nuno" <Nuno.Sa@...log.com>
Cc:     "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "perex@...ex.cz" <perex@...ex.cz>,
        "tiwai@...e.com" <tiwai@...e.com>,
        "ckeepax@...nsource.cirrus.com" <ckeepax@...nsource.cirrus.com>,
        "geert@...ux-m68k.org" <geert@...ux-m68k.org>,
        "rf@...nsource.wolfsonmicro.com" <rf@...nsource.wolfsonmicro.com>,
        "shumingf@...ltek.com" <shumingf@...ltek.com>,
        "srinivas.kandagatla@...aro.org" <srinivas.kandagatla@...aro.org>,
        "krzk@...nel.org" <krzk@...nel.org>,
        "dmurphy@...com" <dmurphy@...com>,
        "jack.yu@...ltek.com" <jack.yu@...ltek.com>,
        "steves.lee@...imintegrated.com" <steves.lee@...imintegrated.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>
Subject: Re: [PATCH] ASoC: max98390: Add reset gpio control

On Thu, Mar 10, 2022 at 5:48 PM Sa, Nuno <Nuno.Sa@...log.com> wrote:
>
> Hi Steve,
>
> > From: Steve Lee <steve.lee.analog@...il.com>
> > Sent: Thursday, March 10, 2022 9:16 AM
> > To: lgirdwood@...il.com; broonie@...nel.org; perex@...ex.cz;
> > tiwai@...e.com; ckeepax@...nsource.cirrus.com; geert@...ux-
> > m68k.org; rf@...nsource.wolfsonmicro.com; shumingf@...ltek.com;
> > srinivas.kandagatla@...aro.org; krzk@...nel.org; dmurphy@...com;
> > jack.yu@...ltek.com; Sa, Nuno <Nuno.Sa@...log.com>;
> > steves.lee@...imintegrated.com; linux-kernel@...r.kernel.org;
> > alsa-devel@...a-project.org
> > Cc: Steve Lee <steve.lee.analog@...il.com>
> > Subject: [PATCH] ASoC: max98390: Add reset gpio control
> >
> > [External]
> >
> >  Add reset gpio control to support RESET PIN connected to gpio.
> >
> > Signed-off-by: Steve Lee <steve.lee.analog@...il.com>
> > ---
> >  sound/soc/codecs/max98390.c | 18 ++++++++++++++++++
> >  sound/soc/codecs/max98390.h |  1 +
> >  2 files changed, 19 insertions(+)
> >
> > diff --git a/sound/soc/codecs/max98390.c
> > b/sound/soc/codecs/max98390.c
> > index b392567c2b3e..574d8d5f1119 100644
> > --- a/sound/soc/codecs/max98390.c
> > +++ b/sound/soc/codecs/max98390.c
> > @@ -1073,6 +1073,24 @@ static int max98390_i2c_probe(struct
> > i2c_client *i2c,
> >               return ret;
> >       }
> >
> > +     max98390->reset_gpio = of_get_named_gpio(i2c-
> > >dev.of_node,
> > +                                             "maxim,reset-gpios", 0);
>
> Why not using devm_gpiod_get_optional()? We could request the pin
> already in the asserted state and make the code slightly better...
>
> /* I guess there's no need to save it in our struct as we only use it here? */
> struct gpio_desc *reset_gpio;
>
> reset_gpio = devm_gpiod_get_optional(&i2c->dev, "reset", GPIOD_OUT_HIGH);
> if (reset_gpio) {
>       usleep_range(1000, 2000);
>      /* bring out of reset */
>       gpio_direction_output(max98390->reset_gpio, 0);
>       usleep_range(1000, 2000);
> }
>
> Also, do we have this on the bindings doc? If not, it should be done on a second
> patch on this series...
>
> - Nuno Sá
>

Thanks for comment on this patch. I will check and update as commented.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ