Message ID | 20231222150133.732662-4-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-9801-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1126864dyi; Fri, 22 Dec 2023 07:11:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfIVt/OcwVn6NdgrwFLWGE/MFiNvqMnf91tAcgPg+sOfJvg/Uh3XoAaQnl6HL739QUm5hY X-Received: by 2002:a17:906:6819:b0:a23:68ed:e2ad with SMTP id k25-20020a170906681900b00a2368ede2admr782876ejr.125.1703257909904; Fri, 22 Dec 2023 07:11:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703257909; cv=none; d=google.com; s=arc-20160816; b=hlgyEOrbzfbwxUp5xYmEO8viXDGV3YOtLGlewzLV5yq0YdyWqoHhgpWTmiQaoPiHHl rpJ5/+ASzC8k0P1tuPbs85s5c5M1FAL3qaEUGY0cXrXsIM+35/745j9TDPkvxdqMDtZA QJjryqUQGrtDErJJyOoVFxNXlb+K7AolBNVNnvTROhCvbf5n3YJfeiCj6D737+afviBA XO3hB9ZfPpfZWCvIOhyy9idTGR+9DTcAlZCxKypGK7YfSt1ZeZnpaJ/3cDc+TOsKTBsp 56J1a/eIh7pNHaeDkx+SHFv+Bfv+WMbzy5DWYP1bLgKE93MLRrvZ1iSFk6G3mnrkRPgj Qs2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vx3v1qGZeqQnkYVSrY5RSwpGT9fxdZloG/62JqqyTmE=; fh=qT2lGUArZQvwUIB/9Fa7Ruafls3FDdlo0Oc+7pPglW0=; b=UIEZw32YFjUORp5GLSRxQQRueaQG2VljIk6vWQJqgN2Ewbb3rVQfwMUNYCsKuHmgpg EaacLG+4JuntmASqPfHVhOx2CZXKUMSopWBaKw7xGuxerwmotjLqHXz1yOXrn4l3lc7U lj2dl5oYRPvmQu87q4RXnxfqFv0XC1hAOJT2wUhEXtXhmXNwQhiipY0SOUssJwGL1V5t w2T5/S5wfQMY2hE6eJoWxJX7Wsdd/x6sKr1aRD2njM2xdgI/t73IeHQxR+UEkOGzKkBR 7+ykO+Wct1F7oSeC1d5FywKkIppK15olAk4lkKoM7baxmpqOSgyxX6DZq6LXnLtus0BB tCrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dYgS+xPs; spf=pass (google.com: domain of linux-kernel+bounces-9801-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9801-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id la3-20020a170906ad8300b00a26ae8f4911si1191086ejb.204.2023.12.22.07.11.49 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:11:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9801-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dYgS+xPs; spf=pass (google.com: domain of linux-kernel+bounces-9801-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9801-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6DF981F261B1 for <ouuuleilei@gmail.com>; Fri, 22 Dec 2023 15:02:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38C002556C; Fri, 22 Dec 2023 15:01:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dYgS+xPs" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E1022376C for <linux-kernel@vger.kernel.org>; Fri, 22 Dec 2023 15:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a22deb95d21so243276966b.3 for <linux-kernel@vger.kernel.org>; Fri, 22 Dec 2023 07:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703257308; x=1703862108; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vx3v1qGZeqQnkYVSrY5RSwpGT9fxdZloG/62JqqyTmE=; b=dYgS+xPsMLUMdnAhOB4BpD3CsRBuYcoZ/a+ph7FCZ/g2I1WfER3aCwYMq62GgQ2ZYf B3LeTwmpM2bdXvZkutwfaXd80+SX9nAbGl33jRRq17DtLPFs+TydW6R73Bfv7gyfXD6r 8/zelrMX1nGTg48NnFEmOrZRUJK/hdr5JtYj//qNxTROnc0MdDYg/dpdTVAGXvMPFs+o Kpr/FKgTtH9vGjzt4zBo2zW5vqKSoZLpJDthPlywZk4YV/ywDnofpTojBEElTdnr/p9t 22OANkJ64nbmOkJHTK+anIoLPzhZ+2RHymlsUXMU11tD/IVoeskbeVa0FytrPk6aK2/9 Bfow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257308; x=1703862108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vx3v1qGZeqQnkYVSrY5RSwpGT9fxdZloG/62JqqyTmE=; b=A1ZTJ/Fn5D+HUBWwPefy+3hgGDjewmlhqqiEUvLahGCYRWzsOnM6tSCHFu+8gycNU0 FCZ/JRnqUq2yifsphhNRSOCh9SeOCYyqswpaJWgm0T1IyC8d41EWj+vJe+6p2Zvna8sn MCvlaQ9EUZ+pDEkRhSkBvaWbKJj+PrzvxrGWkR+9gkTubkX6WIpNnxDftCL2qI6ySW/x UfIv5tQ8aKN9OHydEnrmxtkLkiXu+uAj2tPmG+DOLC3LBczOJScJNXLgPtlB89cm8eJo AUHCHZCEUo42DDepmzK1bWodzP8bFXjIddhk9UqRMQ3wOIv7K+BkPFH2HRkXjMrzxedv iFnQ== X-Gm-Message-State: AOJu0YzdC5Vkdz0pChdJXtYz4TKFU5HKKjQxVAq+2hTST3hVjvqeB25U taR4wnAZBYB0ruXIYmUjQxuwR6YYR5Sadg== X-Received: by 2002:a17:906:eb12:b0:a23:333b:129a with SMTP id mb18-20020a170906eb1200b00a23333b129amr888281ejb.53.1703257308319; Fri, 22 Dec 2023 07:01:48 -0800 (PST) Received: from krzk-bin.. ([78.10.206.178]) by smtp.gmail.com with ESMTPSA id h1-20020a17090791c100b00a26af35c171sm1275671ejz.0.2023.12.22.07.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:01:47 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Banajit Goswami <bgoswami@quicinc.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Sean Anderson <sean.anderson@seco.com> Subject: [PATCH 3/4] ASoC: dt-bindings: qcom,wsa8840: Add reset-gpios for shared line Date: Fri, 22 Dec 2023 16:01:32 +0100 Message-Id: <20231222150133.732662-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231222150133.732662-1-krzysztof.kozlowski@linaro.org> References: <20231222150133.732662-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785995366389166609 X-GMAIL-MSGID: 1785995366389166609 |
Series |
reset: gpio: ASoC: shared GPIO resets
|
|
Commit Message
Krzysztof Kozlowski
Dec. 22, 2023, 3:01 p.m. UTC
On newer Qualcomm platforms, like X1E80100-CRD, the WSA884x speakers
share SD_N GPIOs between two speakers, thus a coordinated assertion is
needed. Linux supports handling shared GPIO lines through "reset-gpios"
property, thus allow specifying either powerdown or reset GPIOs (these
are the same).
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
If previous patches are fine, then this commit is independent and could
be taken via ASoC.
---
.../devicetree/bindings/sound/qcom,wsa8840.yaml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Comments
On 22/12/2023 16:01, Krzysztof Kozlowski wrote: > @@ -37,11 +41,14 @@ properties: > required: > - compatible > - reg > - - powerdown-gpios > - '#sound-dai-cells' > - vdd-1p8-supply > - vdd-io-supply > > +oneOf: > + - powerdown-gpios > + - reset-gpios And this obviously was not tested, so Krzysztof: It does not look like you tested the bindings, at least after quick look. Please run `make dt_binding_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). Maybe you need to update your dtschema and yamllint. Best regards, Krzysztof
On Fri, 22 Dec 2023 16:01:32 +0100, Krzysztof Kozlowski wrote: > On newer Qualcomm platforms, like X1E80100-CRD, the WSA884x speakers > share SD_N GPIOs between two speakers, thus a coordinated assertion is > needed. Linux supports handling shared GPIO lines through "reset-gpios" > property, thus allow specifying either powerdown or reset GPIOs (these > are the same). > > Cc: Bartosz Golaszewski <brgl@bgdev.pl> > Cc: Sean Anderson <sean.anderson@seco.com> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > If previous patches are fine, then this commit is independent and could > be taken via ASoC. > --- > .../devicetree/bindings/sound/qcom,wsa8840.yaml | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml: oneOf:0: 'powerdown-gpios' is not of type 'object', 'boolean' from schema $id: http://json-schema.org/draft-07/schema# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml: oneOf:1: 'reset-gpios' is not of type 'object', 'boolean' from schema $id: http://json-schema.org/draft-07/schema# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml: oneOf: ['powerdown-gpios', 'reset-gpios'] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}} hint: Use 'enum' rather than 'oneOf' + 'const' entries from schema $id: http://devicetree.org/meta-schemas/keywords.yaml# Traceback (most recent call last): File "/usr/local/bin/dt-validate", line 8, in <module> sys.exit(main()) ^^^^^^ File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 144, in main sg.check_dtb(filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 89, in check_dtb self.check_subtree(dt, subtree, False, "/", "/", filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 82, in check_subtree self.check_subtree(tree, value, disabled, name, fullname + name, filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 82, in check_subtree self.check_subtree(tree, value, disabled, name, fullname + name, filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 82, in check_subtree self.check_subtree(tree, value, disabled, name, fullname + name, filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 77, in check_subtree self.check_node(tree, subtree, disabled, nodename, fullname, filename) File "/usr/local/lib/python3.11/dist-packages/dtschema/dtb_validate.py", line 33, in check_node for error in self.validator.iter_errors(node, filter=match_schema_file): File "/usr/local/lib/python3.11/dist-packages/dtschema/validator.py", line 403, in iter_errors for error in self.DtValidator(sch, File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 288, in iter_errors for error in errors: File "/usr/local/lib/python3.11/dist-packages/jsonschema/_validators.py", line 414, in if_ yield from validator.descend(instance, then, schema_path="then") File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 305, in descend for error in self.evolve(schema=schema).iter_errors(instance): File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 288, in iter_errors for error in errors: File "/usr/local/lib/python3.11/dist-packages/jsonschema/_validators.py", line 383, in oneOf errs = list(validator.descend(instance, subschema, schema_path=index)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 305, in descend for error in self.evolve(schema=schema).iter_errors(instance): File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 278, in iter_errors scope = id_of(_schema) ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/jsonschema/validators.py", line 101, in _id_of return schema.get("$id", "") ^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get' doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231222150133.732662-4-krzysztof.kozlowski@linaro.org The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
diff --git a/Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml b/Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml index d717017b0fdb..4b4bcbeba9c1 100644 --- a/Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,wsa8840.yaml @@ -28,6 +28,10 @@ properties: description: Powerdown/Shutdown line to use (pin SD_N) maxItems: 1 + reset-gpios: + description: Powerdown/Shutdown line to use (pin SD_N) + maxItems: 1 + '#sound-dai-cells': const: 0 @@ -37,11 +41,14 @@ properties: required: - compatible - reg - - powerdown-gpios - '#sound-dai-cells' - vdd-1p8-supply - vdd-io-supply +oneOf: + - powerdown-gpios + - reset-gpios + unevaluatedProperties: false examples: