public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Doug Anderson <dianders@chromium.org>, broonie@kernel.org
Cc: Anton Vorontsov <anton@enomsg.org>,
	Olof Johansson <olof@lixom.net>,
	Sachin Kamat <sachin.kamat@linaro.org>,
	ajaykumar.rs@samsung.com, linux-samsung-soc@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mfd: tps65090: Stop caching registers
Date: Wed, 16 Apr 2014 10:59:22 +0100	[thread overview]
Message-ID: <20140416095922.GG4754@lee--X1> (raw)
In-Reply-To: <1397592876-5741-3-git-send-email-dianders@chromium.org>

> Nearly all of the registers in tps65090 combine control bits and
> status bits.  Turn off caching of registers so that we can read status
> bits reliably.
> 
> NOTE: the IRQnMASK and CG_CTRLn registers are the exception and could
> be cached.  If we find that we spend a lot of time reading those we
> can turn on cache for just those registers.
> 
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
>  drivers/mfd/tps65090.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
> index c3cddb4..4cfdd07 100644
> --- a/drivers/mfd/tps65090.c
> +++ b/drivers/mfd/tps65090.c
> @@ -149,21 +149,11 @@ static struct regmap_irq_chip tps65090_irq_chip = {
>  	.mask_invert = true,
>  };
>  
> -static bool is_volatile_reg(struct device *dev, unsigned int reg)
> -{
> -	if ((reg == TPS65090_INT_STS) || (reg == TPS65090_INT_STS2))
> -		return true;
> -	else
> -		return false;
> -}
> -

I don't know enough about Regmap internals to know what this actually
affects in real terms.

Mark,
  Does this change seem sane to you?

>  static const struct regmap_config tps65090_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  	.max_register = TOTAL_NUM_REG,
>  	.num_reg_defaults_raw = TOTAL_NUM_REG,
> -	.cache_type = REGCACHE_RBTREE,
> -	.volatile_reg = is_volatile_reg,
>  };
>  
>  #ifdef CONFIG_OF

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-04-16  9:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 20:14 [PATCH 0/3] Fixes for tps65090 for Samsung ARM Chromebook Doug Anderson
2014-04-15 20:14 ` [PATCH 1/3] mfd: tps65090: Allow charger module to be used when no irq Doug Anderson
2014-04-16  9:52   ` Lee Jones
2014-04-16 15:42     ` Doug Anderson
2014-04-16 16:26       ` Lee Jones
2014-04-16 17:45         ` Doug Anderson
2014-04-16 19:03           ` Lee Jones
2014-04-15 20:14 ` [PATCH 2/3] mfd: tps65090: Stop caching registers Doug Anderson
2014-04-16  9:59   ` Lee Jones [this message]
2014-04-16 10:13     ` Mark Brown
2014-04-16 18:27       ` Doug Anderson
2014-04-15 20:14 ` [PATCH 3/3] regulator: tps65090: Make FETs more reliable Doug Anderson
2014-04-15 22:52   ` Mark Brown
2014-04-16 18:28     ` Doug Anderson
2014-04-16 18:25 ` [PATCH v2 0/5] Fixes for tps65090 for Samsung ARM Chromebook Doug Anderson
2014-04-16 18:25   ` [PATCH v2 1/5] mfd: tps65090: Don't tell child devices we have an IRQ if we don't Doug Anderson
2014-04-16 18:25   ` [PATCH v2 2/5] charger: tps65090: Allow charger module to be used when no irq Doug Anderson
2014-04-16 18:25   ` [PATCH v2 3/5] mfd: tps65090: Stop caching most registers Doug Anderson
2014-04-16 18:25   ` [PATCH v2 4/5] regulator: tps65090: Allow setting the overcurrent wait time Doug Anderson
2014-04-16 20:33     ` Randy Dunlap
2014-04-16 23:12       ` Doug Anderson
2014-04-16 18:25   ` [PATCH v2 5/5] regulator: tps65090: Make FETs more reliable by adding retries Doug Anderson
2014-04-16 20:50     ` Simon Glass
2014-04-16 21:25       ` Doug Anderson
2014-04-16 23:24         ` Simon Glass
2014-04-16 20:51     ` Mark Brown
2014-04-16 21:34       ` Doug Anderson
2014-04-16 21:54         ` Mark Brown
2014-04-16 22:59           ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140416095922.GG4754@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=ajaykumar.rs@samsung.com \
    --cc=anton@enomsg.org \
    --cc=broonie@kernel.org \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sachin.kamat@linaro.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox