/* RW bit in address */ enum {
pmac_i2c_read = 0x01,
pmac_i2c_write = 0x00
};
/* i2c bus type */ enum {
pmac_i2c_bus_keywest = 0,
pmac_i2c_bus_pmu = 1,
pmac_i2c_bus_smu = 2,
};
/* i2c bus features */ enum { /* can_largesub : supports >1 byte subaddresses (SMU only) */
pmac_i2c_can_largesub = 0x00000001u,
/* multibus : device node holds multiple busses, bus number is * encoded in bits 0xff00 of "reg" of a given device
*/
pmac_i2c_multibus = 0x00000002u,
};
/* i2c busses in the system */ struct pmac_i2c_bus; struct i2c_adapter;
/* Init, called early during boot */ externint pmac_i2c_init(void);
/* Lookup an i2c bus for a device-node. The node can be either the bus * node itself or a device below it. In the case of a multibus, the bus * node itself is the controller node, else, it's a child of the controller * node
*/ externstruct pmac_i2c_bus *pmac_i2c_find_bus(struct device_node *node);
/* Get the address for an i2c device. This strips the bus number if * necessary. The 7 bits address is returned 1 bit right shifted so that the * direction can be directly ored in
*/ extern u8 pmac_i2c_get_dev_addr(struct device_node *device);
/* Get infos about a bus */ externstruct device_node *pmac_i2c_get_controller(struct pmac_i2c_bus *bus); externstruct device_node *pmac_i2c_get_bus_node(struct pmac_i2c_bus *bus); externint pmac_i2c_get_type(struct pmac_i2c_bus *bus); externint pmac_i2c_get_flags(struct pmac_i2c_bus *bus); externint pmac_i2c_get_channel(struct pmac_i2c_bus *bus);
/* March a device or bus with an i2c adapter structure, to be used by drivers * to match device-tree nodes with i2c adapters during adapter discovery * callbacks
*/ externint pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.