diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2003-08-25 23:06:45 +0200 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2003-08-25 23:06:45 +0200 |
| commit | 54d435fdc21ba2a263ffaf7ffddb5d7bd3d307e6 (patch) | |
| tree | d5b37d4808ae76fe5ace7f1fe90fdc4838efd0c0 /include/linux/pmu.h | |
| parent | dbefc0fa24105e0bae46231d966d0982055f239a (diff) | |
Add & export some routines to access the i2c busses that hang off the PMU, not
yet linked to the linux i2c subsystem though. Fix some whitespace/tabs too.
Diffstat (limited to 'include/linux/pmu.h')
| -rw-r--r-- | include/linux/pmu.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index f4054dd6ab65..bc331f946fec 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h @@ -33,6 +33,7 @@ #define PMU_CPU_SPEED 0x7d /* control CPU speed on some models */ #define PMU_SLEEP 0x7f /* put CPU to sleep */ #define PMU_POWER_EVENTS 0x8f /* Send power-event commands to PMU */ +#define PMU_I2C_CMD 0x9a /* I2C operations */ #define PMU_RESET 0xd0 /* reset CPU */ #define PMU_GET_BRIGHTBUTTON 0xd9 /* report brightness up/down pos */ #define PMU_GET_COVER 0xdc /* report cover open/closed */ @@ -69,6 +70,20 @@ * or via PMU_INT_ENVIRONMENT on core99 */ #define PMU_ENV_LID_CLOSED 0x01 /* The lid is closed */ +/* I2C related definitions */ +#define PMU_I2C_MODE_SIMPLE 0 +#define PMU_I2C_MODE_STDSUB 1 +#define PMU_I2C_MODE_COMBINED 2 + +#define PMU_I2C_BUS_STATUS 0 +#define PMU_I2C_BUS_SYSCLK 1 +#define PMU_I2C_BUS_POWER 2 + +#define PMU_I2C_STATUS_OK 0 +#define PMU_I2C_STATUS_DATAREAD 1 +#define PMU_I2C_STATUS_BUSY 0xfe + + /* Kind of PMU (model) */ enum { PMU_UNKNOWN, @@ -145,6 +160,12 @@ extern void pmu_unlock(void); extern int pmu_present(void); extern int pmu_get_model(void); +extern int pmu_i2c_combined_read(int bus, int addr, int subaddr, u8* data, int len); +extern int pmu_i2c_stdsub_write(int bus, int addr, int subaddr, u8* data, int len); +extern int pmu_i2c_simple_read(int bus, int addr, u8* data, int len); +extern int pmu_i2c_simple_write(int bus, int addr, u8* data, int len); + + #ifdef CONFIG_PMAC_PBOOK /* * Stuff for putting the powerbook to sleep and waking it again. |
