From patchwork Thu Jul 25 10:40:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13741756 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 53A65C3DA49 for ; Thu, 25 Jul 2024 10:41:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6dxd18IEPPCN0mdlU0anYLSOukmaQJ1jfiipuPAXFgc=; b=FNJbWJd5mNBTjb6xAevD/pl+zP KY6pxgX9q2wBfr2+jJZMa8swKrV5Z3Pfh4xPRRfovzS0GTt1E+lvnb2Hk5LcHCCDvRJYPp4z1liw1 JrYIkOWjSMP9FcAiUpTl/hd0OpdSy+13pmdQU+LVi7rxXSQoXnuBwyyFfkGWqYJbRPkFtEf7HWIbB 46lk1F7D7W8X8QAugBIjBN8OY2BajfkLOmMzRmykVfwGGGGK4epo5CiVIvsieX5QOkV0dPt5faKCN AhBLIjLjvzKEpg8WygQnwZ/pDYjtdz7aYMYag+a4XKDouOmH2GFMj56QZxLd9+B3DDEOaf6Xxu+NQ kZ5r7+Fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWvue-00000000ehN-0BrW; Thu, 25 Jul 2024 10:41:32 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWvtt-00000000eT1-3WJO for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2024 10:40:47 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5a3458bf989so922092a12.0 for ; Thu, 25 Jul 2024 03:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721904044; x=1722508844; darn=lists.infradead.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=6dxd18IEPPCN0mdlU0anYLSOukmaQJ1jfiipuPAXFgc=; b=K3YWrlr2+KNoQ7pz/vLWFH0rYtobxkwCpG44QbpvwOIA+gy8xqZoBV/HUcu02Q0ukV VmaZ71eus2YtoOqBtR11HyBqb1kC8w5AV1BScdVZxYWP+CnHQdua/kxLpfHkCm6pVWLl BjNhwQ4nlhEy2Yze9Q1qmWoG03y8pueLWJ317th4fYWoBugqRzndPD54umZYbslWcKeH SkN5ru4U2tYgOSUj6SZkdMk7IAA65rrgsri4dZjtzgmjLAa8YamPvJNYdr4chwMaWXb3 3OPSIPmlJEzysebW9EoAHB1dSPBrZUNFTHxsRsiX4Z06XO6PS3sA707Vuypc7Ohv8foQ gvkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721904044; x=1722508844; 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=6dxd18IEPPCN0mdlU0anYLSOukmaQJ1jfiipuPAXFgc=; b=FOPLatbAt0JHKJFOm3rTFEi/EyIo7kps8/Ax4r8reKQS60vLcz1zjgSP1ofFCLdKdr KaBYYpJCuKTGGkzKUApy+Z0k+V8HJfhZVzU26hLnmSUoBbhyyKkc47i3ODk3QtC9LxJE fezTPnWycXsMGuz6jJsNkl1vzpIZEZQMwPmJ2Oje2NbAHK+jP4QjAlGkgv8B07GFHjTa vOk9QOfFR5yPZBQCdExcg8TKXITyXvphFxJHTrQejArUjsoj6RIU+OJ50IAUZVRlA021 8Eq3dQlxPHsmiZ7AiXvEzWF+ws/llfJv8xgRRZKa3ZGIACTWwsifXGYFDRly23iz01t2 i5Og== X-Forwarded-Encrypted: i=1; AJvYcCXMPr0DlcL9HLm8QTaS1EonlJI1urSbPjUgFCnPo/n95wapcvyYnbetFskFeu94m/PYNPaoomSVuM2Dr53LE6oWDgym6hxDA4SY2OD4MzUemza1h2w= X-Gm-Message-State: AOJu0YxXpI6I2yjLe4OwiKTHY0hS8WgiIHW8L8g0b3Tlo2LPHNB5rhHD 5K6yoiqmzDH+KKMDlLRkw83Mh4lGmdtJiKkzbaaW1wohWOKDiSAx X-Google-Smtp-Source: AGHT+IF/mZbfu+qwl21CGnof/UHOhOM/AoVBM2J5sHP5zzGk+ZLCeJEelKisWC/ixRmMZRuh2PLccA== X-Received: by 2002:a17:907:7296:b0:a77:db36:1ccf with SMTP id a640c23a62f3a-a7ac5049d22mr170757266b.42.1721904043764; Thu, 25 Jul 2024 03:40:43 -0700 (PDT) Received: from tablet.my.domain (83.25.114.69.ipv4.supernova.orange.pl. [83.25.114.69]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab23d56sm58342066b.38.2024.07.25.03.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 03:40:43 -0700 (PDT) From: Artur Weber Date: Thu, 25 Jul 2024 12:40:35 +0200 Subject: [PATCH v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det MIME-Version: 1.0 Message-Id: <20240725-midas-audio-tab3-v2-1-dbc055c27879@gmail.com> References: <20240725-midas-audio-tab3-v2-0-dbc055c27879@gmail.com> In-Reply-To: <20240725-midas-audio-tab3-v2-0-dbc055c27879@gmail.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Artur Weber X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1806; i=aweber.kernel@gmail.com; h=from:subject:message-id; bh=KTkZsY91b0iIJMvb4V4gIHRHYTVzSRya4eCPvKugz6w=; b=owEBbQKS/ZANAwAKAbO7+KEToFFoAcsmYgBmoiunWLve7myaMeuIovS4h1pW8U8xbvx9acrN/ qVuhsjSsLKJAjMEAAEKAB0WIQTmYwAOrB3szWrSiQ2zu/ihE6BRaAUCZqIrpwAKCRCzu/ihE6BR aC6gD/4uXF/Wqdaq+E/UKPCSJtW5sD0MMI5hJO/AEi2YsUdRTkvMTiq+QlBZ8U0qIfFGmoMwgtV dkaMh/H9I2AM2+WaDGzsujfyw3z32V3RleZ5khHTmpvkY5PS3rRqSFGKOe97986MDlXSuP3gO9u lnc787HkF2gGZNm0ncYQKwB5hIUZrwf+0vvMKifZoPwwfG2DvJzNCiUEOx65QCmETCU9ErNsc69 WMyX3Y+K8HipJUl2gliPQBWKib7mDIJygI7vxeb/sTTzxbas+s60U4cnSYZDOsN/ie0MzDNIgx1 IU+wzT9+ylJDLAdbaaVTroKlTcA+dF4rT4FQMwWXRcBQvkCrgmE1PdqRmp9gpgx1Hs6CPE+agAB g+a0Om2tQggxrB2RaSoP+GpFM+xFYy6D/uyN1bpV4I8ksDkstOOvZPnRpDL9BOz76bFlY+HhsEp WK149c2UYZ5HFaA9wCCfSxG/esHCpsQVe/uAhCwD2Is6zNz13wW42WcOWz+5lecDTmJ83wnFC8E TZNDboutQGxmO3aBrkNwhaM3eC/wmBEgISMYRGtHPjsPpC7qQhDatmMyqDr37xW9bwaRP/04D5X jIjOF+Ym1msRJRZnDFAEniXwzGUSWHbwERZiAG0hmWoYsGK3go5YsT1SaVQPeOs4BruOuJl5uRd UhcmDdCN+asxSvw== X-Developer-Key: i=aweber.kernel@gmail.com; a=openpgp; fpr=E663000EAC1DECCD6AD2890DB3BBF8A113A05168 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_034045_913056_CCD4EF53 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org GPIO jack detection requires an IIO channel and the detection threshold to work. Explicitly declare the requirement in DT schema. Fixes: 0a590ecc672a ("ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset jack detection") Signed-off-by: Artur Weber Reviewed-by: Rob Herring (Arm) --- Changes in v2: - Use anyOf instead of oneOf in headset-detect-gpios/headset-key-gpios if: statement --- .../bindings/sound/samsung,midas-audio.yaml | 29 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml index 69ddfd4afdcd..5483421a6fd3 100644 --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml @@ -9,9 +9,6 @@ title: Samsung Midas audio complex with WM1811 codec maintainers: - Sylwester Nawrocki -allOf: - - $ref: sound-card-common.yaml# - properties: compatible: const: samsung,midas-audio @@ -102,6 +99,32 @@ required: - mic-bias-supply - submic-bias-supply +allOf: + - $ref: sound-card-common.yaml# + + - if: + anyOf: + - required: [ headset-detect-gpios ] + - required: [ headset-key-gpios ] + then: + required: + - io-channels + - io-channel-names + + - if: + required: + - headset-detect-gpios + then: + required: + - samsung,headset-4pole-threshold-microvolt + + - if: + required: + - headset-key-gpios + then: + required: + - samsung,headset-button-threshold-microvolt + unevaluatedProperties: false examples: