static int lsmbus_block_write(device_t dev, uint8_t cmd, u8 bytes, const u8 *buffer) { unsigned device; struct resource *res; device = dev->path.i2c.device; res = find_resource(get_pbus_smbus(dev)->dev, 0x58); return do_smbus_block_write(res->base, device, cmd, bytes, buffer); }
static int lsmbus_block_write(device_t dev, u8 cmd, u8 bytes, const u8 *buf) { u16 device; struct resource *res; struct bus *pbus; device = dev->path.i2c.device; pbus = get_pbus_smbus(dev); res = find_resource(pbus->dev, 0x20); return do_smbus_block_write(res->base, device, cmd, bytes, buf); }
int smbus_block_write(unsigned device, unsigned cmd, u8 bytes, const u8 *buf) { return do_smbus_block_write(SMBUS_IO_BASE, device, cmd, bytes, buf); }