aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_twl.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-30 19:36:30 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 15:08:58 -0400
commitf5395480f5088a86cc8594d29b5c2f07f6995c3d (patch)
tree85b13fd9a57214de3d59f6dbf4a3702f7873cc6e /arch/arm/mach-omap2/omap_twl.c
parentce8ebe0dfb1f8713337cebf82499d3dced288328 (diff)
OMAP3+: VC: make I2C config programmable with PMIC-specific settings
Remove hard-coded I2C configuration in favor of settings that can be configured from PMIC-specific values. Currently only high-speed mode and the master-code value are supported, since they were the only fields currently used, but extending this is now trivial. Thanks to Nishanth Menon <nm@ti.com> for reporting/fixing a sparse problem and making omap_vc_i2c_init() static, as well as finding and fixing a problem with the shift/mask of mcode. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_twl.c')
-rw-r--r--arch/arm/mach-omap2/omap_twl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index e467d4565a2d..6b247d183299 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -159,6 +159,7 @@ static struct omap_voltdm_pmic omap3_mpu_pmic = {
159 .vp_timeout_us = OMAP3_VP_VLIMITTO_TIMEOUT_US, 159 .vp_timeout_us = OMAP3_VP_VLIMITTO_TIMEOUT_US,
160 .i2c_slave_addr = OMAP3_SRI2C_SLAVE_ADDR, 160 .i2c_slave_addr = OMAP3_SRI2C_SLAVE_ADDR,
161 .volt_reg_addr = OMAP3_VDD_MPU_SR_CONTROL_REG, 161 .volt_reg_addr = OMAP3_VDD_MPU_SR_CONTROL_REG,
162 .i2c_high_speed = true,
162 .vsel_to_uv = twl4030_vsel_to_uv, 163 .vsel_to_uv = twl4030_vsel_to_uv,
163 .uv_to_vsel = twl4030_uv_to_vsel, 164 .uv_to_vsel = twl4030_uv_to_vsel,
164}; 165};
@@ -179,6 +180,7 @@ static struct omap_voltdm_pmic omap3_core_pmic = {
179 .vp_timeout_us = OMAP3_VP_VLIMITTO_TIMEOUT_US, 180 .vp_timeout_us = OMAP3_VP_VLIMITTO_TIMEOUT_US,
180 .i2c_slave_addr = OMAP3_SRI2C_SLAVE_ADDR, 181 .i2c_slave_addr = OMAP3_SRI2C_SLAVE_ADDR,
181 .volt_reg_addr = OMAP3_VDD_CORE_SR_CONTROL_REG, 182 .volt_reg_addr = OMAP3_VDD_CORE_SR_CONTROL_REG,
183 .i2c_high_speed = true,
182 .vsel_to_uv = twl4030_vsel_to_uv, 184 .vsel_to_uv = twl4030_vsel_to_uv,
183 .uv_to_vsel = twl4030_uv_to_vsel, 185 .uv_to_vsel = twl4030_uv_to_vsel,
184}; 186};
@@ -199,6 +201,7 @@ static struct omap_voltdm_pmic omap4_mpu_pmic = {
199 .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, 201 .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US,
200 .i2c_slave_addr = OMAP4_SRI2C_SLAVE_ADDR, 202 .i2c_slave_addr = OMAP4_SRI2C_SLAVE_ADDR,
201 .volt_reg_addr = OMAP4_VDD_MPU_SR_VOLT_REG, 203 .volt_reg_addr = OMAP4_VDD_MPU_SR_VOLT_REG,
204 .i2c_high_speed = true,
202 .vsel_to_uv = twl6030_vsel_to_uv, 205 .vsel_to_uv = twl6030_vsel_to_uv,
203 .uv_to_vsel = twl6030_uv_to_vsel, 206 .uv_to_vsel = twl6030_uv_to_vsel,
204}; 207};
@@ -219,6 +222,7 @@ static struct omap_voltdm_pmic omap4_iva_pmic = {
219 .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US, 222 .vp_timeout_us = OMAP4_VP_VLIMITTO_TIMEOUT_US,
220 .i2c_slave_addr = OMAP4_SRI2C_SLAVE_ADDR, 223 .i2c_slave_addr = OMAP4_SRI2C_SLAVE_ADDR,
221 .volt_reg_addr = OMAP4_VDD_IVA_SR_VOLT_REG, 224 .volt_reg_addr = OMAP4_VDD_IVA_SR_VOLT_REG,
225 .i2c_high_speed = true,
222 .vsel_to_uv = twl6030_vsel_to_uv, 226 .vsel_to_uv = twl6030_vsel_to_uv,
223 .uv_to_vsel = twl6030_uv_to_vsel, 227 .uv_to_vsel = twl6030_uv_to_vsel,
224}; 228};