From patchwork Fri Aug 16 07:50:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13765647 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 A6CE4C3DA4A for ; Fri, 16 Aug 2024 07:52:33 +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=wyOu5xh1aD+Hvn+LnU8RfXLmSimiRmcKh0k9fq9YE00=; b=PxMFXCQavyUcCr1OLOBtUq1/dQ 50DyJ9oBN54U35BQyX2kEm9vEcfGz1WpFLYIjHIhmZqxvuXFlR9Cd7qLFOpwFb7CdcKOJeD6tD6Op amZPre5gACnp0VtgPlHpcyISW+iTCqqyILkin6gPSkVGIAIKI/ZPWT15oq4iVNlbm4hXxcAWy4rjy dhCb+z2Gn+7cEpmU27tcW/fFersRfXMgizlNtgVZQo8UM1qRu55OdlO7kg85LhxzHc91CmZtwI1SW 6eJW8WPYIsO3Cb6rBbsPmTgUq3MQNtW2tqy4KaTQl0A1p1bTkOuSeCW+N+6U90X7gA6hKOXpo3Jbm 5/pf5hJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1serku-0000000CAqi-1ugF; Fri, 16 Aug 2024 07:52:16 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1serjy-0000000CAa5-3z5B for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 07:51:20 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3718eaf4046so665550f8f.3 for ; Fri, 16 Aug 2024 00:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723794677; x=1724399477; 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=wyOu5xh1aD+Hvn+LnU8RfXLmSimiRmcKh0k9fq9YE00=; b=PRjOfGiljOcP7QQZmIBiro3wydpKcvAuOq3rgDDCTS4s7i83nHzQqVJ1z9gG4HjamQ 7/Iv8rNBl01HKRqcW15WbwqszLck15zmb/visZfmHMYa0si3t1Y1OWh+kVWJRF/SvaG0 XIAR6VrNSJgSH0DNQqjT0x/sJdtGkYIUSwZUvxqcSYiWU4/va6GkR/VNdykUMbo1Yhe7 dW8ldBilTMIfE1OgR3ztJ3hBN8wvHTpFQm+hw9KqbMpSnLLuETCCUteYlrFjyOTPwSm8 khkLtvvaD7LmzMBd++C5NM+B8lzzmToel/X9uZAn5rlBAiOKNR2zYn0ZpBKkiWtFZ3PM qqQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723794677; x=1724399477; 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=wyOu5xh1aD+Hvn+LnU8RfXLmSimiRmcKh0k9fq9YE00=; b=oJ3AnNhDGkxy7TZfXsxlSyPm6WW7fB7iPBIqLWaGbODe8HJBKxwUMsLJqiuLxmXn7B sU6zj0g7Mya0IGyeThTduDrx/guiCCEI0N0VRrqjlCpIHy+JJgE16xicKhgkhyXOfFaa 1YAG3FzijlcxHMlUjpYNd2U+jWF9PNvUGd9unVvQwtuLfxwR+8ZMLcqF4ZFhRPPi6YTt l02IaOTpr9gaoQEZpChHZ/kE8dfpXzq/iJS12Zaydy+qSZKJdqhwMKRm3jfUJZHk1HD/ ysNAm0JG5lxiJxULqMhl/zRRJDCOBw8zBWr4S/stMDZH3amuANEeBapmMvjI9lBcchou 0fRw== X-Forwarded-Encrypted: i=1; AJvYcCV0r6SMz0hd5PM+ptotGojRzHG6eNZmCYwoez06anQrITuJ6wtQs/NBBA/MrCbYCsIoRE7AV+RQLMtUIde/4RwaeK3mLg6c5ukFKO8dLgzhRxi2wWQ= X-Gm-Message-State: AOJu0Yw5MFlpyGp+4uICzQVWj9R3N5APb8UFHUpVMnR5U43L4bGPURCi qD9Ye2z4bDU1huiOxvkeqVX5jUzqN2BvNZVUpT+u/VKHalrG4IWM X-Google-Smtp-Source: AGHT+IHywpP31x3vB3Q29gUAbKdQEV2oUwRHXp0YJ5LMoyXhgaFv5T2z+t1ZD3jER6jPEg2htLbhLA== X-Received: by 2002:a5d:69cc:0:b0:368:3782:c2b3 with SMTP id ffacd0b85a97d-3719464ddbfmr1430804f8f.29.1723794676676; Fri, 16 Aug 2024 00:51:16 -0700 (PDT) Received: from tablet.my.domain ([37.30.8.221]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3718985a6c4sm3026201f8f.52.2024.08.16.00.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 00:51:16 -0700 (PDT) From: Artur Weber Date: Fri, 16 Aug 2024 09:50:58 +0200 Subject: [PATCH RESEND v2 1/6] ASoC: dt-bindings: midas-audio: Declare required properties for GPIO jack det MIME-Version: 1.0 Message-Id: <20240816-midas-audio-tab3-v2-1-48ee7f2293b3@gmail.com> References: <20240816-midas-audio-tab3-v2-0-48ee7f2293b3@gmail.com> In-Reply-To: <20240816-midas-audio-tab3-v2-0-48ee7f2293b3@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=iV+M9xizwvmZx1O7iSf9l6DHKdHcEZAQiXWFY1PnmrY=; b=owEBbQKS/ZANAwAKAbO7+KEToFFoAcsmYgBmvwTmEGjYoH5a0h0jF9Zer/NMFym7Mqel3/LMQ CmbFgGA8K6JAjMEAAEKAB0WIQTmYwAOrB3szWrSiQ2zu/ihE6BRaAUCZr8E5gAKCRCzu/ihE6BR aKa3D/9D6JLWduoKlwrIuFmu2456p9viU5lFCbPcV+Nx1skh9KCVTHUG1/x8xKGd/Zmo6oJW6ev XFiez92qBEXk5+EgEXapAQLGEy1xhcCYBDUZ3jg3sCzEBhXHBcr0TZa5zy6nlIWYobX3RQjHQVA pSHpWyZMNZ5vYZPVVJ7mSnZvb8D0ruSOa+5+Ytpo1V9n0lukB3zqLP5BiAatnPh0drKNRqaHLAA GDEC4OpV3NkO6oYbsPvb8lUzaEtoKtN49VbRyBwUzQ7sSyKY/v3RhYniuMj7iwVgI3p+5DXy1bL r6/7RvcvbtUEe0uarpBtjFac1z3/FCenJxcQItjX+uQe0tru5xgUMBxPlk3LiRQZpN+VvwyUar+ cs8H9eniyOOgVCkc7gJju7fhKregPwV67MKxes5FPlJRKclNrh45wkK01nb2HWqAUQz7UGjj3UY SmIXhbsSFC1A1gFEcsKVHnVcpAd+UhgNlVStyQSQxxEciICxQjk+HxHj9Sg0KInMa5JeN4VzWf3 4lZa5yM5jWyr1In365tP3q54i89vcRgnzhLNorh3Ab8u6q3YB/HXLgpdyGnY49iFXLBc62LM7tA nSY7JItBJVDowVs1Q8bhxqeLq5NMXG1dTRmtfJAEuP8rzkwe8qFFHm5xn6TSZolFO0BQ2E6HtGD AOJEIGsdx1zGFsQ== 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-20240816_005119_025430_AB75BDBF X-CRM114-Status: GOOD ( 10.29 ) 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: