summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/vc.h
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-29 14:02:36 -0700
committerKevin Hilman <khilman@ti.com>2011-09-15 12:02:55 -0700
commitba112a4e86ba8f0f9546bd953374cde064b507ca (patch)
treed35d58857d8a44d4ea501328b34fe1572ffb211b /arch/arm/mach-omap2/vc.h
parent4bcc475ebd06a04e1531254c27c6cf508ef8ebf9 (diff)
downloadlinux-ba112a4e86ba8f0f9546bd953374cde064b507ca.tar.gz
linux-ba112a4e86ba8f0f9546bd953374cde064b507ca.tar.bz2
linux-ba112a4e86ba8f0f9546bd953374cde064b507ca.zip
OMAP3+: VC: cleanup i2c slave address configuration
- Add an i2c_slave_address field to the omap_vc_channel - use VC/VP read/modify/write helper instead of open-coding - remove smps_sa_shift, use __ffs(mask) for shift value - I2C addresses 10-bit, change size to u16 Special thanks to Shweta Gulati <shweta.gulati@ti.com> for suggesting the use of __ffs(x) instead of ffs(x) - 1. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vc.h')
-rw-r--r--arch/arm/mach-omap2/vc.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/vc.h b/arch/arm/mach-omap2/vc.h
index d0050f0ee6d5..69ca900aff0b 100644
--- a/arch/arm/mach-omap2/vc.h
+++ b/arch/arm/mach-omap2/vc.h
@@ -56,21 +56,24 @@ struct omap_vc_common {
/**
* struct omap_vc_channel - VC per-instance data
+ * @i2c_slave_addr: I2C slave address of PMIC for this VC channel
* @common: pointer to VC common data for this platform
- * @smps_sa_mask: SA* bitmask in the PRM_VC_SMPS_SA register
+ * @smps_sa_mask: i2c slave address bitmask in the PRM_VC_SMPS_SA register
* @smps_volra_mask: VOLRA* bitmask in the PRM_VC_VOL_RA register
- * @smps_sa_shift: SA* field shift in the PRM_VC_SMPS_SA register
* @smps_volra_shift: VOLRA* field shift in the PRM_VC_VOL_RA register
*
* XXX It is not necessary to have both a *_mask and a *_shift -
* remove one
*/
struct omap_vc_channel {
+ /* channel state */
+ u16 i2c_slave_addr;
+
+ /* register access data */
const struct omap_vc_common *common;
u32 smps_sa_mask;
u32 smps_volra_mask;
u8 cmdval_reg;
- u8 smps_sa_shift;
u8 smps_volra_shift;
};