OMAP: TWL: set clk32kg regulator on
Subsystems (3)
cover OMAP: TWL: set clk32kg regulator on
Set constraint always_on for clk32kg regulator.
This regulator is used by connectivity chip (wl12xx) on OMAP platforms.
Vishal Mahaveer (1):
OMAP: TWL: set clk32kg regulator on
arch/arm/mach-omap2/twl-common.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
PATCH 1/1 OMAP: TWL: set clk32kg regulator on
omap4_clk32kg regulator is used by connectivity (WLAN/BT/GPS) chip on omap4 platforms.
Set always_on flag to true for connectivity chip to operate.
--- arch/arm/mach-omap2/twl-common.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/twl-common.c +1 -0
@@ -270,6 +270,7 @@ static struct regulator_init_data omap4_vusb_idata = {static struct regulator_init_data omap4_clk32kg_idata = { .constraints = { .valid_ops_mask =REGULATOR_CHANGE_STATUS , + .always_on = true, }, };
Signature · 1 line
1.7.0.4
Quoted 3 lines · Vishal Mahaveer
omap4_clk32kgregulator is used by connectivity (WLAN/BT/GPS) chip on omap4 platforms.
Setalways_onflag to true for connectivity chip to operate.
The driver/init for the connectivity chip should be using the regulator API to enable/disable the regulator as needed.
Kevin
Quoted 6 lines
Quoted 3 lines
omap4_clk32kgregulator is used by connectivity (WLAN/BT/GPS) chip on omap4 platforms.
Setalways_onflag to true for connectivity chip to operate.The driver/init for the connectivity chip should be using the regulator API to enable/disable the regulator as needed.
The connectivity chip is used for BT, WLAN, FM and GPS. So we want it on at all times.
Quoted 9 lines · Vishal
Quoted 6 lines
Quoted 3 lines
omap4_clk32kgregulator is used by connectivity (WLAN/BT/GPS) chip on omap4 platforms.
Setalways_onflag to true for connectivity chip to operate.The driver/init for the connectivity chip should be using the regulator API to enable/disable the regulator as needed.
The connectivity chip is used for BT, WLAN, FM and GPS. So we want it on at all times.
No.
You want it on only
1) if the connectivity chip is present, *and*
2) BT, WLAN, FM or GPS are being used.
The current patch assumes that a connectivity chip is present whenever the TWL is present, which may be true on the platform you're currently working on, but is not true in general.
And, even if it were present, for power reasons the regulator should be enabled only when it's needed, not because it might be needed. That means that the device-specific (or board specific) code should be configuring the regulators used for the various modules so the drivers can request the regulators when they're needed.
Kevin
Quoted 12 lines · Kevin
No.
You want it on only
1) if the connectivity chip is present, *and*
2) BT, WLAN, FM or GPS are being used.The current patch assumes that a connectivity chip is present whenever the TWL is present, which may be true on the platform you're currently working on, but is not true in general.
Quoted 7 lines
And, even if it were present, for power reasons the regulator should be enabled only when it's needed, not because it might be needed. That means that the device-specific (or board specific) code should be configuring the regulators used for the various modules so the drivers can request the regulators when they're needed.
Kevin
Will it make more sense to move clk32 regulator initialization to board-xxx files of platforms which has the connectivity chip?
- Vishal
Quoted 20 lines · Vishal
Quoted 12 lines · Kevin
No.
You want it on only
1) if the connectivity chip is present, *and*
2) BT, WLAN, FM or GPS are being used.The current patch assumes that a connectivity chip is present whenever the TWL is present, which may be true on the platform you're currently working on, but is not true in general.
Quoted 6 lines
And, even if it were present, for power reasons the regulator should be enabled only when it's needed, not because it might be needed. That means that the device-specific (or board specific) code should be configuring the regulators used for the various modules so the drivers can request the regulators when they're needed.
Quoted 2 lines
Will it make more sense to move clk32 regulator initialization to board-xxx files of platforms which has the connectivity chip?
Yes, initialization should be done only when connectivity chip is present.
But more importantly, it's the usage of the regulator API that is important. My primary objection to this patch is the use of 'always on', where the drivers/devices that depend on this regulator are the ones that should be requesting it to be on using the regulator API.
Kevin
Quoted 28 lines · Kevin
Quoted 20 lines · Vishal
Quoted 12 lines · Kevin
No.
You want it on only
1) if the connectivity chip is present, *and*
2) BT, WLAN, FM or GPS are being used.The current patch assumes that a connectivity chip is present whenever the TWL is present, which may be true on the platform you're currently working on, but is not true in general.
Quoted 6 lines
And, even if it were present, for power reasons the regulator should be enabled only when it's needed, not because it might be needed. That means that the device-specific (or board specific) code should be configuring the regulators used for the various modules so the drivers can request the regulators when they're needed.
Quoted 2 lines
Will it make more sense to move clk32 regulator initialization to board-xxx files of platforms which has the connectivity chip?
Yes, initialization should be done only when connectivity chip is present.
Quoted 6 lines
But more importantly, it's the usage of the regulator API that is important. My primary objection to this patch is the use of 'always on', where the
drivers/devicesthat depend on this regulator are the ones that should be requesting it to be on using the regulator API.Kevin
Understood...
1) clk32kg regulator should be initialized in platform file (boazrd file)
2) Use regulator APIs in connectivity driver to enable it.
- Vishal