aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/vc.h
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-29 17:02:36 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 15:02:55 -0400
commitba112a4e86ba8f0f9546bd953374cde064b507ca (patch)
treed35d58857d8a44d4ea501328b34fe1572ffb211b /arch/arm/mach-omap2/vc.h
parent4bcc475ebd06a04e1531254c27c6cf508ef8ebf9 (diff)
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 {
56 56
57/** 57/**
58 * struct omap_vc_channel - VC per-instance data 58 * struct omap_vc_channel - VC per-instance data
59 * @i2c_slave_addr: I2C slave address of PMIC for this VC channel
59 * @common: pointer to VC common data for this platform 60 * @common: pointer to VC common data for this platform
60 * @smps_sa_mask: SA* bitmask in the PRM_VC_SMPS_SA register 61 * @smps_sa_mask: i2c slave address bitmask in the PRM_VC_SMPS_SA register
61 * @smps_volra_mask: VOLRA* bitmask in the PRM_VC_VOL_RA register 62 * @smps_volra_mask: VOLRA* bitmask in the PRM_VC_VOL_RA register
62 * @smps_sa_shift: SA* field shift in the PRM_VC_SMPS_SA register
63 * @smps_volra_shift: VOLRA* field shift in the PRM_VC_VOL_RA register 63 * @smps_volra_shift: VOLRA* field shift in the PRM_VC_VOL_RA register
64 * 64 *
65 * XXX It is not necessary to have both a *_mask and a *_shift - 65 * XXX It is not necessary to have both a *_mask and a *_shift -
66 * remove one 66 * remove one
67 */ 67 */
68struct omap_vc_channel { 68struct omap_vc_channel {
69 /* channel state */
70 u16 i2c_slave_addr;
71
72 /* register access data */
69 const struct omap_vc_common *common; 73 const struct omap_vc_common *common;
70 u32 smps_sa_mask; 74 u32 smps_sa_mask;
71 u32 smps_volra_mask; 75 u32 smps_volra_mask;
72 u8 cmdval_reg; 76 u8 cmdval_reg;
73 u8 smps_sa_shift;
74 u8 smps_volra_shift; 77 u8 smps_volra_shift;
75}; 78};
76 79