From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796164555; b=vcVW7u1HEs+Zti/FLkQk9mXQ/x/jEy46wmm0bBgj10C4IddbWh10a68EWBjP4fwS3vJw jaqHvPsZlVTYSrrD3XKJe+VnRYygpx9tPf7kDxhCPULjpXIVDCA/c1M4csaYZqqvtnPB3 qLMx6qiVgriWWQTKU2mm5GX1FI7j9Lp/IF1Qqn1iAOMMAixomla2l5lpXqvHSiMIbh73w sBXOS9/jHZFrH0Cm1j6UjfsLhZswe825ZfD6EXg26OF98BWGpEJE47h9T9CQM1/l+Gh6V WqCQLW+xkRR0ZDlmZgO4mrNUwktgXmHkZDWaIvHAdgirkOpKJJ+i40z8fJbcnzhQcqA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796164555; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=W8uqrTqzipUAyJYrx8mfzg7xK0kLaRUr/8g53ITVbdA=; b=ed0WtubCJg9ygFEuAKIFsP0Izb1mDbtBg8B96FJyK4axa2+9LfsiE7jWE0XUOkrBv9/+ EoPItrdHGRfqudjV53n9ng9VG1vo9Q8gHp+tw/UeNN6V24G5lMsRhXUlNC8cPlN0SwAyk SsHylca02ZV5eeDcJmRqxW4UPK9W64pNDqVZ0awXINX7ua8IHiKA5r1syI4xUYHmmrCKq mIPKonE0iPl/d31Kw9zNTj8lBUjzEB3xNp/Gcd5w2A3/syzaWxH6YOou8aNDeZOKq/R+O V+AYo1hro2yuEq9l2h++OEPgldj24vTyEMvVlh5AyfFYSZi+CjaCLJE/NSUqfqxkaNw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=yB6M5o43; arc=none smtp.remote-ip=209.85.128.51 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B39C606A320 for ; Tue, 1 Dec 2026 22:35:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3B39C606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=yB6M5o43 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4a5177d78c7so127360625e9.2 for ; Tue, 01 Dec 2026 14:35:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796164554; x=1796769354; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=W8uqrTqzipUAyJYrx8mfzg7xK0kLaRUr/8g53ITVbdA=; b=yB6M5o43fAQDDegXr0qn4Z1049odhr561ZiR0EWTSGQSSb2dsk16qOmUiVuS/qANDC Q6J2lvd7hzTjq/VsVaTF1Oz7Vbzzeod1dipi2fVZKDnbDUpSll3SJLvEa2ffNcc33/fE qvkv+vepOb9luHa+0e1fYpldWJ6dZZuSzHYdR2p+Ts/rG4kaiecJCIptPiAgvLQWw2LW iy6Z34MD93tkuuBmRahR6QaPDMGbrlUwMmgVXle0LOd6GxTqiTzNgiLeIisoQUtxxfYW qhLDnl/T8Mh678CLV4oVcarSjr/JIA7F3YpvP9nCg6Rpm4qO6RUPtEWjubLa1Y5+BYo2 Vn7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796164554; x=1796769354; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=W8uqrTqzipUAyJYrx8mfzg7xK0kLaRUr/8g53ITVbdA=; b=ScEJYsuYj0cmlay3SfPLzuWYUCg9jqj5kUQsQMh8JvGMBHKwqAFyAJCuxT5e2kWYI+ hkGvue6Lmg4xgU7SYXy5KUerqD7dHlF5+Ir9N4YUBDKWvCxpnsiLc2H8Gzk6pSYev82V xgsZ0NHUC7VFVps8SWBkfaRtycKJPcG1DyLavKcnG15d7DCdd7nhnLz0sb3siaRD6DWi Hcmc7zKjP55jgSyEsX7ij/2a5MEXNaqZqrvIorx0CLpws94lhrHKdTCscOtz+sMHhgHR G7WWPENLajwZ6p3IHob3DBSUmyE0x+mBMSU32y4KVi0QRzdgMLjgcWi01j5kgQNbhLKT U3wQ== X-Forwarded-Encrypted: i=1; AL+hErGXkUPYvUc8A/c7eq/FS5PEdAj4ps2q7lPNzE1j98cHZT6yWgBfLlC37LLwp2BAk84Zm3ONcuVUuLKEeNI=@vger.kernel.org X-Gm-Message-State: APuU4Z//k9Ru/QqGoAIPWHdNppwZl2eSlnabllcVBpOg54t8Z+3wbS5L r/fwkHJHGkDDsTsk3/ByewF0tWui3HRSVmcIDDRb4cNCTc4mHLojrERd79Krwm2ytcw= X-Gm-Gg: AZFdTZfTXRvzLcTVyVOyOqR5h+GexpzanBmh1rz8J9qGECkfVssdbDXkdDxYrgGEgWo MRRkZc027Mp/Ou8/RkjnJ/X0GCavGMevZJbT9K5eupohXAJ+/oQs0RNQDoExL3Xs/OmqO0O/vcc 8E9yMoDyqWn//3NIv3ds4njrdQI7mvds8XL8E7cz98U25SYteSaPrLQLJFJddxTo0Svwz1EDDUc WMHa4hGBorcXwdd/UlhjB/WKtP/Ag0avxZW9bIkRESrmXhQtqlsjUgy9UADKgD+ravsCMMGnHSS 9YuyovfLU2Yxiodx4otADt2rtFGtx+G1wQ6o4zOCSreQKp95qBUZSkxC0VH4K4Dk9Pl+ac8WTQQ cA26tFDjQhQwmRBn+u0UHbgO4ZbW2cQfyRDEhI6wCGuglNPRzRNRviZTVYQ7sEOySEJtJU3Smo/ 2k28pHSYQqXFXGzP0o0JJumRzbSEPKxsYTbE2HZCWZTn0LYUx/Gn6iRh2EoPQwn4IZGtWRb7vXT 1opFwsRH7P1gGziscqwJDkRkbM9eoBZh+z/lSsMkTaAuODAuZkmuqvy9xm2bM1dm3q1IwAWTtED h0H8d4qrRQ2PP/pVhhagJZ/Qexhhe43jXvzf5iRFLoqwuwRzMkFPNEfh5GH53Cqu0gJNasH/WQV QLmBEewYcSwYKE47NwxyFLeZ2UNlPvvypxpmOdFGg X-Received: by 2002:a05:600c:64c7:b0:4bb:68b9:f610 with SMTP id 5b1f17b1804b1-4bb887ffee2mr732457745e9.9.1796164553660; Tue, 01 Dec 2026 14:35:53 -0800 (PST) Received: from ?IPV6:2a02:2f00:10d:8e00:f464:a44a:1989:c4a1? ([2a02:2f00:10d:8e00:f464:a44a:1989:c4a1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884ab091sm1414264775e9.11.2026.12.01.14.35.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Dec 2026 14:35:53 -0800 (PST) Message-ID: <7f7380a6-a05d-4857-9be7-f01b69cbdbe3@gmail.com> Date: Wed, 2 Dec 2026 00:35:51 +0200 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] ASoC: wm8962: add GPIO interrupt controller support To: Charles Keepax Cc: Liam Girdwood , Mark Brown , Sebastian Krzyszkowiak , elena.popa@nxp.com, cosmin.stoica@nxp.com, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261127170039.663-1-laurentiumihalcea111@gmail.com> <20261127170039.663-3-laurentiumihalcea111@gmail.com> Content-Language: en-US From: Laurentiu Mihalcea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/30/2026 1:25 PM, Charles Keepax wrote: > On Fri, Nov 27, 2026 at 07:00:38PM +0200, Laurentiu Mihalcea wrote: >> From: Laurentiu Mihalcea >> >> The WM8962 codec provides two GPIO pins: GPIO5/GPIO6 which can act as >> interrupt sources. Therefore, in the context of Linux, GPIO consumer >> devices (e.g. in this case, the sound card), could make use of these two >> pins to handle certain events (e.g. HP detection). >> >> Add support for this by modelling the WM8962 codec as a GPIO interrupt >> controller. >> >> Signed-off-by: Laurentiu Mihalcea >> --- > Should this not have some sort of mechanism to enable/disable > this functionality? This is a fairly old part presumably there > are many systems that already exist, seems bold to assume all of > them have connected those GPIOs in this way. Hm, I think you've raised a very good concern. I think this feature already depends on the fact that the user has chosen to configure GPIO5/GPIO6 as GPIO inputs (via gpio-cfg). Otherwise, I don't think they should be generating IRQs. I'm basing this thought on two things: 1) This quote from the datasheet: """ GPIO5 and GPIO6 pins can be configured as GPIO inputs can be used to trigger an Interrupt event. """ 2) In our case, GPIO6 is configured as DMIC DATA input. So far, I don't remember seeing any interrupts misfiring? Not sure if this point is valid though as I might have just missed them? That being said, I don't think having a mechanism to enable/disable this feature would be a bad idea as it would give users more control and maybe protect us against some weird configurations that would somehow end up triggering the IRQs? The way I see this being done at the moment is with the IRQ mask()/unmask()/bus_sync() callbacks. If you're OK with this, I can try to implement this for V2. Thanks!