Message ID | 20231006-descriptors-asoc-mediatek-v1-1-07fe79f337f5@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp342800vqo; Fri, 6 Oct 2023 06:47:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnDSfRS69qFXrLzcm62DPYqkNGqi7bGtNz5vTJn6tcnJieNYz2C2ORbOYHukLL488ZltAM X-Received: by 2002:a05:6358:440a:b0:135:3f5c:9675 with SMTP id z10-20020a056358440a00b001353f5c9675mr8590812rwc.19.1696600050370; Fri, 06 Oct 2023 06:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696600050; cv=none; d=google.com; s=arc-20160816; b=gVvxrjN1etMnwPL4vQtvX/GiV9ORthoghuxJqa1jRdgo3CreVMMOkEeJtMnpoDdkvP 8M0/XI5gJdpZk0545IBAoDDaBejSaAP9yL/NWdTZ7P2hcSffYQytel0A7jjXB5wYVTIj q1aFYGdYbDLK35CRL8L1TI4S2hjEvVfPOkYsVuSVInUcFfanGpcNMh6UHoPf00dK/pXq DLbNYy3q8P3QVdLopoUig+ZeT7iIzjK3X4BRoujqo/ZMDvhTZZR1SWGUNo889HvX16fu 8c1Mjt11Txmo/ZwpUJ3wPbyN9NmhYHX/QJSnpVOfqh6x5EJ1LzUcAev8mxl6GAYyaQ7W u6MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=tcctjBppf75NLO6YkO8Pl2INJRmj2vKxlHT5saQtZoY=; fh=9EmQy3nV+j7AYsabaDMwbPlRU7+uz1cdK9KYarw9f+c=; b=ViKr/JUWuwGgnPHJh0SeUPIhAheObtW5hDsngoU0XSKPVlllppgkSAeSem8A1lI0p7 HK5wOm5V0uwqwTiZiqLhsdjgx9B0wgqugHopEbXetT0Hpu98KSlAAJNHFSMPFRBS2y60 G45zXrvh6XgIRUqcKYUTZ52NB/TnADqIhoxqp1O66uz9WKXAQkB+Z3wrhRJFdI9sMTsD QksfB5zAo4n01hD40oKzm1c+R++1tZ2zwvTidjeQHAZR2W/+Dve4vZho0Cj5hHMftGpA O48kgBMGGehL52d7KDlc0ofSRLfPojnuzOVOQ/fV34UH0pYA7Isl7x81Je4IlLE0Y2Gm wDEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hRK0p2q2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ot10-20020a17090b3b4a00b002747b95c23bsi6343136pjb.110.2023.10.06.06.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 06:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hRK0p2q2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5FC99805DC05; Fri, 6 Oct 2023 06:47:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232679AbjJFNrW (ORCPT <rfc822;ezelljr.billy@gmail.com> + 18 others); Fri, 6 Oct 2023 09:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232630AbjJFNrB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Oct 2023 09:47:01 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCA6710DF for <linux-kernel@vger.kernel.org>; Fri, 6 Oct 2023 06:46:29 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-503065c4b25so2863749e87.1 for <linux-kernel@vger.kernel.org>; Fri, 06 Oct 2023 06:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696599988; x=1697204788; 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=tcctjBppf75NLO6YkO8Pl2INJRmj2vKxlHT5saQtZoY=; b=hRK0p2q2Otfu7EV7elnz3NxGfz9KHGd+rELPh3AuB2i64zooZwg5dFVWa3hA+7u/1T zD/80o/Tg3wSuJBWchmNFkXCyYdAey/4Haj5ynazlk2cHsWWF9lbE3o2sby4/ztiT6U4 1+5aIGjrAGdVCagXzFAvnNT9bqOgeoJZ78QxGqUIt6bLWZLkaye8zA/hfPYvnNLzRmVM awIwLG6NwvtKMbq+Iwv1LwoHiyq1TwGdmm7+B3c2WNLBGfO7r0NLh+xFfGZmgE0Hbnw2 T+yi34V8IJYqybhPn67BZmXRcadOpbUGY/3il2uuKMhyrsbFo5BP6bN9UWeKuXShiXuZ D6xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696599988; x=1697204788; 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=tcctjBppf75NLO6YkO8Pl2INJRmj2vKxlHT5saQtZoY=; b=awcxoLqHrPYWNCS1sk6T/p2xzAatkw5h+d21iPpFv7ogSyXC/INHRq8BoU/ka4HROy s3SLDCKS+cKWhI2HonRYP3I0R7CdFmKQN5g7UaLcikrVCWu8RPJb7qOYHxFK2iJYo1Ch vYePmErkEvszOm/y/RPwWVu98SrspgcpGuvjWPLmKV4hs2+qpidQrRCxakwfdcdf4G5V av5lLnfsmLVZdIYU7EHIkROZMBQ8d7WgOY99F+jTvi88m8MmLFn4yoz9miSTvAyGIR/6 ActZ5+Pk9gVyn/HEzeBwPEOywCctwP8Q5YaZZ3YNliOtpHu3YgL4kFCRQJ9flJEV3wHG eT6A== X-Gm-Message-State: AOJu0YyQG20WOt2GJB1ZjUhC+TU5z/t1ot5ha1lQetUEgblYSB20gLWM ej+aMBZXf8xhRSYB7uKj4iiOug== X-Received: by 2002:ac2:5f62:0:b0:4fe:5860:7abf with SMTP id c2-20020ac25f62000000b004fe58607abfmr5744253lfc.13.1696599988003; Fri, 06 Oct 2023 06:46:28 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v25-20020a197419000000b004fe37199b87sm308733lfe.156.2023.10.06.06.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 06:46:27 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Fri, 06 Oct 2023 15:46:24 +0200 Subject: [PATCH 1/8] gpiolib: of: Add quirk for mt2701-cs42448 ASoC sound MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231006-descriptors-asoc-mediatek-v1-1-07fe79f337f5@linaro.org> References: <20231006-descriptors-asoc-mediatek-v1-0-07fe79f337f5@linaro.org> In-Reply-To: <20231006-descriptors-asoc-mediatek-v1-0-07fe79f337f5@linaro.org> To: Bartosz Golaszewski <brgl@bgdev.pl>, Andy Shevchenko <andy@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, alsa-devel@alsa-project.org, Linus Walleij <linus.walleij@linaro.org> X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 06 Oct 2023 06:47:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779014094305852013 X-GMAIL-MSGID: 1779014094305852013 |
Series |
Convert Mediatek ASoC codecs to use GPIO descriptors
|
|
Commit Message
Linus Walleij
Oct. 6, 2023, 1:46 p.m. UTC
These gpio names are due to old DT bindings not following the
"-gpio"/"-gpios" conventions. Handle it using a quirk so the
driver can just look up the GPIOs.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpio/gpiolib-of.c | 4 ++++
1 file changed, 4 insertions(+)
Comments
On Fri, Oct 6, 2023 at 3:46 PM Linus Walleij <linus.walleij@linaro.org> wrote: > > These gpio names are due to old DT bindings not following the > "-gpio"/"-gpios" conventions. Handle it using a quirk so the > driver can just look up the GPIOs. > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > drivers/gpio/gpiolib-of.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c > index 531faabead0f..d9525d95e818 100644 > --- a/drivers/gpio/gpiolib-of.c > +++ b/drivers/gpio/gpiolib-of.c > @@ -512,6 +512,10 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, > #if IS_ENABLED(CONFIG_SND_SOC_CS42L56) > { "reset", "cirrus,gpio-nreset", "cirrus,cs42l56" }, > #endif > +#if IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448) > + { "i2s1-in-sel-gpio1", NULL, "mediatek,mt2701-cs42448-machine" }, > + { "i2s1-in-sel-gpio2", NULL, "mediatek,mt2701-cs42448-machine" }, > +#endif > #if IS_ENABLED(CONFIG_SND_SOC_TLV320AIC3X) > { "reset", "gpio-reset", "ti,tlv320aic3x" }, > { "reset", "gpio-reset", "ti,tlv320aic33" }, > > -- > 2.34.1 > I suppose this is a run-time dependency only for the other patches? Can I just pick it up into my tree? Bart
On Mon, Oct 9, 2023 at 9:09 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > +#if IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448) > > + { "i2s1-in-sel-gpio1", NULL, "mediatek,mt2701-cs42448-machine" }, > > + { "i2s1-in-sel-gpio2", NULL, "mediatek,mt2701-cs42448-machine" }, > > +#endif > > I suppose this is a run-time dependency only for the other patches? > Can I just pick it up into my tree? You can, I was just thinking about bisectability and the low risk of collisions with other patches. (Actually no-one gets hurt if it's applied to both trees either, which IMO is perfectly fine in cases like this.) Yours, Linus Walleij
Il 06/10/23 15:46, Linus Walleij ha scritto: > These gpio names are due to old DT bindings not following the > "-gpio"/"-gpios" conventions. Handle it using a quirk so the > driver can just look up the GPIOs. > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On Mon, Oct 9, 2023 at 9:33 AM Linus Walleij <linus.walleij@linaro.org> wrote: > > On Mon, Oct 9, 2023 at 9:09 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > +#if IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448) > > > + { "i2s1-in-sel-gpio1", NULL, "mediatek,mt2701-cs42448-machine" }, > > > + { "i2s1-in-sel-gpio2", NULL, "mediatek,mt2701-cs42448-machine" }, > > > +#endif > > > > I suppose this is a run-time dependency only for the other patches? > > Can I just pick it up into my tree? > > You can, I was just thinking about bisectability and the low risk of collisions > with other patches. (Actually no-one gets hurt if it's applied to both trees > either, which IMO is perfectly fine in cases like this.) > Nah, Stephen Rothwell will auto-yell at you for that. I'm fine either way. Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> If we get any conflicts in next, then we'll deal with it with immutable tags. Bart
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 531faabead0f..d9525d95e818 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -512,6 +512,10 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, #if IS_ENABLED(CONFIG_SND_SOC_CS42L56) { "reset", "cirrus,gpio-nreset", "cirrus,cs42l56" }, #endif +#if IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448) + { "i2s1-in-sel-gpio1", NULL, "mediatek,mt2701-cs42448-machine" }, + { "i2s1-in-sel-gpio2", NULL, "mediatek,mt2701-cs42448-machine" }, +#endif #if IS_ENABLED(CONFIG_SND_SOC_TLV320AIC3X) { "reset", "gpio-reset", "ti,tlv320aic3x" }, { "reset", "gpio-reset", "ti,tlv320aic33" },