Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp760158rdb; Fri, 2 Feb 2024 03:17:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IERAeapTtHRiehHrCDET+J7TcRsGP69A+1fpT4Yp1Ep8qqyLR4z2MxY4Umg0fvE6ToIdClM X-Received: by 2002:a05:6358:1901:b0:178:a295:996 with SMTP id w1-20020a056358190100b00178a2950996mr8604936rwm.22.1706872672777; Fri, 02 Feb 2024 03:17:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706872672; cv=pass; d=google.com; s=arc-20160816; b=eXR3GpH1FbyQ34MdjoB4fT2/hP9VLy55ZcAdgN1yWeguQ1LAcCY0jkYB7HsV7taGXl DJZeke9U3uxtt8oZ7pNKIdIWNbvTbA94/7R2QtlRtVkZqTsiYxLKz1TbdGWgIepin4iH MULZuWAWJyfiLzodeT3hemF9j7iWiR7SReqYjf4YHB86SkLBbLEex2MhJf9MT0BKlbc7 1U4KNFmepYpYoX5BOngoKGS3wkfgdBgfLkdAZUZWgZvVwPVR6su6h1tSpSngyB+mvjYg 91MilCnAcO0/zSZfEEUs294LjIavB3sBclWrXfyrbVsMj4y9mBSdrYL0lxVk0sia/xVy K1CA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=yr18VgKkUR0Z6xA+Bp01IdzSAv15CAC3JbNxjaal7xE=; fh=AoMvb2urPspayUcJxBKiwIYiCdJR8tfS4raR5+rUWXk=; b=CKDaXi+aPpcnlM0T3PG59UvX45w5dvYzo5tNDWksbPnNtBNKecs5fWdkCjIJCR7yh8 GFZnPUdyw0iyf5J67RHqfhuQxdpo4kwThT/AaF8gAixuW87rYFsB3D3kKVWE6ohqGZ+o p9Z7TnNDoi9R6IjZN0GB+3pnj2B0+w7Vc/2hyaNjHBgdvYYipwi8Ndl5L53uTyh/4DTC WJx3rvrIb3U9qj9/Hz43qWx5xqzObPqGZ2m5EseJngra26WBTJNUww/bqjzIixB2NBfa zrShnX3xKtfT+RE9daM6zTc2d1k0LSEp3r6bJnOyg6J9IcE8negwfGvGUmdK9Z203Yzi IUYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fOeCWLTy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-49686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCWj0OD6o7jSpockkdt7RVZ6IwkXdiZqk5HGydjpjkaKTz1RPVePbLh/DTMtsXAyzQTQx5pv6yFdOD9TnJ6bzCeIKZUDfcn6yldRTL4LXQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p35-20020a634f63000000b005d8bb44b207si1395066pgl.559.2024.02.02.03.17.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 03:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fOeCWLTy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-49686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AB7E7B2460F for ; Fri, 2 Feb 2024 10:40:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA14513BEA5; Fri, 2 Feb 2024 10:40:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fOeCWLTy" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 4B8112628B; Fri, 2 Feb 2024 10:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706870430; cv=none; b=XJh9D5LSmqx2Dnqr470Nx/4IhIAZu1SEeUt/xratEel49upENg9yZCQOYYsSq2hT/YNrt+Xe65xugk73Dd5XAoZutP5a5zLkhTKS8EoyUhUhfqgVHzkht+8NcTEGLPKg9BKKF2/rMtv4KB9egxjfUfYXj7np8UMkFXQvAaWCGRg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706870430; c=relaxed/simple; bh=TLymezzE5+r0wlZC85xmYHZmI6YZpMuucXlhRm0pcTY=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=F/JINvj5hcjfS1gAdAwv6di4xGoPc/MfjcniGTMzG1iKuQ8YQ+yGez8/S+DsWWe2fcCDzr/8mKIMPhDQmQPor3kAUexnVbmzA5j0o+TbxJB2sPrRIuPjTwpPh4y7eqxFoA8sS+cx6XqQS74Cn2DjbLjGMKkzqcIF5j/cN94KcMQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fOeCWLTy; arc=none smtp.client-ip=209.85.218.44 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 Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a359446b57dso248794266b.3; Fri, 02 Feb 2024 02:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706870426; x=1707475226; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=yr18VgKkUR0Z6xA+Bp01IdzSAv15CAC3JbNxjaal7xE=; b=fOeCWLTytEfYLS5v1YJWd+ZVymGQ7FW08cJ1DffK/09AUn34WOfFnfgVGHJ4fHLpJN ZcjoyTviGQdtB9/Q9RDIieFscRJQnxI1zBKK8Yj94DtPWMfK7ziCK4LdsRmCc800b54V dNtAhbVVF3fAAIQRMDEdBz2aot5+aXFMOrGozNC/MmUonL6KIBpqfIaMsjKmm5s4qgni Y7u0mnvhA01IjC6nJ3qllbLf4gJPZ4Vum0G4uYn//lce39vduxPYBoyW6v3E9t5E5iGm m8gjI7ZzahUgrkPT6Mupu8gUMOYdaIFcnqU/ffBjqoXUBe8pyARp4NvpjkOs6Nrg9xZp Zo8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706870426; x=1707475226; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yr18VgKkUR0Z6xA+Bp01IdzSAv15CAC3JbNxjaal7xE=; b=G2iSR5aZ5qk/LHnx/nmv2fiSN5ah581D61FsirSC7JhNFPsCeeqqIlg8eNZWypyus2 8pvpyL64D1Zl0WyrlC+baHS+2YMnFVKpmSyghmnKkNFRv2B2grjq03tv//k4Xz8rUzF2 vs0gkN1bodD3wEpJC29b1Wcx9XExbju7ts6OMEYpU2AS6Z+KljjZiJkPjJqDXZuAkB9j ayUICwcI7ACWIiurAWmO3c+aaQlXnmjY0f0mxMABnHtVbwmGh6OVCJudZG9l8g1at94q 1qz5nhaIzMEjlsHzIA4D1YJWWSV7QwSQqnPHj01HfUH/B//tSY9WtTPO3QOzSEEEw6eF O50A== X-Gm-Message-State: AOJu0YyYNJn656ESNoB0YsJBWgi0FWrt0OFmIezj8wn9UcRt6BcXqgNV vqLew3AuuBHL1zzHhpb2au+KZ+DbGhrPpQ10/DSlC1qNOfZiXoBL X-Received: by 2002:a17:906:3b8e:b0:a35:9cf0:56d4 with SMTP id u14-20020a1709063b8e00b00a359cf056d4mr3995076ejf.30.1706870426176; Fri, 02 Feb 2024 02:40:26 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUrmf6/v+Xa22VMbRqu6wSX1b6ijQWy9+2d8Xa5a3K+X3iJVkwzB+5zIAQXNGGuZ5E5UFGMJ7Q1Dh/QNeQ63qRHwfiyw9jwMY8OHcYK/R6yOn7wvrXzLCFKoqsAZj2UoJDqKeVG6hvyjB6Ws0ZZv53cl+fY0ZdLXYsqVfdShBFmcVxWbrqeUMfyZ6p+E9WceIHEd4pgUbCiGmQe34PuiWOWwW64RXGNxxk3GfZCCCA9PvFcZLkR0QrVXDNQoYYoMFuk4Edo59wnJ4JOGHfRwS7bBtcE7evMek8oNdgBY0ILQ1ugKAtK856CGhw5iuPhbluweg== Received: from [192.168.3.110] ([86.38.153.11]) by smtp.gmail.com with ESMTPSA id vk7-20020a170907cbc700b00a371a1b40c1sm256385ejc.23.2024.02.02.02.40.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Feb 2024 02:40:25 -0800 (PST) Message-ID: Date: Fri, 2 Feb 2024 12:40:23 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Arturas Moskvinas Subject: Re: [PATCH v2] pinctrl: mcp23s08: Check only GPIOs which have interrupts enabled To: Andy Shevchenko Cc: linus.walleij@linaro.org, biju.das.jz@bp.renesas.com, akaessens@gmail.com, thomas.preston@codethink.co.uk, preid@electromag.com.au, u.kleine-koenig@pengutronix.de, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240201141406.32484-2-arturas.moskvinas@gmail.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/1/24 16:30, Andy Shevchenko wrote: > On Thu, Feb 01, 2024 at 04:14:07PM +0200, Arturas Moskvinas wrote: >> GPINTEN register contains information about GPIOs with enabled >> interrupts no need to check other GPIOs for changes. >> >> Signed-off-by: Arturas Moskvinas >> --- > You forgot to add a changelog here, but no need to resend, just you can respond > to the email since it's not a big issue in this case. Ack. >> + if (mcp_read(mcp, MCP_GPINTEN, &gpinten)) >> + goto unlock; > Do all hw variants have this register available? > Esp. I2C part, wouldn't it be problematic (exception with NACK on the bus)? According to specification sheets MCP(s0)17 [1] page 19, MCP(s0)18 [2] page 19, MCP(s0)08 [3] page 11 - all supported expanders have that register also that register needs to be used [4] to mask/unmask interrupts on given GPIO, without it - expander won't even fire an interrupt. I tested on MCP23018 I2C expander though but module itself is not treating that expander differently for interrupt handling purposes. Do you want that information to be added as part of commit message or information in the mailing thread will be enough? [1] https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23017-Data-Sheet-DS20001952.pdf [2] https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23018-Data-Sheet-DS20002103.pdf [3] https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23008-MCP23S08-Data-Sheet-DS20001919.pdf [4] https://elixir.bootlin.com/linux/v6.7/source/drivers/pinctrl/pinctrl-mcp23s08.c#L473 Arturas Moskvinas