From patchwork Thu Dec 14 13:15:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13493034 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="foP7ko3I" Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0404121 for ; Thu, 14 Dec 2023 05:15:45 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2ca02def690so103151841fa.3 for ; Thu, 14 Dec 2023 05:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702559744; x=1703164544; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XFPvhE2TfppE4P1yrXLwpu8QNBSRgd4h1Csi59de14s=; b=foP7ko3IO8DAwAEYc7zmB+sgmK2URm0gvDRkYZWcMLD9Yewh0axNzZfuh4vfILZh5D TrTBeeQhFZsDqIvLFqjN0J0LrbJprsemLgoMg1PMWpo9cBPxfWHAe1qMn0IY1kV7xl3I TlqZtyKgJ/DxkqwvzNpoQXofQ0LdtxS1NoYYzoO68iu0SqFvF/Cm7d/hpRCMd8Leutkm mhCgsoPTb+lmSB4NDA7HoIgIbiB2Uv8qdJPXBa7ouf1i+oRL5VrD/Ap6F4CLaMT5jiyL DI36RHi+M9w1qUFKWllQ53nkN7FHvdLesrYaKnJ4zFktZmgl8BBN1EVcdwcFHSpPi9Hx H0JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702559744; x=1703164544; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XFPvhE2TfppE4P1yrXLwpu8QNBSRgd4h1Csi59de14s=; b=Ed2AvjdlWr80UHesE0/d0LGJFUeVNnfr6TqqFwh4vJEgQUcDvfGbn9QU58aob/q+N/ 3V4WcOcUTxxwLHMhfalKPMAXzGncbtuS0nSNghxsCO0XE6+UrrR/ADoeLKmhS9eiiLbb b1I1IIEBJzRlTAHmpak6/nxrxL8NdSzQrdOm0zZXOee/tsigsTT3ceWcs0ar37S3GLkM xvqyrZS5M5FWfgiNlkjnQwQ8RFQVHLd+qt7KEqXZEtM73XHpCidIQVVZEJe9bVIlbI9S kXRfyWHNJftZZzxKiKcvkmmK0zAUNKwGyF4y21C5IvWjIeg6e2Gajl3SucCHExYeB4O0 xSgQ== X-Gm-Message-State: AOJu0Yz7bHy6gw51EQv7OQi/zQIfLbEBqfTSnwiTZfiaXFnpcHNvAEzm mr5kpVJ7oJn/M2r2SZgdII6fbQ== X-Google-Smtp-Source: AGHT+IFZ57yYzKJ7lhsSP4PBKVG28nM00flMj6xzVKrNm2pHPIBAti0LYIyzlqr3hZAxbG5Uc+OLtQ== X-Received: by 2002:a05:651c:88b:b0:2cc:1c75:3494 with SMTP id d11-20020a05651c088b00b002cc1c753494mr5912328ljq.55.1702559744240; Thu, 14 Dec 2023 05:15:44 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id p23-20020a2e93d7000000b002ca02ceae84sm2080478ljh.83.2023.12.14.05.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:15:43 -0800 (PST) From: Linus Walleij Date: Thu, 14 Dec 2023 14:15:42 +0100 Subject: [PATCH 1/4] ASoC: hisilicon: Drop GPIO include Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231214-gpio-descriptors-sound-misc-v1-1-e3004176bd8b@linaro.org> References: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> In-Reply-To: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Srinivas Kandagatla , Banajit Goswami , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter Cc: linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.4 This driver is including the legacy GPIO header but not using any symbols from it. Drop the include. Signed-off-by: Linus Walleij --- sound/soc/hisilicon/hi6210-i2s.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/hisilicon/hi6210-i2s.c b/sound/soc/hisilicon/hi6210-i2s.c index dd7d2a077248..250ae3781d14 100644 --- a/sound/soc/hisilicon/hi6210-i2s.c +++ b/sound/soc/hisilicon/hi6210-i2s.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include From patchwork Thu Dec 14 13:15:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13493035 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TL8ajCZl" Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10400125 for ; Thu, 14 Dec 2023 05:15:47 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c9f099cf3aso121163461fa.1 for ; Thu, 14 Dec 2023 05:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702559745; x=1703164545; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Zl/2P+gDfIp0TQYPTG0vKiGyNkTIQEmbjw6ExQX0Pf0=; b=TL8ajCZl/2yefj7BwasT5VYrfRFUzgKpwg5OTH4JBluvoKED4AGmviQdoBslouEie8 tk1Iz3U7aG4QCHTIuBU4ORNnJyk0kZs0QB72LuDolmWF6d07hbJhrq0qUGB460X93bWc lRBlpkKbpomhkMhMTMzXvRiQjURgNSw6MLL582wkFnpRNgZIywM2hmLjzUyS9iHLkLUw 8Bsv277sXbLLNHJKsFM2cHw5SUCFY97qfCNth2DRvDAhl1VYeKJAyNE9HesNabOZgB/m QX1o110arehY/3HMUp2izvt0sjqsrGW163gFdMdeSoLIC4JsZ4wJbHcjcrrVmmkmiyXW Wo9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702559745; x=1703164545; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zl/2P+gDfIp0TQYPTG0vKiGyNkTIQEmbjw6ExQX0Pf0=; b=WAV8FMpYExJsYBgowIKtCpOSGPu2S9AQos4fMqZhh53A1UqNk+uiR8wdJn/WRdxq1q i0vuWsI7j06TP5CUILE+1DmfcIviOQNEQPlNY7eNhpoBoz1mglCCoyRflUglVzem61Vw OUgAJRCiE0tFI/gCKJIOnoGh52R5Mu2UqoCMwThIExWbjVebp6TQIoHhvTkOTl1TDNDL H+rAvKTU7Afnso4ygIAPxVjtd9kgwGlXlEmAjc1wS6m0fsz6r6N3zp/PhHm5HlveVRIY wysmj+tuJS0jOutv7UMjQHzyT6xIV2ga+Eu8lBKbuxlOVtP5AFX+EGZNslI/mI6u82F4 DluQ== X-Gm-Message-State: AOJu0YyUqZveCoQjpJ4+xeAHXFCpJvUyBMWdjovNm1Tlf52yhtPV6SU1 TEaUGerm0o3WXgmJ0N7lvVuHdA== X-Google-Smtp-Source: AGHT+IGLIizoYzjhcP0yvk0sz4u3yPAe8upgnxL+cRqGZY/tUMOhZBAjkVQRfIg1sZ28AJa+AoI7CQ== X-Received: by 2002:a05:651c:110:b0:2ca:f17:dd69 with SMTP id a16-20020a05651c011000b002ca0f17dd69mr4501498ljb.43.1702559745303; Thu, 14 Dec 2023 05:15:45 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id p23-20020a2e93d7000000b002ca02ceae84sm2080478ljh.83.2023.12.14.05.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:15:44 -0800 (PST) From: Linus Walleij Date: Thu, 14 Dec 2023 14:15:43 +0100 Subject: [PATCH 2/4] ASoC: qcom: sc7180: Drop GPIO include Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231214-gpio-descriptors-sound-misc-v1-2-e3004176bd8b@linaro.org> References: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> In-Reply-To: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Srinivas Kandagatla , Banajit Goswami , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter Cc: linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.4 This driver is including the legacy GPIO header but not using any symbols from it. Drop the include. Signed-off-by: Linus Walleij --- sound/soc/qcom/sc7180.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c index b0320a74d508..4ab34a8842ce 100644 --- a/sound/soc/qcom/sc7180.c +++ b/sound/soc/qcom/sc7180.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include From patchwork Thu Dec 14 13:15:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13493036 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="su7N3UpM" Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0577010E for ; Thu, 14 Dec 2023 05:15:48 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2cc2683fdaaso6058551fa.0 for ; Thu, 14 Dec 2023 05:15:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702559746; x=1703164546; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kaGgexboX4k3Qc2D4NNTwm8nzl2s41MzL85I6McymUo=; b=su7N3UpMp+efYxbAVa1yVW//zVuEj1rkhXGscfwGW83UN4eblt9NBFdt3+rG5ak0mJ vIAXrj/zrA0R2x2R1fTLF+RlggXr+HR3v7xx0ryHMNmeFDQ4UGnHNadmbWqz4hRD2ds8 272GDCEny7oduCYv7Lhrou5ifQto5ev5TZPsdv2ophdxDbJqIabkGo2RhQiHN6ueiaOY 1HiMUQ9zBIvMNWV6xq/5CNJ8371N5VZ869bCCA6ZSiCRwuGUN2zkT4JQWtAaMAs8x90g 3ALC0aqM08pRzv7mjIZtzjGneLZvleIdiLRpwlKw10RenRf9okVRPocxLqlOK/0lbwIc OPQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702559746; x=1703164546; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kaGgexboX4k3Qc2D4NNTwm8nzl2s41MzL85I6McymUo=; b=cNGR5Me5efQG6RRBizjHMr713izvAKlmBl4mwyjEV0mVA+g6hVopXfgTFz7EAG/zC1 JwxkXDkBpj8eWOE9UMwnJ8vhdDZcss6dJIFHc1tYGzVJKUUqLBZO+2J4TtTsqVIEDtHn NFhNYLRaOFLWPj0MhdxDcMcgxV9Xz4f31wjpLr2OCOyC+FfM4Y5/Is0fhjOeXvX9LVva HFB/DL1XRYINh0uhIH7eU/RFrqs2DAaRJWl+O89y5+yf0r4BH7NWwCLAtRha568MZHwK hKeL3n1lgJgWj7nZWqsaSeLe3sFiatekR7ou6zn1hik/4o9JjI8H4H1nT2AKzYog3wIT 16/A== X-Gm-Message-State: AOJu0YxSSCiKaYBFl/8bohRcIDY/3YzL6rmHS0haxZGYiW9rA+WZYZYB LOKpxILp6hirc+mn1LVdb1tJbQ== X-Google-Smtp-Source: AGHT+IGYhdO0R6QYJVwI+mlxYKJRdlAEgaRgJbuekhSlydk1uvqpHt6BYffRJ/9o8BrX6Te5MxGJTQ== X-Received: by 2002:a2e:6e13:0:b0:2ca:207:d214 with SMTP id j19-20020a2e6e13000000b002ca0207d214mr5679117ljc.12.1702559746426; Thu, 14 Dec 2023 05:15:46 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id p23-20020a2e93d7000000b002ca02ceae84sm2080478ljh.83.2023.12.14.05.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:15:45 -0800 (PST) From: Linus Walleij Date: Thu, 14 Dec 2023 14:15:44 +0100 Subject: [PATCH 3/4] ASoC: simple-card-utils: Drop GPIO include Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231214-gpio-descriptors-sound-misc-v1-3-e3004176bd8b@linaro.org> References: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> In-Reply-To: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Srinivas Kandagatla , Banajit Goswami , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter Cc: linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.4 The generic card utilities are including the legacy GPIO header but not using any symbols from it. Drop the include from all files. Signed-off-by: Linus Walleij Acked-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 1 - sound/soc/generic/audio-graph-card2.c | 1 - sound/soc/generic/simple-card-utils.c | 1 - 3 files changed, 3 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 76a9f1e8cdd5..83e3ba773fbd 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 7146611df730..b0a5a9357c76 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -8,7 +8,6 @@ // based on ${LINUX}/sound/soc/generic/audio-graph-card.c #include #include -#include #include #include #include diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index cfa70a56ff0f..2f2280342e2a 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -5,7 +5,6 @@ // Copyright (c) 2016 Kuninori Morimoto #include -#include #include #include #include From patchwork Thu Dec 14 13:15:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13493037 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dujYVbOc" Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CFEE12A for ; Thu, 14 Dec 2023 05:15:49 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2cc259392a6so56597771fa.2 for ; Thu, 14 Dec 2023 05:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702559747; x=1703164547; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GhFLd4CPtXm/YF25BMgLtgk+3dv0PmLn7A52Lhi5STs=; b=dujYVbOcmdAmGSIJiC8cEw3liMRlA/6252CqxtduWcDTKvgHgytgHw/aOkfFjwcBv/ Sfyqbrrt10HGrLgqt7aVfIyonXf/NMtXzuiAa8FXZfjrfTE9MZjkhV/6STe5Wm291OjZ oVdDHDYDufhOgZq6ncQp4dfZKF2IBVTsYAKq9+1O+Jq0TARukkX55AjxZHSSB/DKFnlE HFgGxlrRxXqeFltm5vBx4uy6f8rPVlSWkx8PDsPmBjtB9xZpbIXrDZJIqLtgn23bbrGH lDgm8KzMjmSWqkk+k3MhkS4A5abndIHdCSsfljQds45Fwr4gbSkRLFIAdDfVlC10gnEJ JYkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702559747; x=1703164547; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GhFLd4CPtXm/YF25BMgLtgk+3dv0PmLn7A52Lhi5STs=; b=Zjm0pozfJO7kacmNcscirxx8xOp3bcEppEMYzj+LO533+qMc0JX+2Gfn3Hesmw876w 8ZNAm2TiSKTEiwxCB1r9t+ZIheL86Xd815UgI9jKtDZAQETDyglqSIpLYlT+a5aglx/K UY4oyKQmY2S3We9rKoU8xkfHmFkOWSxvSM6isLSIvL9SPTGLCTU80iCguynF16S4rj1c 3wh9YyRt033Gj1/E8EDTHfvKcJkN5qcfabZAH5sWVMm6hgfTYR5YDcMkgq9555wHVW3B BVxbytG+EwvjrVIlU0RXW6CkDrGde9utWsrUxTflsdT0zRA1jSGLuCv3ftpKQcHQmF8f zWSA== X-Gm-Message-State: AOJu0YyNZteAKxxdz86b09TnyjOn/UroyBBZFzh6HsDZxUx/wetdKdTG HTPntEOpffy0gg5uMY38oVGH+w== X-Google-Smtp-Source: AGHT+IGq3Eh0v9BtGBtOlHuwDYZzfJD+n+q/wtn0mvU9Vj1OSw4Alx/PDq6ZFZ1HgX3LajGeYwBYdA== X-Received: by 2002:a2e:bcd1:0:b0:2cc:2b21:6fc7 with SMTP id z17-20020a2ebcd1000000b002cc2b216fc7mr3288644ljp.88.1702559747394; Thu, 14 Dec 2023 05:15:47 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id p23-20020a2e93d7000000b002ca02ceae84sm2080478ljh.83.2023.12.14.05.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:15:47 -0800 (PST) From: Linus Walleij Date: Thu, 14 Dec 2023 14:15:45 +0100 Subject: [PATCH 4/4] ASoC: tegra: tegra20_ac97: Convert to use GPIO descriptors Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231214-gpio-descriptors-sound-misc-v1-4-e3004176bd8b@linaro.org> References: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> In-Reply-To: <20231214-gpio-descriptors-sound-misc-v1-0-e3004176bd8b@linaro.org> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Srinivas Kandagatla , Banajit Goswami , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter Cc: linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.4 The Tegra20 AC97 driver is using the legacy GPIO APIs in and to obtain GPIOs for reset and sync. Convert it over and fix the polarity error on the RESET line in the process: this reset line is clearly active low. Just fix the one in-tree device tree site using it at the same time. Signed-off-by: Linus Walleij --- If people demand that the DTS oneliner be submitted and merged separately then I can do so. (I personally think that is too much focus on process over content.) --- arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi | 2 +- sound/soc/tegra/tegra20_ac97.c | 55 +++++++++++++-------------- sound/soc/tegra/tegra20_ac97.h | 4 +- 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi b/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi index 16b374e6482f..8c1d5c9fa483 100644 --- a/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi +++ b/arch/arm/boot/dts/nvidia/tegra20-colibri.dtsi @@ -446,7 +446,7 @@ lvp0 { tegra_ac97: ac97@70002000 { status = "okay"; nvidia,codec-reset-gpio = - <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_HIGH>; + <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_LOW>; nvidia,codec-sync-gpio = <&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>; }; diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index e713feca25fa..8011afe93c96 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -12,12 +12,11 @@ #include #include #include -#include +#include #include #include #include #include -#include #include #include #include @@ -39,11 +38,15 @@ static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97) u32 readback; unsigned long timeout; - /* reset line is not driven by DAC pad group, have to toggle GPIO */ - gpio_set_value(workdata->reset_gpio, 0); + /* + * The reset line is not driven by DAC pad group, have to toggle GPIO. + * The RESET line is active low but this is abstracted by the GPIO + * library. + */ + gpiod_set_value(workdata->reset_gpio, 1); udelay(2); - gpio_set_value(workdata->reset_gpio, 1); + gpiod_set_value(workdata->reset_gpio, 0); udelay(2); timeout = jiffies + msecs_to_jiffies(100); @@ -66,14 +69,10 @@ static void tegra20_ac97_codec_warm_reset(struct snd_ac97 *ac97) * the controller cmd is not working, have to toggle sync line * manually. */ - gpio_request(workdata->sync_gpio, "codec-sync"); - - gpio_direction_output(workdata->sync_gpio, 1); - + gpiod_direction_output(workdata->sync_gpio, 1); udelay(2); - gpio_set_value(workdata->sync_gpio, 0); + gpiod_set_value(workdata->sync_gpio, 0); udelay(2); - gpio_free(workdata->sync_gpio); timeout = jiffies + msecs_to_jiffies(100); @@ -342,28 +341,26 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) goto err_clk_put; } - ac97->reset_gpio = of_get_named_gpio(pdev->dev.of_node, - "nvidia,codec-reset-gpio", 0); - if (gpio_is_valid(ac97->reset_gpio)) { - ret = devm_gpio_request_one(&pdev->dev, ac97->reset_gpio, - GPIOF_OUT_INIT_HIGH, "codec-reset"); - if (ret) { - dev_err(&pdev->dev, "could not get codec-reset GPIO\n"); - goto err_clk_put; - } - } else { - dev_err(&pdev->dev, "no codec-reset GPIO supplied\n"); - ret = -EINVAL; + /* Obtain RESET de-asserted */ + ac97->reset_gpio = devm_gpiod_get(&pdev->dev, + "nvidia,codec-reset", + GPIOD_OUT_LOW); + if (IS_ERR(ac97->reset_gpio)) { + ret = PTR_ERR(ac97->reset_gpio); + dev_err(&pdev->dev, "no RESET GPIO supplied: %d\n", ret); goto err_clk_put; } - - ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node, - "nvidia,codec-sync-gpio", 0); - if (!gpio_is_valid(ac97->sync_gpio)) { - dev_err(&pdev->dev, "no codec-sync GPIO supplied\n"); - ret = -EINVAL; + gpiod_set_consumer_name(ac97->reset_gpio, "codec-reset"); + + ac97->sync_gpio = devm_gpiod_get(&pdev->dev, + "nvidia,codec-sync", + GPIOD_OUT_LOW); + if (IS_ERR(ac97->sync_gpio)) { + ret = PTR_ERR(ac97->sync_gpio); + dev_err(&pdev->dev, "no codec-sync GPIO supplied: %d\n", ret); goto err_clk_put; } + gpiod_set_consumer_name(ac97->sync_gpio, "codec-sync"); ac97->capture_dma_data.addr = mem->start + TEGRA20_AC97_FIFO_RX1; ac97->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; diff --git a/sound/soc/tegra/tegra20_ac97.h b/sound/soc/tegra/tegra20_ac97.h index 870ea09ff301..116d7b2db27e 100644 --- a/sound/soc/tegra/tegra20_ac97.h +++ b/sound/soc/tegra/tegra20_ac97.h @@ -80,7 +80,7 @@ struct tegra20_ac97 { struct snd_dmaengine_dai_dma_data playback_dma_data; struct reset_control *reset; struct regmap *regmap; - int reset_gpio; - int sync_gpio; + struct gpio_desc *reset_gpio; + struct gpio_desc *sync_gpio; }; #endif /* __TEGRA20_AC97_H__ */