Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287054

Re: [PATCH] regmap: speed up the regcache_init()

From Xiubo Li <lixiubo@cmss.chinamobile.com>
Newsgroups linux.kernel
Subject Re: [PATCH] regmap: speed up the regcache_init()
Date 2015-12-09 04:30 +0100
Message-ID <qDDC1-2Px-7@gated-at.bofh.it> (permalink)
References <qBrOG-7bg-13@gated-at.bofh.it> <qDtW2-59U-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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








--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] regmap: speed up the regcache_init() Xiubo Li <lixiubo@cmss.chinamobile.com> - 2015-12-03 03:30 +0100
  Re: [PATCH] regmap: speed up the regcache_init() Mark Brown <broonie@kernel.org> - 2015-12-08 18:10 +0100
    Re: [PATCH] regmap: speed up the regcache_init() Xiubo Li <lixiubo@cmss.chinamobile.com> - 2015-12-09 04:30 +0100
      Re: [PATCH] regmap: speed up the regcache_init() Mark Brown <broonie@kernel.org> - 2015-12-09 16:10 +0100
        Re: [PATCH] regmap: speed up the regcache_init() Xiubo Li <lixiubo@cmss.chinamobile.com> - 2015-12-10 02:40 +0100

csiph-web