From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: [PATCH] ASoC: Intel: byt-max98090 Fix GPIOs lookup Date: Fri, 9 Jun 2017 09:50:17 -0700 Message-ID: <20170609165017.GA2612@dtor-ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by alsa0.perex.cz (Postfix) with ESMTP id 7070326765B for ; Fri, 9 Jun 2017 18:50:21 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id u26so9094242pfd.2 for ; Fri, 09 Jun 2017 09:50:21 -0700 (PDT) Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Nicolas Porcel , Takashi Iwai , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org From: Nicolas Porcel 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. Signed-off-by: Nicolas Porcel Signed-off-by: Dmitry Torokhov --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825AbdFIQuV (ORCPT ); Fri, 9 Jun 2017 12:50:21 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35477 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751645AbdFIQuU (ORCPT ); Fri, 9 Jun 2017 12:50:20 -0400 Date: Fri, 9 Jun 2017 09:50:17 -0700 From: Dmitry Torokhov To: Liam Girdwood , Mark Brown Cc: Jaroslav Kysela , Takashi Iwai , Nicolas Porcel , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: Intel: byt-max98090 Fix GPIOs lookup Message-ID: <20170609165017.GA2612@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Porcel 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. Signed-off-by: Nicolas Porcel Signed-off-by: Dmitry Torokhov --- 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