Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3649750iog; Tue, 21 Jun 2022 03:09:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tFZ2NHzSoEJLddzFzea1QVFqvwQpr6u+w5TkPwj7QcXlIcY1c+xHbt74+rLSoJudjlopx5 X-Received: by 2002:a05:6402:26c3:b0:430:efd4:4edb with SMTP id x3-20020a05640226c300b00430efd44edbmr35329663edd.53.1655806149176; Tue, 21 Jun 2022 03:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655806149; cv=none; d=google.com; s=arc-20160816; b=g7at35jR6yCOxo5bAYTlT0EYcvxe4hcIosmUfodaij+m1S+H1KhHdb/Tm64H9sxI06 xBADYg/WbZzyRVoNRQs353dxnaa60v63Urjrw2+lJUZF1U/Mhjf7xytK2CsnKBA9V/yG Gl9MaEELuDPAmB8EIN38zUMgD2XqVXQTPUfd7CRg/8uKkAK2LyoW5ArCpEFeuhy1GI0v HsEHc5unDKx3kYMcMaZSkDIi7mkbZryTYClPMGQ8FUcXeBx5Y2V43lQtOM74BH41yphK rX/dh6y5eml0siIYXmlmL9FENw45m2IN0K9LRDkqTLSLx7uT3V21dSBChgO2EQxm2Zha ySLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=c7tGMV7/SSO3JozWEHbkFTrboHXpmm3VDf/oaKBPuDs=; b=sZ2nibU+bgcdiQs+mOFy5o3JDZ0CcaFI92nXxVASJXn03F40luiNLxRaMJdUtxSiAv 1FJPYfpPbEgwVAiJQjKXeevnlXWouNPkDk0tSEAIzE8+FYs4VY2/P+d1/U/uzIO28KLL +9GeI3Wrsx2FJK8p/iKQ8fQkP2RQIdUWhfpbVNrgCvGy6xYtgZELIN9r0RPUQ7mmQJxz L1Po56qBIHmMwJP0inYQZd5f7n/iIn4K1Vq/Z5brSlDwquv4EOD6vj8tMDt/X2CtOIeW wIset04VOtqgVOm+cxaaYf8vkMNx1E45Bq/2md8GCrVqJUciu+KuT9RYwNOQuiEByRr+ nffw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BUGmrcAU; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj4-20020a1709069c8400b006fed9affed0si17579201ejc.528.2022.06.21.03.08.43; Tue, 21 Jun 2022 03:09:09 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=BUGmrcAU; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348953AbiFUJeQ (ORCPT + 99 others); Tue, 21 Jun 2022 05:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348964AbiFUJeP (ORCPT ); Tue, 21 Jun 2022 05:34:15 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA4B825C7F; Tue, 21 Jun 2022 02:34:13 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id cf14so8767711edb.8; Tue, 21 Jun 2022 02:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c7tGMV7/SSO3JozWEHbkFTrboHXpmm3VDf/oaKBPuDs=; b=BUGmrcAUC+BxJxranrDe0YJYzGvQkDLTBZjdzWtcfzrpUMCnxTVONXV0mU3URS5tLL aEOSB9xjhNccR9NdTm0PXAB31J+uj3WMdOSSAcTNqu5PPt4bWhBbZj33RozwJCD/yiKw aHWzcKV8n5eWavzTVIcGpfPCfSHFkmxIrynAq1xxs+lS4+qvsptHbhl4YwmwptrNB3Nm BqUf9oYH5JyI1RkDsf7QjLD7aLBiXMcbClIMDqdNnscmsnklX7J0ionOlcwtPKbTTD6W MWo/2NK17ioZE0f4OZTLPJxUbR3T9Flg/zpzKS0On4R8An+t7QKX8I7HCC+lq7kqxQUE aL4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c7tGMV7/SSO3JozWEHbkFTrboHXpmm3VDf/oaKBPuDs=; b=TEaSHaAhNVb8CWbwmRh1vvD/nB/ECDkW+UHJmbfMJi30FMpKohP7w30NU9eEW4Sbro 5BATQXEcjyCRS1Vlz7XVzSWCeLFDnNo9y/WHEq2gnmS9F46xou9zti4VEi9vqlfClv1P wZ7cudz6eHKQAgTcHb8Tn4OAS0vS0q1Fwy5C3Rf8tDvknhkHCs/Fn6ePfhiTjoSPRF2b Jc/yWkN6iLmSRHbp1rKy6LpIBgaAIoTpmNg4lZgVVKYn9j7GzdX73Hnw1dgIeh70M6fD WvupNsm1hC44aGoGGKoxeDuh7WmppukFtAfybko30VFaavBKXqo0AhtLtSev6b7DT1Uo LHHQ== X-Gm-Message-State: AJIora8olAy+G95ki6va6oxq9ZcMU8udERr6eHHjEdzKjtHmjJO4n0Ay oKxpsJJyhDG47FgeHjvoIzocSZPkmka6u8lLgYI= X-Received: by 2002:a05:6402:4390:b0:42e:b7e:e9ac with SMTP id o16-20020a056402439000b0042e0b7ee9acmr34705675edc.97.1655804052209; Tue, 21 Jun 2022 02:34:12 -0700 (PDT) MIME-Version: 1.0 References: <20220620200644.1961936-1-aidanmacdonald.0x0@gmail.com> <20220620200644.1961936-18-aidanmacdonald.0x0@gmail.com> In-Reply-To: <20220620200644.1961936-18-aidanmacdonald.0x0@gmail.com> From: Andy Shevchenko Date: Tue, 21 Jun 2022 11:33:35 +0200 Message-ID: Subject: Re: [PATCH 17/49] regmap-irq: Add broken_mask_unmask flag To: Aidan MacDonald Cc: Mark Brown , Andy Gross , Bjorn Andersson , Srinivas Kandagatla , Banajit Goswami , Greg Kroah-Hartman , "Rafael J. Wysocki" , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , MyungJoo Ham , Michael Walle , Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Marc Zyngier , Lee Jones , Manivannan Sadhasivam , Cristian Ciocaltea , Chen-Yu Tsai , tharvey@gateworks.com, rjones@gateworks.com, Matti Vaittinen , orsonzhai@gmail.com, baolin.wang7@gmail.com, zhang.lyra@gmail.com, Jernej Skrabec , Samuel Holland , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , linux-actions@lists.infradead.org, linux-arm-msm , linux-arm Mailing List , linux-sunxi@lists.linux.dev, ALSA Development Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, Jun 20, 2022 at 10:08 PM Aidan MacDonald wrote: > > This flag is necessary to prepare for fixing the behavior of unmask > registers. Existing chips that set mask_base and unmask_base must > set broken_mask_unmask=1 to declare that they expect the mask bits Boolean should take true/false. > will be inverted in both registers, contrary to the usual behavior > of mask registers. > diff --git a/include/linux/regmap.h b/include/linux/regmap.h > index ee2567a0465c..21a70fd99493 100644 > --- a/include/linux/regmap.h > +++ b/include/linux/regmap.h > @@ -1523,6 +1523,7 @@ struct regmap_irq_chip { > bool clear_on_unmask:1; > bool not_fixed_stride:1; > bool status_invert:1; > + bool broken_mask_unmask:1; Looking at the given context, I would group it with clean_on_unmask above. The above is weird enough on its own. Can you prepare a precursor patch that either drops the bit fields of booleans or moves them to unsigned int? Note, bit fields in C are beasts when it goes to concurrent access. It would be nice to ensure these are not the cases of a such. -- With Best Regards, Andy Shevchenko