public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: gregkh@linuxfoundation.org, lrg@ti.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V1 2/4] regulator: tps62360: enable register cache
Date: Mon, 7 May 2012 12:13:28 +0100	[thread overview]
Message-ID: <20120507111327.GH4415@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1336376139-1048-3-git-send-email-ldewangan@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

On Mon, May 07, 2012 at 01:05:37PM +0530, Laxman Dewangan wrote:

>  static const struct regmap_config tps62360_regmap_config = {
> -	.reg_bits = 8,
> -	.val_bits = 8,
> +	.reg_bits		= 8,
> +	.val_bits		= 8,
> +	.max_register		= REG_CHIPID,
> +	.num_reg_defaults_raw	= REG_CHIPID + 1,
> +	.cache_type		= REGCACHE_RBTREE,
>  };

Since you're using the rbtree cache which can fill itself gradually it's
better to not set num_reg_defaults_raw, especially not without providing
the defaults.  Doing this may lead to bugs later as the framework thinks
it has the chip defaults when it doesn't really.  If you omit this we'll
just cache gradually as we access the registers.

The ability to read the default values from the chip is intended for use
with caches which must have defaults, and should only be used when doing
a hard reset of the device during startup.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-05-07 11:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07  7:35 [PATCH V1 0/4] regulator: tps62360: add cache support and settling time Laxman Dewangan
2012-05-07  7:35 ` [PATCH V1 1/4] regmap: add function for set/clear bits Laxman Dewangan
2012-05-07 10:55   ` Mark Brown
2012-05-07  7:35 ` [PATCH V1 2/4] regulator: tps62360: enable register cache Laxman Dewangan
2012-05-07 11:13   ` Mark Brown [this message]
2012-05-07  7:35 ` [PATCH V1 3/4] regulator: tps62360: use efficient function Laxman Dewangan
2012-05-07  7:35 ` [PATCH V1 4/4] regulator: tps62360: Provide settling time for voltage change Laxman Dewangan
2012-05-07 11:23   ` Mark Brown
2012-05-07 12:42     ` Laxman Dewangan
2012-05-07 14:22       ` Mark Brown
2012-05-07 14:45         ` Laxman Dewangan
2012-05-07 14:51           ` Mark Brown

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=20120507111327.GH4415@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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