diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 10:39:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 10:39:20 -0700 |
commit | 18b34b9546dc192d978dda940673f40928d2e36e (patch) | |
tree | ca396840ed95fc46cd360c68bf2cefe5ab4cbda8 /include/linux/i2c | |
parent | ca1ee219c070eab755712d50638bbcd1f8630fc1 (diff) | |
parent | d6bb69cfa88b8ac9f952de4fada5b216d5ba8830 (diff) | |
download | linux-3.10-18b34b9546dc192d978dda940673f40928d2e36e.tar.gz linux-3.10-18b34b9546dc192d978dda940673f40928d2e36e.tar.bz2 linux-3.10-18b34b9546dc192d978dda940673f40928d2e36e.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (32 commits)
regulator: twl4030 VAUX3 supports 3.0V
regulator: Support disabling of unused regulators by machines
regulator: Don't increment use_count for boot_on regulators
twl4030-regulator: expose VPLL2
regulator: refcount fixes
regulator: Don't warn if we failed to get a regulator
regulator: Allow boot_on regulators to be disabled by clients
regulator: Implement list_voltage for WM835x LDOs and DCDCs
twl4030-regulator: list more VAUX4 voltages
regulator: Don't warn on omitted voltage constraints
regulator: Implement list_voltage() for WM8400 DCDCs and LDOs
MMC: regulator utilities
regulator: twl4030 voltage enumeration (v2)
regulator: twl4030 regulators
regulator: get_status() grows kerneldoc
regulator: enumerate voltages (v2)
regulator: Fix get_mode() for WM835x DCDCs
regulator: Allow regulators to set the initial operating mode
regulator: Suggest use of datasheet supply or pin names for consumers
regulator: email - update email address and regulator webpage.
...
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 8137f660a5c..0dc80ef2497 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); /*----------------------------------------------------------------------*/ +/* Power bus message definitions */ + +#define DEV_GRP_NULL 0x0 +#define DEV_GRP_P1 0x1 +#define DEV_GRP_P2 0x2 +#define DEV_GRP_P3 0x4 + +#define RES_GRP_RES 0x0 +#define RES_GRP_PP 0x1 +#define RES_GRP_RC 0x2 +#define RES_GRP_PP_RC 0x3 +#define RES_GRP_PR 0x4 +#define RES_GRP_PP_PR 0x5 +#define RES_GRP_RC_PR 0x6 +#define RES_GRP_ALL 0x7 + +#define RES_TYPE2_R0 0x0 + +#define RES_TYPE_ALL 0x7 + +#define RES_STATE_WRST 0xF +#define RES_STATE_ACTIVE 0xE +#define RES_STATE_SLEEP 0x8 +#define RES_STATE_OFF 0x0 + +/* + * Power Bus Message Format ... these can be sent individually by Linux, + * but are usually part of downloaded scripts that are run when various + * power events are triggered. + * + * Broadcast Message (16 Bits): + * DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4] + * RES_STATE[3:0] + * + * Singular Message (16 Bits): + * DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0] + */ + +#define MSG_BROADCAST(devgrp, grp, type, type2, state) \ + ( (devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \ + | (type) << 4 | (state)) + +#define MSG_SINGULAR(devgrp, id, state) \ + ((devgrp) << 13 | 0 << 12 | (id) << 4 | (state)) + +/*----------------------------------------------------------------------*/ + struct twl4030_bci_platform_data { int *battery_tmp_tbl; unsigned int tblsize; |