#include <linux/types.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/delay.h>
#include <linux/completion.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/mutex.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <asm/keylargo.h>
#include <asm/uninorth.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/machdep.h>
#include <asm/smu.h>
#include <asm/pmac_pfunc.h>
#include <asm/pmac_low_i2c.h>
Go to the source code of this file.
|
enum | reg_t {
reg_mode = 0,
reg_control,
reg_status,
reg_isr,
reg_ier,
reg_addr,
reg_subaddr,
reg_data
} |
|
enum | {
state_idle,
state_addr,
state_read,
state_write,
state_stop,
state_dead
} |
|
enum | { pmac_i2c_quirk_invmask = 0x00000001u,
pmac_i2c_quirk_skip = 0x00000002u
} |
|
|
struct pmac_i2c_bus * | pmac_i2c_find_bus (struct device_node *node) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_find_bus) |
|
u8 | pmac_i2c_get_dev_addr (struct device_node *device) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_get_dev_addr) |
|
struct device_node * | pmac_i2c_get_controller (struct pmac_i2c_bus *bus) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_get_controller) |
|
struct device_node * | pmac_i2c_get_bus_node (struct pmac_i2c_bus *bus) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_get_bus_node) |
|
int | pmac_i2c_get_type (struct pmac_i2c_bus *bus) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_get_type) |
|
int | pmac_i2c_get_flags (struct pmac_i2c_bus *bus) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_get_flags) |
|
int | pmac_i2c_get_channel (struct pmac_i2c_bus *bus) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_get_channel) |
|
struct i2c_adapter * | pmac_i2c_get_adapter (struct pmac_i2c_bus *bus) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_get_adapter) |
|
struct pmac_i2c_bus * | pmac_i2c_adapter_to_bus (struct i2c_adapter *adapter) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_adapter_to_bus) |
|
int | pmac_i2c_match_adapter (struct device_node *dev, struct i2c_adapter *adapter) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_match_adapter) |
|
int | pmac_low_i2c_lock (struct device_node *np) |
|
| EXPORT_SYMBOL_GPL (pmac_low_i2c_lock) |
|
int | pmac_low_i2c_unlock (struct device_node *np) |
|
| EXPORT_SYMBOL_GPL (pmac_low_i2c_unlock) |
|
int | pmac_i2c_open (struct pmac_i2c_bus *bus, int polled) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_open) |
|
void | pmac_i2c_close (struct pmac_i2c_bus *bus) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_close) |
|
int | pmac_i2c_setmode (struct pmac_i2c_bus *bus, int mode) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_setmode) |
|
int | pmac_i2c_xfer (struct pmac_i2c_bus *bus, u8 addrdir, int subsize, u32 subaddr, u8 *data, int len) |
|
| EXPORT_SYMBOL_GPL (pmac_i2c_xfer) |
|
void | pmac_pfunc_i2c_suspend (void) |
|
void | pmac_pfunc_i2c_resume (void) |
|
int __init | pmac_i2c_init (void) |
|
| machine_arch_initcall (powermac, pmac_i2c_init) |
|
| machine_subsys_initcall (powermac, pmac_i2c_create_platform_devices) |
|
#define KW_I2C_CTL_AAK 0x01 |
#define KW_I2C_CTL_START 0x08 |
#define KW_I2C_CTL_STOP 0x04 |
#define KW_I2C_CTL_XADDR 0x02 |
#define KW_I2C_IRQ_ADDR 0x02 |
#define KW_I2C_IRQ_DATA 0x01 |
#define KW_I2C_IRQ_MASK 0x0F |
#define KW_I2C_IRQ_START 0x08 |
#define KW_I2C_IRQ_STOP 0x04 |
#define KW_I2C_MODE_100KHZ 0x00 |
#define KW_I2C_MODE_25KHZ 0x02 |
#define KW_I2C_MODE_50KHZ 0x01 |
#define KW_I2C_MODE_CHAN_MASK 0xF0 |
#define KW_I2C_MODE_COMBINED 0x0C |
#define KW_I2C_MODE_DUMB 0x00 |
#define KW_I2C_MODE_MODE_MASK 0x0C |
#define KW_I2C_MODE_STANDARD 0x04 |
#define KW_I2C_MODE_STANDARDSUB 0x08 |
#define KW_I2C_STAT_BUSY 0x01 |
#define KW_I2C_STAT_LAST_AAK 0x02 |
#define KW_I2C_STAT_LAST_RW 0x04 |
#define KW_I2C_STAT_SCL 0x10 |
#define KW_I2C_STAT_SDA 0x08 |
#define KW_POLL_TIMEOUT (2*HZ) |
#define kw_read_reg |
( |
|
reg | ) |
__kw_read_reg(host, reg) |
#define WRONG_STATE |
( |
|
name | ) |
|
Value:do {\
printk(
KERN_DEBUG "KW: wrong state. Got %s, state: %s " \
"(isr: %02x)\n", \
} while(0)
Definition at line 182 of file low_i2c.c.
- Enumerator:
state_idle |
|
state_addr |
|
state_read |
|
state_write |
|
state_stop |
|
state_dead |
|
Definition at line 173 of file low_i2c.c.
- Enumerator:
pmac_i2c_quirk_invmask |
|
pmac_i2c_quirk_skip |
|
Definition at line 1159 of file low_i2c.c.
- Enumerator:
reg_mode |
|
reg_control |
|
reg_status |
|
reg_isr |
|
reg_ier |
|
reg_addr |
|
reg_subaddr |
|
reg_data |
|
Definition at line 127 of file low_i2c.c.
machine_subsys_initcall |
( |
powermac |
, |
|
|
pmac_i2c_create_platform_devices |
|
|
) |
| |