From patchwork Mon Oct 2 14:00:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 729743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBAB7E7C4F4 for ; Thu, 5 Oct 2023 07:49:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0568AE0F; Thu, 5 Oct 2023 09:49:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0568AE0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696492191; bh=lx526Rcn15uO715tPiN6irOnrYwVf8b0ODwF1k/aBNA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=B/E/PYyRNEKXNgAzqakSIg2cipg9h51ELDAs0gnhC44HfwXiK3LJbXoHVbPMVYA4o MGV/9wwp2gHH4sPhIp8AkvWzUvVO3/OaWfp9m0cSx4NJRlh8VjLE5vyhNLYL8z7L0v 9UAcLaQliMMC1l1lp07ouJ6nM/2gBbNHNbRRXCK0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38FF7F805CA; Thu, 5 Oct 2023 09:47:03 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 64299F805C6; Thu, 5 Oct 2023 09:47:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4BB27F80549; Mon, 2 Oct 2023 16:00:22 +0200 (CEST) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 56D56F801EB for ; Mon, 2 Oct 2023 16:00:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 56D56F801EB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=fairphone.com header.i=@fairphone.com header.a=rsa-sha256 header.s=fair header.b=fGTt31vw Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-522bd411679so21667777a12.0 for ; Mon, 02 Oct 2023 07:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1696255215; x=1696860015; darn=alsa-project.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=OHDvd7zBG9q3cQ18ekHgB5reLeuG+/B7KcSObggrkM4=; b=fGTt31vwTuNzEFyMsN2MMZXewXpzTHv9C5oE/ihEoASqqpwjI3ftl35zsqfXEvBtmp tYXkrmy7s8AptAqkUX8nBr5BG9Pvz2Xns/7giyYSt1RLaGb2IwbwNPx9TISthh45l0tN BycedhELkAdb4afxQNn5OWcNg1ZYxKxQZMfl/c5djU5YORoLtYh+dNIs3Sjx4vo4za7B 5LdUzr0KJsrJwGaZMeg4mbEJlS35/C/wy4n/IAiYliDSxhx6J3GxFHzA6e8lLKRLTZtq QDZ7frxH29xIWqbyutj5gWCiNWrKccPZhCtDn2QRTnn43WPHzePnnCIolSUD0m2auBpX lfRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696255215; x=1696860015; 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=OHDvd7zBG9q3cQ18ekHgB5reLeuG+/B7KcSObggrkM4=; b=BcRQZIaF12pPV3ORg0uwu0wophzrJm0asKo+NQcqQLjDz9LOrKBLuhPLmdMVizCl0D ztAmGf3xPXm4dAshk9o7K9YidRRt8NkOBTXxtr6xIV+J4xEphVbmOb4/9bqdeIaeFtxU GkO4HiTAbcMXFLb3fKkp7Q6X8ukT1DvjMQ9zOxaLICjDOulHZzcHrUa1a1ShWen2h06u NoqibCNrY/0d9BQbNupAL2XFy8H1XU5oy5rtbn29BNCCRiqmUGVZkN9jiiJihWsYlAsD 5n6wZq/G46hdYqYvf2VIJYS6S1+DfeeLB1/7JCTLdMWNqeT2CSjzehMy38v6sNraeaxj ZElA== X-Gm-Message-State: AOJu0YxTY6zD1K6M6qL2kTTTJ9S27dS6y1WXe8mRVGqolrx5Uzv/9NUR QYtvpjiiPEfUHsb9Df9hOPZ6rA== X-Google-Smtp-Source: AGHT+IEqousXbP5TTb7EJHs1BpXBUU8/Elaw2Sux5vGT5VflP/hLFD6ub63JjLQUdQbLqXFQKsz1/Q== X-Received: by 2002:a05:6402:160b:b0:531:3e89:1bef with SMTP id f11-20020a056402160b00b005313e891befmr10451516edv.32.1696255215247; Mon, 02 Oct 2023 07:00:15 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id q13-20020a056402518d00b005346925a474sm9350377edd.43.2023.10.02.07.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:00:14 -0700 (PDT) From: Luca Weiss Date: Mon, 02 Oct 2023 16:00:11 +0200 Subject: [PATCH v2 1/2] ASoC: dt-bindings: awinic,aw88395: Remove reset-gpios from AW88261 MIME-Version: 1.0 Message-Id: <20231002-aw88261-reset-v2-1-837cb1e7b95c@fairphone.com> References: <20231002-aw88261-reset-v2-0-837cb1e7b95c@fairphone.com> In-Reply-To: <20231002-aw88261-reset-v2-0-837cb1e7b95c@fairphone.com> To: Weidong Wang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.3 X-MailFrom: luca.weiss@fairphone.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 7V4CJM6D7AXKYA4VLD24EITDFZHHH7BG X-Message-ID-Hash: 7V4CJM6D7AXKYA4VLD24EITDFZHHH7BG X-Mailman-Approved-At: Thu, 05 Oct 2023 07:46:48 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The AW88261 chip doesn't have a reset GPIO, so disallow providing reset-gpios. At the same time also don't keep reset-gpios required for AW88395. This is both because the Linux driver has it optional, and it also simplifies the bindings by not introducing another conditional. Signed-off-by: Luca Weiss --- .../devicetree/bindings/sound/awinic,aw88395.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml index b977d3de87cb..5d5ebc72b721 100644 --- a/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml +++ b/Documentation/devicetree/bindings/sound/awinic,aw88395.yaml @@ -14,9 +14,6 @@ description: digital Smart K audio amplifier with an integrated 10.25V smart boost convert. -allOf: - - $ref: dai-common.yaml# - properties: compatible: enum: @@ -49,9 +46,20 @@ required: - compatible - reg - '#sound-dai-cells' - - reset-gpios - awinic,audio-channel +allOf: + - $ref: dai-common.yaml# + - if: + properties: + compatible: + contains: + enum: + - awinic,aw88261 + then: + properties: + reset-gpios: false + unevaluatedProperties: false examples: From patchwork Mon Oct 2 14:00:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 730361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E45CBE7C4F5 for ; Thu, 5 Oct 2023 07:50:14 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7481DE8C; Thu, 5 Oct 2023 09:49:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7481DE8C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696492212; bh=Lggg5nbr+SKWGNTpzIAEW1LdB4HogGldXRsskFy9K3k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=SE0sXlNmEko2fnrXOX7L8JhaWWf6RY8iedPjYP3D0HlqSEB866G53XuB2ZBcYR1uM ynzy1nhMKdMoVajD4XqltlCLdwiYganrx4T5b8V62scwf7+CvkhFD6Ynq+F5qapxfw rQN1ur6hWNKd7PBO4T0AGViV6IBbwSvDobwm8fMg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 94461F805D5; Thu, 5 Oct 2023 09:47:09 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 82978F805D5; Thu, 5 Oct 2023 09:47:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 673F8F8047D; Mon, 2 Oct 2023 16:00:24 +0200 (CEST) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 699F9F802E8 for ; Mon, 2 Oct 2023 16:00:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 699F9F802E8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=fairphone.com header.i=@fairphone.com header.a=rsa-sha256 header.s=fair header.b=4moJ2ROU Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-503065c4b25so25296366e87.1 for ; Mon, 02 Oct 2023 07:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1696255216; x=1696860016; darn=alsa-project.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=V2/riLchQZtPTs/BC596zGkjlTIrNRPztVzIEa24L10=; b=4moJ2ROUTfR5M5PSorcosgfzoakqYBeelYE62EBBnNFWnuM9QIgJdDocpk4uGHKuxE Y5gIlsKs6vrxfsIVD5MGThcT6fgk6O+s/J+FyXHdLRnfBJmsmyvtSKIVlX+BzCCSR/el yCpon8NkOu8ON3swuKOjdbms8owR7VqKbVHw792uKfpTD05GfO1miUz/qcUOaUE1EFIh 0zV626P4/D8U4tbQ+7Sc3EjAmqR1k/BE6lRDrx8/4eSnI+Ct9J4Y6+/CdcYqTUS5dPwX wp1wrqFDwYeHk4FN9QuNVv9EO1f0iMkR5UQ1scwvPII3PITvDjyhMki0FEqNnky+wBOE kNnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696255216; x=1696860016; 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=V2/riLchQZtPTs/BC596zGkjlTIrNRPztVzIEa24L10=; b=FCyPvDS/pWWQW/SIwqEV4XyVsxHUjQrVHa+WpYaV8hIF8sjNcbzCsKbq6E8TWZYNMu dYITKp3UWTRU/KRZk4WOrkTEmGgQwaV+tzX/NYDsPttAG+uXDHM/hWLU26vqgTJhafRA 1CxcZ+B/j2W/a3mr3Y5wm8aoHUZ+S4wpfsVwx8aL3ITGLPrE9LGcSmuSoSDBk4nI8UNz zpPZYHfyU672EGO1nWaE4q9q5uIaCX4RlQCNMIdPZUW3KZI665yF3fh84z5GeS1yX1Q4 V07IwUO5DDCxHhe+J+Y3/at1Fq+4gcYO/aI8sDGpG6m123VqbmuJJViI8tJnZPn8225k nyQQ== X-Gm-Message-State: AOJu0YwpEMVBScRNGk66cVCOY0R8jdzW00Hl1PSLBtUc5AMpn9a0ZKIT d/6I1yhvz9Gt2dy4yGuLuzn73w== X-Google-Smtp-Source: AGHT+IFYahe9QM9GSXykZIjClH00JSYu2bdXsSeQxdK1Yb2R7fBZkn9KvfTGct/URjQfs9lMQOMdJQ== X-Received: by 2002:a05:6512:617:b0:503:19d9:4b6f with SMTP id b23-20020a056512061700b0050319d94b6fmr8505095lfe.0.1696255216212; Mon, 02 Oct 2023 07:00:16 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id q13-20020a056402518d00b005346925a474sm9350377edd.43.2023.10.02.07.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:00:15 -0700 (PDT) From: Luca Weiss Date: Mon, 02 Oct 2023 16:00:12 +0200 Subject: [PATCH v2 2/2] ASoC: codecs: aw88261: Remove non-existing reset gpio MIME-Version: 1.0 Message-Id: <20231002-aw88261-reset-v2-2-837cb1e7b95c@fairphone.com> References: <20231002-aw88261-reset-v2-0-837cb1e7b95c@fairphone.com> In-Reply-To: <20231002-aw88261-reset-v2-0-837cb1e7b95c@fairphone.com> To: Weidong Wang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.3 X-MailFrom: luca.weiss@fairphone.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 7Q65WOZTK4YBJM7YS43P32JVFZZUXOXW X-Message-ID-Hash: 7Q65WOZTK4YBJM7YS43P32JVFZZUXOXW X-Mailman-Approved-At: Thu, 05 Oct 2023 07:46:48 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: According to the AW88261 datasheet (V1.1) and device schematics I have access to, there is no reset gpio present on the AW88261. Remove it. Signed-off-by: Luca Weiss --- sound/soc/codecs/aw88261.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c index 45eaf931a69c..e7683f70c2ef 100644 --- a/sound/soc/codecs/aw88261.c +++ b/sound/soc/codecs/aw88261.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include "aw88261.h" @@ -1175,14 +1174,6 @@ static const struct snd_soc_component_driver soc_codec_dev_aw88261 = { .remove = aw88261_codec_remove, }; -static void aw88261_hw_reset(struct aw88261 *aw88261) -{ - gpiod_set_value_cansleep(aw88261->reset_gpio, 0); - usleep_range(AW88261_1000_US, AW88261_1000_US + 10); - gpiod_set_value_cansleep(aw88261->reset_gpio, 1); - usleep_range(AW88261_1000_US, AW88261_1000_US + 10); -} - static void aw88261_parse_channel_dt(struct aw88261 *aw88261) { struct aw_device *aw_dev = aw88261->aw_pa; @@ -1254,12 +1245,6 @@ static int aw88261_i2c_probe(struct i2c_client *i2c) i2c_set_clientdata(i2c, aw88261); - aw88261->reset_gpio = devm_gpiod_get_optional(&i2c->dev, "reset", GPIOD_OUT_LOW); - if (IS_ERR(aw88261->reset_gpio)) - dev_info(&i2c->dev, "reset gpio not defined\n"); - else - aw88261_hw_reset(aw88261); - aw88261->regmap = devm_regmap_init_i2c(i2c, &aw88261_remap_config); if (IS_ERR(aw88261->regmap)) { ret = PTR_ERR(aw88261->regmap);