Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1294467 > unrolled thread
| Started by | Daniel Kurtz <djkurtz@chromium.org> |
|---|---|
| First post | 2015-12-18 08:20 +0100 |
| Last post | 2015-12-18 08:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[RESEND PATCH] regulator: mt6311: Use REGCACHE_RBTREE Daniel Kurtz <djkurtz@chromium.org> - 2015-12-18 08:20 +0100
Re: [RESEND PATCH] regulator: mt6311: Use REGCACHE_RBTREE Henry Chen <henryc.chen@mediatek.com> - 2015-12-18 08:40 +0100
| From | Daniel Kurtz <djkurtz@chromium.org> |
|---|---|
| Date | 2015-12-18 08:20 +0100 |
| Subject | [RESEND PATCH] regulator: mt6311: Use REGCACHE_RBTREE |
| Message-ID | <qGXuy-2u7-7@gated-at.bofh.it> |
This regulator is on a slow i2c bus. Register accesses are very simple,
they all either enable/disable a regulator channel, or select a new
voltage level. Thus, reading registers from the device will always
return what was last written.
Therefore we can save a lot of time when reading registers by using a
regmap_cache. Since the register map is relatively large, but we only
ever access a few of them, we use an RBTREE cache.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
I used the wrong commit message subject in the first attempt.
Maybe this time someone will review it ;-).
---
drivers/regulator/mt6311-regulator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c
index 02c4e5f..0495716 100644
--- a/drivers/regulator/mt6311-regulator.c
+++ b/drivers/regulator/mt6311-regulator.c
@@ -30,6 +30,7 @@ static const struct regmap_config mt6311_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = MT6311_FQMTR_CON4,
+ .cache_type = REGCACHE_RBTREE,
};
/* Default limits measured in millivolts and milliamps */
--
2.6.0.rc2.230.g3dd15c0
--
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/
[toc] | [next] | [standalone]
| From | Henry Chen <henryc.chen@mediatek.com> |
|---|---|
| Date | 2015-12-18 08:40 +0100 |
| Message-ID | <qGXNU-2Cn-5@gated-at.bofh.it> |
| In reply to | #1294467 |
Thanks to the patch.
On Fri, 2015-12-18 at 15:11 +0800, Daniel Kurtz wrote:
> This regulator is on a slow i2c bus. Register accesses are very simple,
> they all either enable/disable a regulator channel, or select a new
> voltage level. Thus, reading registers from the device will always
> return what was last written.
>
> Therefore we can save a lot of time when reading registers by using a
> regmap_cache. Since the register map is relatively large, but we only
> ever access a few of them, we use an RBTREE cache.
>
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Henry Chen <henryc.chen@mediatek.com>
> ---
> I used the wrong commit message subject in the first attempt.
> Maybe this time someone will review it ;-).
> ---
> drivers/regulator/mt6311-regulator.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c
> index 02c4e5f..0495716 100644
> --- a/drivers/regulator/mt6311-regulator.c
> +++ b/drivers/regulator/mt6311-regulator.c
> @@ -30,6 +30,7 @@ static const struct regmap_config mt6311_regmap_config = {
> .reg_bits = 8,
> .val_bits = 8,
> .max_register = MT6311_FQMTR_CON4,
> + .cache_type = REGCACHE_RBTREE,
> };
>
> /* Default limits measured in millivolts and milliamps */
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web