diff options
Diffstat (limited to 'include/linux/i2c')
| -rw-r--r-- | include/linux/i2c/twl4030.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h index 8137f660a5cc..0dc80ef24975 100644 --- a/include/linux/i2c/twl4030.h +++ b/include/linux/i2c/twl4030.h | |||
| @@ -218,6 +218,53 @@ int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); | |||
| 218 | 218 | ||
| 219 | /*----------------------------------------------------------------------*/ | 219 | /*----------------------------------------------------------------------*/ |
| 220 | 220 | ||
| 221 | /* Power bus message definitions */ | ||
| 222 | |||
| 223 | #define DEV_GRP_NULL 0x0 | ||
| 224 | #define DEV_GRP_P1 0x1 | ||
| 225 | #define DEV_GRP_P2 0x2 | ||
| 226 | #define DEV_GRP_P3 0x4 | ||
| 227 | |||
| 228 | #define RES_GRP_RES 0x0 | ||
| 229 | #define RES_GRP_PP 0x1 | ||
| 230 | #define RES_GRP_RC 0x2 | ||
| 231 | #define RES_GRP_PP_RC 0x3 | ||
| 232 | #define RES_GRP_PR 0x4 | ||
| 233 | #define RES_GRP_PP_PR 0x5 | ||
| 234 | #define RES_GRP_RC_PR 0x6 | ||
| 235 | #define RES_GRP_ALL 0x7 | ||
| 236 | |||
| 237 | #define RES_TYPE2_R0 0x0 | ||
| 238 | |||
| 239 | #define RES_TYPE_ALL 0x7 | ||
| 240 | |||
| 241 | #define RES_STATE_WRST 0xF | ||
| 242 | #define RES_STATE_ACTIVE 0xE | ||
| 243 | #define RES_STATE_SLEEP 0x8 | ||
| 244 | #define RES_STATE_OFF 0x0 | ||
| 245 | |||
| 246 | /* | ||
| 247 | * Power Bus Message Format ... these can be sent individually by Linux, | ||
| 248 | * but are usually part of downloaded scripts that are run when various | ||
| 249 | * power events are triggered. | ||
| 250 | * | ||
| 251 | * Broadcast Message (16 Bits): | ||
| 252 | * DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4] | ||
| 253 | * RES_STATE[3:0] | ||
| 254 | * | ||
| 255 | * Singular Message (16 Bits): | ||
| 256 | * DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0] | ||
| 257 | */ | ||
| 258 | |||
| 259 | #define MSG_BROADCAST(devgrp, grp, type, type2, state) \ | ||
| 260 | ( (devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \ | ||
| 261 | | (type) << 4 | (state)) | ||
| 262 | |||
| 263 | #define MSG_SINGULAR(devgrp, id, state) \ | ||
| 264 | ((devgrp) << 13 | 0 << 12 | (id) << 4 | (state)) | ||
| 265 | |||
| 266 | /*----------------------------------------------------------------------*/ | ||
| 267 | |||
| 221 | struct twl4030_bci_platform_data { | 268 | struct twl4030_bci_platform_data { |
| 222 | int *battery_tmp_tbl; | 269 | int *battery_tmp_tbl; |
| 223 | unsigned int tblsize; | 270 | unsigned int tblsize; |
