Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp215910imm; Thu, 10 May 2018 19:01:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoRXpIXXPjIXzxwAYaO6L4jirssO2fh8Uxr6nZDgzDFqb4UgbOUQbKLRXnYtscL1kMJJHhv X-Received: by 2002:a63:78cf:: with SMTP id t198-v6mr2891394pgc.382.1526004085020; Thu, 10 May 2018 19:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526004084; cv=none; d=google.com; s=arc-20160816; b=qYKONf7fFoP3kLgxyt1WGR/aPmTA8tlEckuYE8CJoWEYWYg0Km3UDfCZOm4PoYzu6t O+3rOWHXeyFh5BlJAkoE5gmQd2RtTg95vfwMazpWk3sSH10nMzm4FWaxseo/rlIUeORt EYM5HNaqtG/Reeu6gfpO3wtUrk5oNxZkVtK9kHBp16qW9yLQRIFdqdIMuqELuJcEw02n RNvnaxTGvkCJg3XJma6PMGsqSVbk36ujJym8SbNmFbbApZ9r2gJHi1hWSGTmf0n+zCbK SxINTbthimppvnGBBsQLDRBGsOV0LnRv2kxBpZAYoIJkc1LWM+pygwfaw+UsDCk4yN09 l88w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=wqBY39hZAWpqo8WUUfqY2B4/vVxsa42yKDzpQq1JSgg=; b=t9xpbFQHdA0iooaOZqId19p8PAyuP9ZecbrwebxsrrBhg+1qPUThatSfSrzgFfximt RBxSAY1DfDA2YY756JfhqDYhuIdYTO6OpJf+SaEw65JQe4hYLvEqT9VnSM4l9FO930Kj 2X/aOHMEpvKnKFO3u9tdnIqdc4D+VrvvEw8eKJ3X0vVVfD7FLVSJMuJU8JxyBIHPz484 gAdFnasozdlzVXAvkIEpJJ7spjPGAc89owKazXDAx53LhBdUd436DnbUTsL9cit05djs o0+cbNXCu7P6Lgx9N4wazleBlAn7SP1bZAgFn12gqwq4F2j6Kcnku1YcPTp1p6Ln3zVS bG7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=BGDveIES; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p27-v6si2165813pfd.76.2018.05.10.19.01.10; Thu, 10 May 2018 19:01:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=BGDveIES; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbeEKCBA (ORCPT + 99 others); Thu, 10 May 2018 22:01:00 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:54182 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750798AbeEKCA6 (ORCPT ); Thu, 10 May 2018 22:00:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wqBY39hZAWpqo8WUUfqY2B4/vVxsa42yKDzpQq1JSgg=; b=BGDveIESHHdxYUHfc2rB8hejJ ng62GTjBhT37Vj4jQPsWPpJ+U94dWyn3XN0w9xwdWfAgnkdypPwNkCxATK0vdUtodlVCr6DHUVxuw yFgi3FUUCRJNDqvzD6kZTQv8EQMo0b9yOX/2xbmYGa9hXxgX57QwjzbaBV2o9RlKfyGQ8=; Received: from [2001:268:c0cd:b8ca:2aa0:ebb3:99a:5339] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGxMf-0002NA-CM; Fri, 11 May 2018 02:00:57 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 4B3A844007A; Fri, 11 May 2018 03:00:49 +0100 (BST) Date: Fri, 11 May 2018 11:00:49 +0900 From: Mark Brown To: Jorge Ramirez-Ortiz Cc: linux-kernel@vger.kernel.org Subject: Re: [RFC] regmap: allow volatile register writes with cached only read maps Message-ID: <20180511020049.GD949@sirena.org.uk> References: <1525817169-29233-1-git-send-email-jramirez@baylibre.com> <20180509083919.GU13402@sirena.org.uk> <65607fde-d0e9-0f08-3042-f6a58b760896@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XvKFcGCOAo53UbWW" Content-Disposition: inline In-Reply-To: <65607fde-d0e9-0f08-3042-f6a58b760896@baylibre.com> X-Cookie: Falling rock. User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --XvKFcGCOAo53UbWW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 09, 2018 at 01:49:21PM +0200, Jorge Ramirez-Ortiz wrote: > On 05/09/2018 10:39 AM, Mark Brown wrote: > > I don't understand what voltile access means for write only devices. > > Volatile means that we don't read the cache but go direct to the > > hardware so if we can't read the hardware that's pretty redundant, a > > volatile read that goes to the cache is just a default read. > 1. only cached reads: (as a consequence every regmap write must succeed). > 2. cached writes: do not access the hardware unless the value differs from > what is in the cache already or (3) applies. > 3. support for selectable volatile writes: those that will always access the > device no matter what the cache holds. We don't currently suppress writes except when regmap_update_bits() notices that the modification was a noop. You probably want to be using regmap_write_bits() here instead of regmap_update_bits(), that will always do the write. --XvKFcGCOAo53UbWW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlr0+U4ACgkQJNaLcl1U h9CwWQf/fiJ7F3xxH39O2dSNz/znNZAxwntGVsOp0YzSzKUVdQ7c5WXucyPkOE5I fyV3k7R0qLDVKgA+hzR17fXnRHDSw2dw6cwT+tSlcbSzbhrRSXqF3PUXI6fMIm05 En8XuisDZnAyT+1dEUr31ufYnn2qKTrmOpO6s+HOJbWVd3vc4jE2SP8tbXO/cQ1k dCy80ScqmU8dxpm89avEaZiwemDH3a6WSgIL0pvXtz9ksYPFgiYUMg1A8utd3eTQ LBa/fDoO7JWh4v8s1/lZ8VDoIbiQjNHH3WIGwC/cgh6kMFsZfloa3j3lJ01NgFGr mpV/iKn9tSZFeu4ss2y3uzefRRCHPg== =bikF -----END PGP SIGNATURE----- --XvKFcGCOAo53UbWW--