Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2639713pxj; Mon, 14 Jun 2021 03:45:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIDs7vYfPxGlbGC5GIFaGZK+3u5lSLYfVRUTuP/v+L25AFpBq0EMyn8FFtXc5M/HEPCu4J X-Received: by 2002:a05:6402:8d4:: with SMTP id d20mr16092392edz.117.1623667552055; Mon, 14 Jun 2021 03:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623667552; cv=none; d=google.com; s=arc-20160816; b=mwQYqr63LZUjBSFL2HVS/EA6usU7+SOPwBR4pj12HiHtsYKu7Tc+wetCoRLnyCzitF QOdPZexYXLoPLH6OhUfHh53XqsCSYTQtsKmacOR0mf1YaymZsujAd+MQQGEkKC3cKlrv DF8cg+7TIjm7hZoT2iIWYqd7dSnvW4owxE31FKvZmBQQoE3gkjbSwJngAWCmycYpY7Rm 4nNt4Gi3KK7zaYO33DqTZPKVuv3Z2K/fxOBFG5A4x296bhBrCpOU6Deu/q9oEIyYdwaK XO/kaXEd0OKb8cAfuYESwkG/40yVBbmjaE6h68YWCjgRJc4oFsBwCuOrZFt2qcuq/ouw mfcg== 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=VdrRx1uPEEr4gdDJkly2Rm/Yi6adJyovm4opikKoSNY=; b=A/Y1htEDFXPGxDCba/5O0Vk21d3uXQsZExOqwkVhYKGP/iL4/Xjj33FoZEG0aCIq7q kj38nDJZJjjFRn58uU4NsTBngA0uvjrnuvf6LMTji/0x29pIBvlRYZpUBkgup0kARX9j iKpiAnjAjrF0sm7Ie4n6RO137t3jL5axnjjAiO38v0U+z6f1bA9QG1mOZ6u8npOCMDsp MpNoOtAVe2rVLOwpKDMhiVU+N8TxPzFuKMTbbYCCHjg/pon7fl7jLmVPcQtxPF03L9Xa QrQa/OnfqLdO02c0vhiJyBps1xUJkVjlAk+gf2adSL/MDKLcu6sHi3PYf/ta928+CuT1 HT4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qlv8o5bq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si11341039edi.390.2021.06.14.03.45.29; Mon, 14 Jun 2021 03:45:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qlv8o5bq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233573AbhFNKpt (ORCPT + 99 others); Mon, 14 Jun 2021 06:45:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:46340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233142AbhFNKih (ORCPT ); Mon, 14 Jun 2021 06:38:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7628D61356; Mon, 14 Jun 2021 10:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623666846; bh=Lk48o2qLj6bgfpm6K80Agsg0f6fwEF9lq3lLe0tDo+c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qlv8o5bqOFA1C4eoryKnM3zip0RBZBkLIWFuPWuFGpdXL7BHkcSSETudt68fnLOj1 NHGotGL0IppIebMpRVj+gD/5Fj3PFp7YujkgUuflsFlZf1GJeIHAGqfhYN79CT0Rsi joitk6ZsSf5Q8Hqs4UR5N0SIgnJ6A0v8tBSt9AVmn0U9QW5oPNzUdmfH3bH7qLRwK6 q/ZjsDyJO7y8KqtnClx1/PBXIAIdCrcQVXysjkQVYIHy6h//19wMqKPWe69qYH1uWl 9f+8dlGH4ElrBc7ofHU1Oy8d0EPY+tvzaCwzoomCLdPn2CP5vDPL4AyF40Yt3pEqP5 +B4iI8rdMqEjg== Date: Mon, 14 Jun 2021 11:33:46 +0100 From: Mark Brown To: Sander Vanheule Cc: Pavel Machek , Rob Herring , Lee Jones , Greg Kroah-Hartman , "Rafael J . Wysocki" , Michael Walle , Linus Walleij , Bartosz Golaszewski , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, Andrew Lunn , Andy Shevchenko , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/8] regmap: Support atomic forced uncached reads Message-ID: <20210614103346.GB5646@sirena.org.uk> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Content-Disposition: inline In-Reply-To: X-Cookie: Some restrictions may apply. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gatW/ieO32f1wygP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 12, 2021 at 11:12:31PM +0200, Sander Vanheule wrote: > When a user wants to read a single uncached register, cache bypassing > can be enabled. However, this is not atomic unless an external lock is > used for the regmap. When using regcache_cache_bypass, the original > bypass state also cannot be restored. > Add support to atomically read a single uncached value, bypassing any > regmap cache. The expectation here is that if there is a need to do this for some reason the user can arrange to do this for itself - if something is happening that makes a normally non-volatile register volatile then=20 it probably needs higher level coordination. What's the use case? > +int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned = int *val) Bypassed what? I think Andy's naming suggestion was much better. Please also keep to 80 columns if you can, I know the requirements got relaxed a bit but no need to do it excessively. --gatW/ieO32f1wygP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDHMIkACgkQJNaLcl1U h9AVKgf8DG38L+uh12gqBaGzENI6AwYWhYFF7fxG15+iMEqcDc/+KojOLV19AsOD bZy4/g0ejJWDACovU34ee9CYGrrVOsoWxe7731Sx6dhy4EmiKlX5lSl9ujINyqv6 kRnjrVK4WRDOENsotnlKS32NXE0IGlI/56XfhB6Or6tNcb7T63YYEVReJFXW5V/7 zT62SoDlipWFedJ+v5m1sp/3clwM6O/IV46KmpWtQuetGjLf3sjG9GQkh3qDvEwf 7MT+tqzJiymYfbXu/udiQQfkFxR7kSb4KvWvGQVnZ4yqtX4jhCH+6atr23dCO1id rWLPlACVcIHjAElEvzJ5IAqZnRpprQ== =g941 -----END PGP SIGNATURE----- --gatW/ieO32f1wygP--