mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiubo Li <lixiubo@cmss.chinamobile.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regmap: speed up the regcache_init()
Date: Wed, 09 Dec 2015 11:17:22 +0800	[thread overview]
Message-ID: <56679D42.3030708@cmss.chinamobile.com> (raw)
In-Reply-To: <20151208170517.GU5727@sirena.org.uk>



On 09/12/2015 01:05, Mark Brown wrote:
> On Thu, Dec 03, 2015 at 10:19:10AM +0800, Xiubo Li wrote:
>
>> If the cache is not used by the device driver, there is not need to
>> check the striding of the registers. It will just return 0 from
>> regcache_init() and let the register striding be checked in proper
>> place when needed.
>> -	for (i = 0; i < config->num_reg_defaults; i++)
>> -		if (config->reg_defaults[i].reg % map->reg_stride)
>> -			return -EINVAL;
>> -
>>   	if (map->cache_type == REGCACHE_NONE) {
>>   		map->cache_bypass = true;
>>   		return 0;
>>   	}
> If we're not using the register cache why are there defaults in the
> first place?
Yes, usually when the register cache is not used, the number of the
defaults should be zero, but for some drivers like drv2267.c/led_lp8860.c
will add the defaults register values though the cache type is
REGCACHE_NONE for some reasons.

This patch may be not the best, but will be a bit meaningful for some
drivers like drv2267.c/led_lp8860.c for now.

Thanks,

BRs

Xiubo









  reply	other threads:[~2015-12-09  3:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03  2:19 Xiubo Li
2015-12-08 17:05 ` Mark Brown
2015-12-09  3:17   ` Xiubo Li [this message]
2015-12-09 15:05     ` Mark Brown
2015-12-10  1:37       ` Xiubo Li

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=56679D42.3030708@cmss.chinamobile.com \
    --to=lixiubo@cmss.chinamobile.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome