version 1.14.6.1, 2007/09/03 16:47:54 |
version 1.14.6.2, 2007/09/05 12:23:13 |
Line 109 iic_attach(struct device *parent, struct |
|
Line 109 iic_attach(struct device *parent, struct |
|
{ |
{ |
struct iic_softc *sc = device_private(self); |
struct iic_softc *sc = device_private(self); |
struct i2cbus_attach_args *iba = aux; |
struct i2cbus_attach_args *iba = aux; |
i2c_addr_t addr; |
|
i2c_tag_t ic; |
i2c_tag_t ic; |
int rv; |
int rv; |
int found = 0; |
|
uint8_t cmd = 0, val; |
|
|
|
aprint_naive(": I2C bus\n"); |
aprint_naive(": I2C bus\n"); |
aprint_normal(": I2C bus\n"); |
aprint_normal(": I2C bus\n"); |
Line 131 iic_attach(struct device *parent, struct |
|
Line 128 iic_attach(struct device *parent, struct |
|
if (rv) |
if (rv) |
printf("%s: unable to create intr thread\n", ic->ic_devname); |
printf("%s: unable to create intr thread\n", ic->ic_devname); |
|
|
|
#if notyet |
if (sc->sc_type == I2C_TYPE_SMBUS) { |
if (sc->sc_type == I2C_TYPE_SMBUS) { |
|
int found = 0; |
|
i2c_addr_t addr; |
|
uint8_t cmd = 0, val; |
|
|
for (addr = 0x0; addr < 0x80; addr++) { |
for (addr = 0x0; addr < 0x80; addr++) { |
iic_acquire_bus(ic, 0); |
iic_acquire_bus(ic, 0); |
if (iic_exec(ic, I2C_OP_READ_WITH_STOP, addr, |
if (iic_exec(ic, I2C_OP_READ_WITH_STOP, addr, |
Line 148 iic_attach(struct device *parent, struct |
|
Line 150 iic_attach(struct device *parent, struct |
|
aprint_normal("%s: no devices found", ic->ic_devname); |
aprint_normal("%s: no devices found", ic->ic_devname); |
aprint_normal("\n"); |
aprint_normal("\n"); |
} |
} |
|
#endif |
|
|
/* |
/* |
* Attach all i2c devices described in the kernel |
* Attach all i2c devices described in the kernel |