From patchwork Fri May 3 18:55:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13653330 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 CAA39C25B4F for ; Fri, 3 May 2024 18:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :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=d3PE2CLjlxWQbx7sP02fbiH329HLrbEGuBMDZROeQS0=; b=airzcxPyxnjf0f D7dXJTqFjep10bXTmt3KClyoGulpmOng//aNviOCfAKrnBkFwyc7LAFMw31b3MC0njJBFzOxWIwgm Rgapt4OBfKEEhshs0H8faUSaiMq/W1hSk4vwBTzqPy8xWBzdGVQhaQS/vggQHZ0ONO45xJDIJGavs x+h5DvGQXdDtYGEULfBRK9kWRhcLBR9YDtT9TMVSbdSBTbalDIjPbsT4ZIaOCOeF+yX+ecwvI5RXn MPvX0Rddi2ixRMpG1vJEkGoxxIUNrvsj0Rnl/gT3qvYptuypFcCl49bOnM82FL0f24O3sorGgZlVX XUI7XQHOcZQXS6uraMcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2y49-000000004Yh-0kWZ; Fri, 03 May 2024 18:55:29 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2y44-000000004Wx-3Xea for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 18:55:26 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-51f2ebbd8a7so2568493e87.2 for ; Fri, 03 May 2024 11:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714762522; x=1715367322; 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=UbmcMWxuo0P18e6D0ea2liBuANMn4GXXURkDxbEh2Ck=; b=GzHmwde23SKcW3jKCq+7ru6mtLptIdmNbhvUCwzPrke9pDnVrRxq/pz9AEbtpfK7Jf tmFFIHkxiAN2MiZm0m5tVpZ5B+EXiR4L3U4p1niBNYYwGYyLtOhZb84/rXoY88sVosw4 xSHy8tyIZnDhjexGpmpueGY7wf5l6IzDE/7aAIHWznZD7fRwMHiffDLZPyKPr7k8ZbVR IqwypSjOS31UZASdiyg47V/tahns8t+YYRWXU8ia000uMIr5q/2iJ/Z79pKKW0CRnE5D nAy/5PPs+VJhOfshNEtUd+VPM6NlhWhw/0je41RPecrqOEnArBElXmWdyFG99RgII2xz d31Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714762522; x=1715367322; 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=UbmcMWxuo0P18e6D0ea2liBuANMn4GXXURkDxbEh2Ck=; b=OhIPJMOU7/9vdldYsfJJqy6FWaSufPs+td8MJpPgqnMwlK6+KrQR8KF72HnjyKkgAI SdhSg3Yp/AdSme3FGHFoIc9AyMgBlGqh3NqAoATSXYCEMzLrWS/wRzCYUqyBpL+RSHt4 nc9M3f2g1GXTsSds81Kpg/PnbGt776V1DXtf/1Nd2iV5scP2ub/5X/ydrdDrJB8VYIzt QNC5/do08xuPo9gvw+Y0BgM4hZ+e/1IlqImvFbIcypaeOfuVFzdN4vgN3KJJJj+UdiSJ SBFehGomNSucOAy/pyqo9loEg6J96j3/WaxXfOIMiCKYmfWfwxEEDO+Wh2PCWosHFuPP OenA== X-Forwarded-Encrypted: i=1; AJvYcCXDMTpSPp6IxXHQH0zJjkVtxDsGBCch7K9XijvL3AdBDxMymBgjVzmFV4Q6l5ullnLUN4ZHHvPrSKmNcUs46Zrc1ZTKo2WM+293AfBjlB70sk5mUwk= X-Gm-Message-State: AOJu0YwLR1HkZz3lC1DnGv6ugsMjHsrQ3CCQkfDI8Pgq6L4WxUyQ0i9v BQ1+7t4CEX8laPLhtPtYZjErqtiO6FsKZsuOZlXq/aIz+va8DVUW X-Google-Smtp-Source: AGHT+IHxuJfes30dEmvdnSiiOTWELTaaG0Zgc39pHJXiEjvoeWJvMYPpqTzzw8aPSPJHb+gxO7ayMg== X-Received: by 2002:a19:2d5c:0:b0:51f:5760:dd34 with SMTP id t28-20020a192d5c000000b0051f5760dd34mr2227092lft.55.1714762522300; Fri, 03 May 2024 11:55:22 -0700 (PDT) Received: from hex.my.domain (83.25.185.84.ipv4.supernova.orange.pl. [83.25.185.84]) by smtp.gmail.com with ESMTPSA id l8-20020a170906078800b00a598d3ddf8dsm1104618ejc.28.2024.05.03.11.55.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 11:55:21 -0700 (PDT) From: Artur Weber Date: Fri, 03 May 2024 20:55:11 +0200 Subject: [PATCH 1/3] ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset jack detection MIME-Version: 1.0 Message-Id: <20240503-midas-wm1811-gpio-jack-v1-1-e8cddbd67cbf@gmail.com> References: <20240503-midas-wm1811-gpio-jack-v1-0-e8cddbd67cbf@gmail.com> In-Reply-To: <20240503-midas-wm1811-gpio-jack-v1-0-e8cddbd67cbf@gmail.com> To: Sylwester Nawrocki , Krzysztof Kozlowski Cc: Liam Girdwood , Mark Brown , Rob Herring , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Alim Akhtar , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Artur Weber X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714762519; l=1850; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=iSL/9TbpKZMCrEtopfNilhigbnt3bHY73t6ih8p4REI=; b=84P+PrhoPK9SG9icveouBZi2fkf11bKuxyjdVfmtV3cwHD9/v77W7mjlchFTt/lJ9bwTEE9hQ DCYby6BSQPDBGUfIYW9w4C9YUh1EE+E6U+7VDmfaJ7n5Avw64nS7XHD X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240503_115524_923594_1873BA50 X-CRM114-Status: GOOD ( 11.78 ) 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 Some Samsung devices that share the midas-audio driver use a GPIO-based approach to headset jack detection, as opposed to using the built-in jack detection provided by the wm8994 driver. Add DT configuration values that allow for describing these setups. Signed-off-by: Artur Weber --- .../bindings/sound/samsung,midas-audio.yaml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml index 6ec80f529d84..9f521131f2b3 100644 --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml @@ -61,6 +61,36 @@ properties: maxItems: 1 description: GPIO pin for line out selection + headset-detect-gpios: + maxItems: 1 + description: GPIO for detection of headset insertion + + headset-key-gpios: + maxItems: 1 + description: GPIO for detection of headset key press + + io-channels: + maxItems: 1 + description: IO channel to read micbias voltage for headset detection + + io-channel-names: + const: headset-detect + + headset-4pole-threshold-microvolt: + minItems: 2 + maxItems: 2 + description: | + Array containing minimum and maximum IO channel value for 4-pole + (with microphone/button) headsets. If the IO channel value is + outside of this range, a 3-pole headset is assumed. + + headset-button-threshold-microvolt: + minItems: 3 + maxItems: 3 + description: | + Array of minimum (inclusive) IO channel values for headset button + detection, in order: "Media", "Volume Up" and "Volume Down". + required: - compatible - cpu