Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1714032pxb; Wed, 9 Feb 2022 02:56:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxNZjmBA2cfssOKfpyamO3IMq6z0bMMzBCw3Rjthk6aw7u30QyVaue8T8NrYaGXZoKou3j X-Received: by 2002:a63:da0e:: with SMTP id c14mr1420936pgh.598.1644404181172; Wed, 09 Feb 2022 02:56:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644404181; cv=none; d=google.com; s=arc-20160816; b=0PQd4/IfVivBRQ6D4SIPbSrzFxUO8Wsz4YJGJhDTMFcbooRkhuU0UNljwzjNyzc0XE VE7JzOwwqTe0/2W8JPvF42LfsRdDhzJ8K1APcYE6ym+uuqjLb5HH2+Q+nvGv0tcd2l0G JpzvpVcSIHDzNhNKLJT7yKBaN6WwICymfDDb7l+fsgAhg0PnY9FDYYkqqrBDwMe3UVjR 1MD30qhxYPqseEPCNFBzKg2L/R6h0PVXfnmRn3QMYK5tCFzqCj55zuHS9sQ0XLGESdw9 RewhBRmrs2UMoYS3vKAc9CZOvirjS3d92PymurVNhLjI6jphHFqfgfREkuJM+/hBeAUk 4eXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cWmRZJ9l9YFQIc1Fm+9i8vDwxVG2Ie8vz9peJbtegXc=; b=o5rPFVhzPvJUzWeSBHTRkvVjJaDn8xfLdmYAKPTL7tXLWlUkd7+ybKmE2cRZ8qOiL5 tg87dwms2/n1/WibODaaMyPxWPlypKegn7pPm7KyOATNWSRLMe+PtZwRfK8Nm2Q/Hirf tY+DfPnyryWv2qOICsNAItAKb1K9ZPoWgVxZ3ZDnjtt1NP9bnUtHKx3IQQIj0AVhaxWh 1Hy7Mgo6hceDe9zklF1ilYFm1h0R445jINfePNVMiNQErakGDpeqDlRNRMZBmMnt2JbX GJObWxJRC8VH/a6DTWWHQT+AvDRRkTflmZI969+aaYGUc9Jjp69WNf1uMVWDyXJgSglQ ltZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=hWEGNNGe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b3si11851223plg.119.2022.02.09.02.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 02:56:21 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=hWEGNNGe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9F93BE0BF8A7; Wed, 9 Feb 2022 01:29:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376584AbiBHOde (ORCPT + 99 others); Tue, 8 Feb 2022 09:33:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbiBHOdc (ORCPT ); Tue, 8 Feb 2022 09:33:32 -0500 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7117C03FECE; Tue, 8 Feb 2022 06:33:31 -0800 (PST) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 2185vPfv010879; Tue, 8 Feb 2022 08:33:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=cWmRZJ9l9YFQIc1Fm+9i8vDwxVG2Ie8vz9peJbtegXc=; b=hWEGNNGe2hwhhil2O3/I5vDsUNHBt4UHwCAdfd6rbwV6Z7dgGgOxNPo5kq1teDF/IcuH FC2j6wCTZ+kPwkdSa3z5hw+CcyRpVrOf7eHGWuGyVAmoGDFb8AxPM9MnIJEpXa0qU8P7 wLfF7lSt7OXg32tLNYMoJGwvPzEb1kI46Ya4QYJ+PYgIag0pSty/i04EpHeRB2XTjRzC BIOux+mju6Jb4AdXKgE1xLGcsXwXINQEzfny+6SRsKJV9Fw1GfiYUrD46EqbC6v6mF8k gB/WYd3H1SkntNkrHL+3C10dDQSoxxMrn6zxwdIqh6Ym3ps0t+ce8hZzHD+R654LcCWm 9A== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3e34y5se74-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 08 Feb 2022 08:33:18 -0600 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Tue, 8 Feb 2022 14:33:16 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.18 via Frontend Transport; Tue, 8 Feb 2022 14:33:16 +0000 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 6DE902A9; Tue, 8 Feb 2022 14:33:16 +0000 (UTC) Date: Tue, 8 Feb 2022 14:33:16 +0000 From: Charles Keepax To: Mark Brown CC: Marek Szyprowski , Prasad Kumpatla , Greg Kroah-Hartman , "Rafael J. Wysocki" , , Krzysztof Kozlowski , 'Linux Samsung SOC' Subject: Re: [PATCH v2] regmap-irq: Use regmap_irq_update_bits instead of regmap_write Message-ID: <20220208143316.GE112838@ediswmail.ad.cirrus.com> References: <20220119142953.1804-1-quic_pkumpatl@quicinc.com> <39f1b598-58ca-1e3d-3065-8dd692ee7c9f@samsung.com> <20220208133957.GC112838@ediswmail.ad.cirrus.com> <20220208135036.GD112838@ediswmail.ad.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: _3Pt0-93aRLbNEUGyU3aJYTgON3x3QWo X-Proofpoint-ORIG-GUID: _3Pt0-93aRLbNEUGyU3aJYTgON3x3QWo X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 08, 2022 at 01:56:20PM +0000, Mark Brown wrote: > On Tue, Feb 08, 2022 at 01:50:36PM +0000, Charles Keepax wrote: > > The update_bits is really problematic as even in the write 0 to > > clear case, if a new interrupt asserts between the regmap_read > > and regmap_write that make up the update_bits, you will clear that > > new interrupt without ever noticing it. > > My understanding was that they'd mixed interrupt handling in as a > bitfield in another register. Eek.. what a courageous choice. I guess that might work as long as there is only a single IRQ status bit in the register, if there are multiple bits this really needs more complex handling, like you basically need the old behaviour for the IRQ part of the register, and the new behaviour for the not IRQ part of the register. So perhaps a new mask to denote which bit of the register is being used for IRQ stuff? Thanks, Charles