Lines Matching refs:device
32 cx23882_device * device = cookie;
34 device->i2c_reg |= I2C_SCL;
36 device->i2c_reg &= ~I2C_SCL;
37 reg_write32(REG_I2C_CONTROL, device->i2c_reg);
45 cx23882_device * device = cookie;
47 device->i2c_reg |= I2C_SDA;
49 device->i2c_reg &= ~I2C_SDA;
50 reg_write32(REG_I2C_CONTROL, device->i2c_reg);
58 cx23882_device * device = cookie;
66 cx23882_device * device = cookie;
72 i2c_init(cx23882_device *device)
74 device->i2c_bus = i2c_create_bus(device, 80000, 2000000, set_scl, set_sda, get_scl, get_sda);
75 device->i2c_reg = reg_read32(REG_I2C_CONTROL);
76 device->i2c_reg &= ~I2C_HW_MODE;
77 device->i2c_reg |= I2C_SCL | I2C_SDA;
78 reg_write32(REG_I2C_CONTROL, device->i2c_reg);
80 return device->i2c_bus ? B_OK : B_ERROR;
85 i2c_terminate(cx23882_device *device)
87 i2c_delete_bus(device->i2c_bus);