Lines Matching refs:bus
89 static int i2c_open(int bus, int slave, int chip)
93 snprintf(toybuf, sizeof(toybuf), "/dev/i2c-%d", bus);
99 static unsigned long i2c_get_funcs(int bus)
101 int fd = i2c_open(bus, 0, 0);
129 static void i2cdetect_dash_F(int bus)
148 unsigned long sup = i2c_get_funcs(bus);
159 int bus;
165 if (sscanf(node->name, "i2c-%d", &bus)!=1) return 0;
166 funcs = i2c_get_funcs(bus);
191 int bus, first = 0x03, last = 0x77, fd, row, addr, byte;
199 bus = atolx_range(*toys.optargs, 0, INT_MAX);
206 confirm("Probe chips 0x%02x-0x%02x on bus %d?", first, last, bus);
208 fd = i2c_open(bus, 0, 0);
239 int bus = atolx_range(toys.optargs[0], 0, INT_MAX);
243 confirm("Dump chip 0x%02x on bus %d?", chip, bus);
245 fd = i2c_open(bus, FLAG(f) ? I2C_SLAVE_FORCE : I2C_SLAVE, chip);
268 int bus = atolx_range(toys.optargs[0], 0, INT_MAX);
273 confirm("Read register 0x%02x from chip 0x%02x on bus %d?", addr, chip, bus);
275 fd = i2c_open(bus, FLAG(f) ? I2C_SLAVE_FORCE : I2C_SLAVE, chip);
287 int bus = atolx_range(toys.optargs[0], 0, INT_MAX);
311 confirm("Write register 0x%02x from chip 0x%02x on bus %d?", addr, chip, bus);
313 fd = i2c_open(bus, FLAG(f) ? I2C_SLAVE_FORCE : I2C_SLAVE, chip);