diff options
author | Tony Lindgren <tony@atomide.com> | 2014-05-13 21:34:09 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-05-28 03:06:18 -0400 |
commit | 43fef47f94a1ae46fb2720dada32fa3b5547bee2 (patch) | |
tree | f01e73e8aed5a4fb21a6a46314a6a105fb614627 /drivers/mfd/twl4030-power.c | |
parent | 482e7db160df713a2d1d4c7ee9fffad92008283f (diff) |
mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle
Some oscillators can be turned off during off-idle saving few
a little bit power at the cost of the oscillator start up
latency.
If you board can do this, you can now enable it by using the
ti,twl4030-power-idle-osc-off compatible flag.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/twl4030-power.c')
-rw-r--r-- | drivers/mfd/twl4030-power.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index 4846c7b48ebb..3bc969a5916b 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c | |||
@@ -761,6 +761,19 @@ static struct twl4030_power_data omap3_idle = { | |||
761 | .resource_config = omap3_idle_rconfig, | 761 | .resource_config = omap3_idle_rconfig, |
762 | }; | 762 | }; |
763 | 763 | ||
764 | /* Disable 32 KiHz oscillator during idle */ | ||
765 | static struct twl4030_resconfig osc_off_rconfig[] = { | ||
766 | TWL_REMAP_OFF(RES_CLKEN, DEV_GRP_P1 | DEV_GRP_P3, 3, 2), | ||
767 | { /* Terminator */ }, | ||
768 | }; | ||
769 | |||
770 | static struct twl4030_power_data osc_off_idle = { | ||
771 | .scripts = omap3_idle_scripts, | ||
772 | .num = ARRAY_SIZE(omap3_idle_scripts), | ||
773 | .resource_config = omap3_idle_rconfig, | ||
774 | .board_config = osc_off_rconfig, | ||
775 | }; | ||
776 | |||
764 | static struct of_device_id twl4030_power_of_match[] = { | 777 | static struct of_device_id twl4030_power_of_match[] = { |
765 | { | 778 | { |
766 | .compatible = "ti,twl4030-power-reset", | 779 | .compatible = "ti,twl4030-power-reset", |
@@ -770,6 +783,10 @@ static struct of_device_id twl4030_power_of_match[] = { | |||
770 | .compatible = "ti,twl4030-power-idle", | 783 | .compatible = "ti,twl4030-power-idle", |
771 | .data = &omap3_idle, | 784 | .data = &omap3_idle, |
772 | }, | 785 | }, |
786 | { | ||
787 | .compatible = "ti,twl4030-power-idle-osc-off", | ||
788 | .data = &osc_off_idle, | ||
789 | }, | ||
773 | { }, | 790 | { }, |
774 | }; | 791 | }; |
775 | MODULE_DEVICE_TABLE(of, twl4030_power_of_match); | 792 | MODULE_DEVICE_TABLE(of, twl4030_power_of_match); |