Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp981147rwb; Wed, 16 Nov 2022 10:11:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf79kaZLFUs5f2IsRDmeOlguYNTtOwR7oS5WnFmfFFqMS04plcG4A8s0O7bkSG1qnDOSeF4r X-Received: by 2002:a17:906:148c:b0:7ad:f0ae:bc88 with SMTP id x12-20020a170906148c00b007adf0aebc88mr19178511ejc.188.1668622284791; Wed, 16 Nov 2022 10:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668622284; cv=none; d=google.com; s=arc-20160816; b=J2RHTuLC6WFwfNDA080l/e4hNbW//k2B4HeBDxbhLBPGiG+c+kmo5CA+iTSYhBFozU FZy9WuCQ0jouriAkaovVjLwq5bSOxS9w9w60sQVjLCKP6i1UuGfa5O3OzepX6logHWIq wMdO7H2XU45R7PUnUPY1DPZM8kWX57VnSzpHr754csauoetj6AYTj5AJSru1tOMBzbic 34c6z2srzmR4+E+fqpZUX8FpSGvgqmSrxaOzN9UqD7cWKsGB03oRq2eSLXV/FwFLc/Lj yvrCBrDx9Y4NYShNAeiNPkGM1WGJO5M60Apdv7zQNu3C6xAJr6dq1iEYG7vckac1aHVT jDGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NzNuTLbySNYQ6omvST00EsvbAIc84fpzZQEmHOvxdxk=; b=iHTvdHKMPg1NsY9WVwP8Evk2CETXvS0cmh8Dv0Ot5oU4luSTCsYGSfcz13aHdgexoE dLPJa5LU1YS/pidsIfevrQqq5/9cG15Yjtgjt98wHd19y6Cl+fL5fuOEBDzbq/0282x+ bRXiPruzBBwrAT4y+rn/So2496ZkjHdSq5/gtR4YaXmMFLBZ8Hmu3Xm38j4Xnkip/4Fg 9rAhhK36KlNjr7YJS1RjqEQpHoJ1yTR0y9zce+0/b80CKZ8NGVFaKG+nRBvuLgEwWnSm OUXWLmplXCAy5s9XruabcArElLWFnXzsHKnywO6y2CV5XMfnmDHIj7aMVf4z2DyOKNGW SuFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S9O3Q1Pu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t10-20020aa7db0a000000b00459563e2c60si7459293eds.329.2022.11.16.10.11.03; Wed, 16 Nov 2022 10:11:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S9O3Q1Pu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233801AbiKPR7T (ORCPT + 90 others); Wed, 16 Nov 2022 12:59:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234355AbiKPR66 (ORCPT ); Wed, 16 Nov 2022 12:58:58 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB44561BBF for ; Wed, 16 Nov 2022 09:58:50 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 21CEBB81E4B for ; Wed, 16 Nov 2022 17:58:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31CDEC433C1; Wed, 16 Nov 2022 17:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668621527; bh=+X4h0tnXqsCDnjUgkpHcRbNmv3eV5BVXgFlXwVHOACk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S9O3Q1Pu5tf8kAo/z7rhbgHurKNAvB9rPham3YBNRIV2Q7Yn+nroURujrgh8QqZI5 cTYv87NfiSzKkF07GnEueWbfBw5PyHeNbBV7k8II/k6f8RFIghcvVKSX8u22d4Ufr+ 8iDZF3Bg7fX2KaJaWUxeGR2EoQm9fDS+iynFnhmVOCvdFaAoZkIoTaIjdt4UcQsACI 1bjD4HBrNEDBPgbeYkwRlAZwy0m4mOZuBvEguNxzDkaRUkIG5TubiTZCiSeaLh10om 1DXDjiZOBooDWsh/q5sJdz4+XgpWMF/qI/CSLxhpja3VP1XO33UsUodn8HBTz8ryde vAr2xUqOFPuAg== Date: Wed, 16 Nov 2022 17:58:41 +0000 From: Lee Jones To: Aidan MacDonald Cc: mani@kernel.org, cristian.ciocaltea@gmail.com, wens@csie.org, tharvey@gateworks.com, cw00.choi@samsung.com, krzysztof.kozlowski@linaro.org, brgl@bgdev.pl, mazziesaccount@gmail.com, orsonzhai@gmail.com, baolin.wang@linux.alibaba.com, zhang.lyra@gmail.com, jernej.skrabec@gmail.com, samuel@sholland.org, linux-kernel@vger.kernel.org, linux-actions@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 15/18] mfd: stpmic1: Fix swapped mask/unmask in irq chip Message-ID: References: <20221112151835.39059-1-aidanmacdonald.0x0@gmail.com> <20221112151835.39059-16-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221112151835.39059-16-aidanmacdonald.0x0@gmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Sat, 12 Nov 2022, Aidan MacDonald wrote: > The usual behavior of mask registers is writing a '1' bit to > disable (mask) an interrupt; similarly, writing a '1' bit to > an unmask register enables (unmasks) an interrupt. > > Due to a longstanding issue in regmap-irq, mask and unmask > registers were inverted when both kinds of registers were > present on the same chip, ie. regmap-irq actually wrote '1's > to the mask register to enable an IRQ and '1's to the unmask > register to disable an IRQ. > > This was fixed by commit e8ffb12e7f06 ("regmap-irq: Fix > inverted handling of unmask registers") but the fix is opt-in > via mask_unmask_non_inverted = true because it requires manual > changes for each affected driver. The new behavior will become > the default once all drivers have been updated. > > The STPMIC1 has a normal mask register with separate set and > clear registers. The driver intends to use the set & clear > registers with regmap-irq and has compensated for regmap-irq's > inverted behavior, and should currently be working properly. > Thus, swap mask_base and unmask_base, and opt in to the new > non-inverted behavior. > > Signed-off-by: Aidan MacDonald > --- > drivers/mfd/stpmic1.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Applied, thanks. -- Lee Jones [李琼斯]