Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456507
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] regmap: Add a function to check if a regmap register is cached |
| Date | 2016-08-04 17:50 +0200 |
| Message-ID | <s2t4e-2PF-31@gated-at.bofh.it> (permalink) |
| References | <s2shP-28W-3@gated-at.bofh.it> <s2shQ-28W-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Thu, Aug 04, 2016 at 05:55:57PM +0300, Cristian Birsan wrote:
> +bool regmap_cached(struct regmap *map, unsigned int reg)
> +{
> + if (map->cache == REGCACHE_NONE)
> + return false;
> +
> + if (!map->cache_ops)
> + return false;
> +
> + if (map->max_register && reg > map->max_register)
> + return false;
> +
> + return true;
> +}
As Lars said this isn't actually checking if the register is cached. To
do this you need to modify the output code to check if there's a value
cached and try a read if there is one instead.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] regmap: Add a function to check if a regmap register is cached Cristian Birsan <cristian.birsan@microchip.com> - 2016-08-04 17:00 +0200
Re: [PATCH 1/2] regmap: Add a function to check if a regmap register is cached Lars-Peter Clausen <lars@metafoo.de> - 2016-08-04 17:40 +0200
Re: [PATCH 1/2] regmap: Add a function to check if a regmap register is cached Mark Brown <broonie@kernel.org> - 2016-08-04 17:50 +0200
[PATCH v2 1/2] regmap: Add a function to check if a regmap register is cached Cristian Birsan <cristian.birsan@microchip.com> - 2016-08-08 18:00 +0200
Applied "regmap: Add a function to check if a regmap register is cached" to the regmap tree Mark Brown <broonie@kernel.org> - 2016-08-09 14:50 +0200
[PATCH v2 2/2] regmap: debugfs: Add support for dumping write only device registers Cristian Birsan <cristian.birsan@microchip.com> - 2016-08-08 18:00 +0200
Applied "regmap: debugfs: Add support for dumping write only device registers" to the regmap tree Mark Brown <broonie@kernel.org> - 2016-08-09 14:50 +0200
Re: Applied "regmap: debugfs: Add support for dumping write only device registers" to the regmap tree kbuild test robot <lkp@intel.com> - 2016-08-09 15:20 +0200
[PATCH v2 0/2] Display regmap values in debugfs for write only registers Cristian Birsan <cristian.birsan@microchip.com> - 2016-08-08 18:00 +0200
csiph-web