summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/voltage.h
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-30 23:36:30 (GMT)
committerKevin Hilman <khilman@ti.com>2011-09-15 19:08:58 (GMT)
commitf5395480f5088a86cc8594d29b5c2f07f6995c3d (patch)
tree85b13fd9a57214de3d59f6dbf4a3702f7873cc6e /arch/arm/mach-omap2/voltage.h
parentce8ebe0dfb1f8713337cebf82499d3dced288328 (diff)
downloadlinux-fsl-qoriq-f5395480f5088a86cc8594d29b5c2f07f6995c3d.tar.xz
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/voltage.h')
-rw-r--r--arch/arm/mach-omap2/voltage.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index 43ee7bf..a36d2cf 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -103,6 +103,8 @@ struct omap_volt_data {
* @i2c_slave_addr: I2C slave address of PMIC
* @volt_reg_addr: voltage configuration register address
* @cmd_reg_addr: command (on, on-LP, ret, off) configuration register address
+ * @i2c_high_speed: whether VC uses I2C high-speed mode to PMIC
+ * @i2c_mcode: master code value for I2C high-speed preamble transmission
* @vsel_to_uv: PMIC API to convert vsel value to actual voltage in uV.
* @uv_to_vsel: PMIC API to convert voltage in uV to vsel value.
*/
@@ -123,6 +125,8 @@ struct omap_voltdm_pmic {
u8 vp_vddmin;
u8 vp_vddmax;
u8 vp_timeout_us;
+ bool i2c_high_speed;
+ u8 i2c_mcode;
unsigned long (*vsel_to_uv) (const u8 vsel);
u8 (*uv_to_vsel) (unsigned long uV);
};