Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4475193imw; Tue, 19 Jul 2022 07:18:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vgKIxtHTJFjlcLQzE1PHvCqSzKJbUwLj5gpYdHHUUwpJNHzThkp3MkiAl53Btg/HxkD5Aj X-Received: by 2002:a17:907:b590:b0:72e:d8ca:5b8d with SMTP id qx16-20020a170907b59000b0072ed8ca5b8dmr25976664ejc.629.1658240307419; Tue, 19 Jul 2022 07:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658240307; cv=none; d=google.com; s=arc-20160816; b=tl8e3wB1nXXoOEGB8IbxTIoNi1XJu3Bt4x33S1K/Lscx/kJw3kntjx8V5WoELsG99S RGfrn8X3BkxKDkYValP1MreArxSMvASjIyaiMJzfo6W+bQiC86PVirXgdYC8V8i2xVCH HcorKYQTQNy+nEjzmGfO0p63xoLe/JmLYZvE5QiWnqPYHh111dFgKPrODI0A2SrssLUm Ez8ZVCoUyEEdwPrf4l2yZ5lbklo1W8P4e3EgPC2ARq7pqfMKH6cKjbhzI6ob6DkvvnuA OQSMkxqZjpnPxe7vp/3niCP83jOrMvsCh0IxIB4oUie1PddStqyIICaTNJNQvb3Mpjd3 3/+A== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/Gf+d454kn9RSmZBOi3SMWWUAaZFfYuiEpsTtHve8Eg=; b=j0Ks8825pwwOaGDJ0tBI7aH1huGE8+bMBReQxJIjiAnQWr3PmxImkYSNcK42A5q1Ca x9VOfCeKVt08Zw+Jhm1xcgx2GDt6QxjXCiboQz0+odOr2A3zS9oYoHeHOd0YzuHcF2kn zFvGlYvVfY4fXeSmuez05istHyhhadelVG7THFp4dpEMLOD1KPU1l32YuE6tgM9yjrQs 1M6R6MQShBhCEWIv76Y5pf6l0lrhty48dr1f5Ub/clNBgL2F8beShYett+fHqyUvASGf gBeyaHo664tamNrO9iG0ACPgrWDKQP8p9YJPWYULQJypS+nDMTvNu3/DRiW/0Ks69AaP uXmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TXYaysPx; 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 l22-20020a170906795600b0072f41d063fasi6851351ejo.725.2022.07.19.07.18.02; Tue, 19 Jul 2022 07:18:27 -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=@kernel.org header.s=k20201202 header.b=TXYaysPx; 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 S238028AbiGSNjm (ORCPT + 99 others); Tue, 19 Jul 2022 09:39:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237501AbiGSNj1 (ORCPT ); Tue, 19 Jul 2022 09:39:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05970B0F85 for ; Tue, 19 Jul 2022 05:53:48 -0700 (PDT) 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 D08DDB81B85 for ; Tue, 19 Jul 2022 12:53:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD485C341C6; Tue, 19 Jul 2022 12:53:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658235224; bh=8GSuYHR9Qba2Ob7biqKhoqBr5wEldhKqsC6JuGbn2uw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TXYaysPxTpT5ToI4B3n9AYxlFG5Wpt0llImc+yvZ3iu9IDhb2pbzr9y2Fk1xn4cfR gcILP/Ojd64yF6OJUcsIaFHoVbYb/yEq6aVVEvJCZj+kXJzES8vE+2/1t1ItWVvwYt 9LxGnBuoaNEmDjTp4D359zZyLMBv/qSoEl+8QpHDPpc46qMWpVzW0CzIkxXTVj9JMC sXa2HhT/1i8KFIBHsVczIA+0tSPBQ+kx2ahGld4CWjgeJ6a2bI+W1ITt7gnn14Gk/N UrmGdKFUUO4BAkEmI/DyeacX4YMRjqd582J4GclUdZx+YD6R1rQbxJqTKYmVIh6Hk5 lzoXCJRbW7GHw== Date: Tue, 19 Jul 2022 13:53:39 +0100 From: Mark Brown To: Krzysztof Kozlowski Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Srinivas Kandagatla , Charles Keepax , Kuninori Morimoto , Bjorn Andersson Subject: Re: [PATCH] regmap: support regmap_field_write() on non-readable fields Message-ID: References: <20220719121446.375095-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7fCRvdoT1wNEUdmZ" Content-Disposition: inline In-Reply-To: <20220719121446.375095-1-krzysztof.kozlowski@linaro.org> X-Cookie: We have ears, earther...FOUR OF THEM! X-Spam-Status: No, score=-7.8 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 --7fCRvdoT1wNEUdmZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 19, 2022 at 02:14:46PM +0200, Krzysztof Kozlowski wrote: > Extend regmap_field_write() and regmap_field_force_write() to check if > register is readable and only then perform an update. In the other > case, it is expected that mask of field covers entire register thus a > full write is allowed. The other possible assumption there would be that the other bits are write as zero - that's not 100% safe but does make sense if for example the fields are being used to capture acknowledgement flags moving around. That's not incompatible with doing this of course, we can always relax things later. --7fCRvdoT1wNEUdmZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLWqVIACgkQJNaLcl1U h9CfEAf/ZHrQEcIff8+xgeY6KhDcnRpVAc0HN1c/HRq+Q/9ywMn2WcfYonHIIO/+ QpFUFx2cEcLqtA7b0jtX3dF2cpkbP977xC6h682tm4Zg+egmQzmWuBM+/JOrv9k5 HBmT1r0OqxXbOVXsBpSVhgt3NVfNix3wFhK/g55B/OhPYZYOleWnlrd1cH3lvgRG 26ZapN6kSFH19xrar9R1FlvLxMFPVnOhAoHS7gZbSLz3/y5TweL/18JJ7ZhgGJ3j 5mQO1g67XEtbG8MBICOM0/eSDv3ipKXQAGsOUN9oc5ClKVGzFvJdJkGvc6KDlfsj edqv12q4Q5xnipS70jCFgZzZ2MJFoA== =CW/A -----END PGP SIGNATURE----- --7fCRvdoT1wNEUdmZ--