Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2408720rdb; Mon, 5 Feb 2024 05:57:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEz57CY2fEGWqLw21z4nPjX+TfWuDoaumktNF/UcwNCvaiVKlXw9AmQr5WpuCBpdOLa+cYD X-Received: by 2002:aa7:8810:0:b0:6e0:3b48:572d with SMTP id c16-20020aa78810000000b006e03b48572dmr2675182pfo.31.1707141430438; Mon, 05 Feb 2024 05:57:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707141430; cv=pass; d=google.com; s=arc-20160816; b=rCyrJXh9XIDfrAaylSqECJ3zmNeJH+XaWUtIv7rxRuGi00hUcuH2ewNjNWbU0q2VmO 6qylzjum9D5PyCEQ/xL1B6wPbJ+8AQVJmkxAaUJvBWkn4dkUkdGtbO1Yszoma1boKgJI EgxnOdgryQuRHbHw3Zs2pHNTd23mTo0HYjCA1k9sUnSEosmiV6//tWiUUnBl0a7+tYrf hwCGdI7GdQUfwxgGpt1KehtOhzyf9UcSoodgzLujD+cUOIIeVhL/0h1w/rDpxmPH9Yv0 iK6iIGFCemLj109T+3T9H3/W5CXzpW1JHuuj6PQE53WD9+IlNDygp+6EMJYDdrYIbgI9 YSCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=xdOJlIJSa2PTQ1cYdCEUcOqJ41kPT9mvY/Khe0o8WuA=; fh=Q6Ijg+/aXsSQJ6OOybN9/QnXCohXemSNh1aLr1DaFgg=; b=vlXgcQ1AUTLT9fc3bLL/F4p7C24BKfTOpvNpm3fzaXZ1TFsSOwEc0UK0wMHlsUyKhG 4VWB5aT+GMYNnXZ1jlfQh4DfcGcYoXVetPC34HLFXvKrdp+9oF9aDbvJuLMNdSBYdOBI Jb3T+21zQGkVawDD1nG6KUg2hqOSWH29BfYofAt2uXgm2nOh636IxTa6Qz0bKotIAwzC AcpQ7a2OO5RsEvlaCRFdfNxuoM2ImZHE+iTjROxC60Z5yYR+Atzj0b3ydQ1jaCkDYDYZ Xf2RDj39/94RyPrdgoy8UMT28e2sTHoeRO7DS2UMRUuQ6I4ax4jo0X+AUrSMyHWqJgT3 9cgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nWWPpcv9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-52760-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCUJ5KvB3A+aPvN9gi+L9m/Q52tdQMZ6KkWKR+HNl+BWHG5ZpHNUXLlV5TRtvzzBXrIb7aRa5hWhxEd9kWMs12zPgmYiktMty1lp+l7bFg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z5-20020aa79905000000b006e04ec2eeefsi634518pff.260.2024.02.05.05.57.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 05:57:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52760-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nWWPpcv9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-52760-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1B220281A30 for ; Mon, 5 Feb 2024 13:57:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE7E122F03; Mon, 5 Feb 2024 13:56:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nWWPpcv9" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A65222EED; Mon, 5 Feb 2024 13:56:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707141397; cv=none; b=SdAPvVMx1WYXP7EIKbZTpD5l+ryhn5j1jPWJPMtXtGA0SA8o9mGEJft+cYN5g8WMcxe9Nalh14FGDSuLxRGBhkoDhxrlGW8Bpmf0xCCx8gRxIEy5PKkH5cDf1htbkVOhyR3iJ7hkTyLS5MAn4NccJDHwHBzx5O3uaippShBjFr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707141397; c=relaxed/simple; bh=a9AWEeBnJr2boZUHp+YtnhfbRsyRm9DVOa26c/HAV34=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=pHhsACzDtTi/c+XU1S2hqUgD7o6RIbOCollTwn0JHPSjd0LTHz5J8CCznBE6ktwXaiKRmaFsubiqR2MDqrBOSROOSlkpBiWav9mcDi6QWegj3/sta3aMOHymSVMr4sXYNNRgmUSqTrCM3+nEGQth35TnJVO/YKADil2+DwtQM7A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nWWPpcv9; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707141395; x=1738677395; h=date:from:to:cc:subject:message-id:mime-version; bh=a9AWEeBnJr2boZUHp+YtnhfbRsyRm9DVOa26c/HAV34=; b=nWWPpcv9RE+iaSflzp3fDgv9eO6UxQdQ4fsshcPMyNFbZepGGNQGy1OA V1UvjDTJv02YGRxVlMGfdeKUo5OfbX26jYuR5RZ2sreFLEW/Y2lAmiGRU zttjFGbFbmWQw6ty0NBvh9Akkl9RMYpJ69DBu7Ia83GDTU5iKf6LhO9+P vVgvMlEVqJdPNqvMjx71QP81AWEDskiJ4v/o3Vn0YJb7nT38kUAEzVQPe kH4OMiExbMMmdObQQuEVXRNqcIamcL0Oveku1B8tn9gkwE1XNB1YxlAdS xwUddhYu/tVAYzOGNGY52CRu+5Ry6uH4iq9s21sxIk2b+uJGnGPabHMfE A==; X-IronPort-AV: E=McAfee;i="6600,9927,10974"; a="432085" X-IronPort-AV: E=Sophos;i="6.05,245,1701158400"; d="scan'208";a="432085" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2024 05:56:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10974"; a="909301200" X-IronPort-AV: E=Sophos;i="6.05,245,1701158400"; d="scan'208";a="909301200" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2024 05:56:32 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rWzSX-000000025xX-2xgV; Mon, 05 Feb 2024 15:56:29 +0200 Date: Mon, 5 Feb 2024 15:56:29 +0200 From: Andy Shevchenko To: Arturas Moskvinas 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 Subject: Re: [PATCH v2] pinctrl: mcp23s08: Check only GPIOs which have interrupts enabled Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Fri, Feb 02, 2024 at 12:40:23PM +0200, Arturas Moskvinas wrote: > > 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. Thank you for the clarification! > Do you want that information to be added as part of commit message or > information in the mailing thread will be enough? Up to maintainers. I'm fine with this email. If Linus uses b4 to generate a Link tag to this discussion it will be enough (in my opinion). > [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 -- With Best Regards, Andy Shevchenko