* [PATCH] regulator: da9211: add cache_type
@ 2020-08-12 13:31 ` Hsin-Yi Wang
0 siblings, 0 replies; 6+ messages in thread
From: Hsin-Yi Wang @ 2020-08-12 13:31 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Support Opensource, Liam Girdwood, Mark Brown, linux-kernel,
Tomasz Figa, Nicolas Boichat, Daniel Kurtz
Add regmap_cache to reduce wakeups events of interrupt if regulator is
accessed frequently. This results in saving more power.
Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
---
drivers/regulator/da9211-regulator.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c
index 297b3aa7c753..cffcefd0538d 100644
--- a/drivers/regulator/da9211-regulator.c
+++ b/drivers/regulator/da9211-regulator.c
@@ -51,10 +51,24 @@ static const struct regmap_range_cfg da9211_regmap_range[] = {
},
};
+static bool da9211_volatile_reg(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case DA9211_REG_STATUS_A:
+ case DA9211_REG_STATUS_B:
+ case DA9211_REG_EVENT_A:
+ case DA9211_REG_EVENT_B:
+ return true;
+ }
+ return false;
+}
+
static const struct regmap_config da9211_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 5 * 128,
+ .volatile_reg = da9211_volatile_reg,
+ .cache_type = REGCACHE_RBTREE,
.ranges = da9211_regmap_range,
.num_ranges = ARRAY_SIZE(da9211_regmap_range),
};
--
2.28.0.236.gb10cc79966-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] regulator: da9211: add cache_type
@ 2020-08-12 13:31 ` Hsin-Yi Wang
0 siblings, 0 replies; 6+ messages in thread
From: Hsin-Yi Wang @ 2020-08-12 13:31 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Nicolas Boichat, Support Opensource, Liam Girdwood, linux-kernel,
Daniel Kurtz, Tomasz Figa, Mark Brown
Add regmap_cache to reduce wakeups events of interrupt if regulator is
accessed frequently. This results in saving more power.
Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
---
drivers/regulator/da9211-regulator.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c
index 297b3aa7c753..cffcefd0538d 100644
--- a/drivers/regulator/da9211-regulator.c
+++ b/drivers/regulator/da9211-regulator.c
@@ -51,10 +51,24 @@ static const struct regmap_range_cfg da9211_regmap_range[] = {
},
};
+static bool da9211_volatile_reg(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case DA9211_REG_STATUS_A:
+ case DA9211_REG_STATUS_B:
+ case DA9211_REG_EVENT_A:
+ case DA9211_REG_EVENT_B:
+ return true;
+ }
+ return false;
+}
+
static const struct regmap_config da9211_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 5 * 128,
+ .volatile_reg = da9211_volatile_reg,
+ .cache_type = REGCACHE_RBTREE,
.ranges = da9211_regmap_range,
.num_ranges = ARRAY_SIZE(da9211_regmap_range),
};
--
2.28.0.236.gb10cc79966-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] regulator: da9211: add cache_type
2020-08-12 13:31 ` Hsin-Yi Wang
@ 2020-08-13 10:51 ` Adam Thomson
-1 siblings, 0 replies; 6+ messages in thread
From: Adam Thomson @ 2020-08-13 10:51 UTC (permalink / raw)
To: Hsin-Yi Wang, linux-arm-kernel
Cc: Support Opensource, Liam Girdwood, Mark Brown, linux-kernel,
Tomasz Figa, Nicolas Boichat, Daniel Kurtz
On 12 August 2020 14:31, Hsin-Yi Wang wrote:
> Add regmap_cache to reduce wakeups events of interrupt if regulator is
> accessed frequently. This results in saving more power.
>
> Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] regulator: da9211: add cache_type
@ 2020-08-13 10:51 ` Adam Thomson
0 siblings, 0 replies; 6+ messages in thread
From: Adam Thomson @ 2020-08-13 10:51 UTC (permalink / raw)
To: Hsin-Yi Wang, linux-arm-kernel
Cc: Nicolas Boichat, Support Opensource, Liam Girdwood, linux-kernel,
Daniel Kurtz, Tomasz Figa, Mark Brown
On 12 August 2020 14:31, Hsin-Yi Wang wrote:
> Add regmap_cache to reduce wakeups events of interrupt if regulator is
> accessed frequently. This results in saving more power.
>
> Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] regulator: da9211: add cache_type
2020-08-12 13:31 ` Hsin-Yi Wang
@ 2020-08-18 16:56 ` Mark Brown
-1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-08-18 16:56 UTC (permalink / raw)
To: linux-arm-kernel, Hsin-Yi Wang
Cc: Tomasz Figa, Support Opensource, Liam Girdwood, linux-kernel,
Nicolas Boichat, Daniel Kurtz
On Wed, 12 Aug 2020 21:31:02 +0800, Hsin-Yi Wang wrote:
> Add regmap_cache to reduce wakeups events of interrupt if regulator is
> accessed frequently. This results in saving more power.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: da9211: add cache_type
commit: 989e08c3d0044fc707c26c0329ed49e33e8e4c7b
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] regulator: da9211: add cache_type
@ 2020-08-18 16:56 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-08-18 16:56 UTC (permalink / raw)
To: linux-arm-kernel, Hsin-Yi Wang
Cc: Nicolas Boichat, Support Opensource, Liam Girdwood, Daniel Kurtz,
linux-kernel, Tomasz Figa
On Wed, 12 Aug 2020 21:31:02 +0800, Hsin-Yi Wang wrote:
> Add regmap_cache to reduce wakeups events of interrupt if regulator is
> accessed frequently. This results in saving more power.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: da9211: add cache_type
commit: 989e08c3d0044fc707c26c0329ed49e33e8e4c7b
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-08-18 17:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 13:31 [PATCH] regulator: da9211: add cache_type Hsin-Yi Wang
2020-08-12 13:31 ` Hsin-Yi Wang
2020-08-13 10:51 ` Adam Thomson
2020-08-13 10:51 ` Adam Thomson
2020-08-18 16:56 ` Mark Brown
2020-08-18 16:56 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.