Lines Matching refs:i2c_bus
24 struct i2c_bus { struct
437 struct i2c_bus *i2c_bus = dev_get_priv(bus);
444 ret = _davinci_i2c_read(i2c_bus->regs, msg->addr,
447 ret = _davinci_i2c_write(i2c_bus->regs, msg->addr,
461 struct i2c_bus *i2c_bus = dev_get_priv(dev);
463 i2c_bus->speed = speed;
464 return _davinci_i2c_setspeed(i2c_bus->regs, speed);
469 struct i2c_bus *i2c_bus = dev_get_priv(dev);
471 i2c_bus->id = dev->seq;
472 i2c_bus->regs = (struct i2c_regs *)devfdt_get_addr(dev);
474 i2c_bus->speed = 100000;
475 _davinci_i2c_init(i2c_bus->regs, i2c_bus->speed, 0);
483 struct i2c_bus *i2c_bus = dev_get_priv(bus);
485 return _davinci_i2c_probe_chip(i2c_bus->regs, chip_addr);
505 .priv_auto_alloc_size = sizeof(struct i2c_bus),