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: <CAHp75Vcynyp-aDY2PcZPfO2HGLi7xmxMU1JafDGa53HkQ+1PLw@mail.gmail.com>
Date:   Fri, 9 Jun 2017 21:22:16 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Nicolas Porcel <nicolasporcel06@...il.com>,
        ALSA Development Mailing List <alsa-devel@...a-project.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: Intel: byt-max98090 Fix GPIOs lookup

On Fri, Jun 9, 2017 at 7:50 PM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> From: Nicolas Porcel <nicolasporcel06@...il.com>
>
> Commit 9c3c9bc9cc98 ("gpiolib: tighten up ACPI legacy gpio lookups")
> changed the way fallback to _CRS-defined GPIOs is executed by requiring
> drivers use common connection ID for all GPIOs fetched from _CRS. This
> broke byt-max98090 driver, which expected GPIO core to ignore the names
> it supplied and simply give GPIOs 0 and 1 from whatever block it finds.
>
> By giving the same name to both GPIOs 0 and 1, the driver will perform
> the lookup for both of them instead of the first requested. This is the
> same behavior than before the commit.

I don't think this is right solution.

We may add mapping table for _CRS which will make this robust.

I will send an RFC


>
> Signed-off-by: Nicolas Porcel <nicolasporcel06@...il.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
>  sound/soc/intel/boards/byt-max98090.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/intel/boards/byt-max98090.c b/sound/soc/intel/boards/byt-max98090.c
> index d9f81b8d915d..a6e57d95c1e2 100644
> --- a/sound/soc/intel/boards/byt-max98090.c
> +++ b/sound/soc/intel/boards/byt-max98090.c
> @@ -67,13 +67,13 @@ static struct snd_soc_jack_pin hs_jack_pins[] = {
>
>  static struct snd_soc_jack_gpio hs_jack_gpios[] = {
>         {
> -               .name           = "hp-gpio",
> +               .name           = "byt_max98090",
>                 .idx            = 0,
>                 .report         = SND_JACK_HEADPHONE | SND_JACK_LINEOUT,
>                 .debounce_time  = 200,
>         },
>         {
> -               .name           = "mic-gpio",
> +               .name           = "byt_max98090",
>                 .idx            = 1,
>                 .invert         = 1,
>                 .report         = SND_JACK_MICROPHONE,
> --
> 2.13.0.506.g27d5fe0cd-goog
>
>
> --
> Dmitry



-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ