Lines Matching refs:i2c
46 ret = i2c_smbus_read_byte_data(tc3589x->i2c, reg); in tc3589x_reg_read()
65 ret = i2c_smbus_write_byte_data(tc3589x->i2c, reg, data); in tc3589x_reg_write()
85 ret = i2c_smbus_read_i2c_block_data(tc3589x->i2c, reg, length, values); in tc3589x_block_read()
106 ret = i2c_smbus_write_i2c_block_data(tc3589x->i2c, reg, length, in tc3589x_block_write()
355 static int tc3589x_probe(struct i2c_client *i2c, in tc3589x_probe() argument
358 struct device_node *np = i2c->dev.of_node; in tc3589x_probe()
359 struct tc3589x_platform_data *pdata = dev_get_platdata(&i2c->dev); in tc3589x_probe()
365 pdata = tc3589x_of_probe(&i2c->dev, &version); in tc3589x_probe()
367 dev_err(&i2c->dev, "No platform data or DT found\n"); in tc3589x_probe()
375 if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA in tc3589x_probe()
379 tc3589x = devm_kzalloc(&i2c->dev, sizeof(struct tc3589x), in tc3589x_probe()
386 tc3589x->dev = &i2c->dev; in tc3589x_probe()
387 tc3589x->i2c = i2c; in tc3589x_probe()
405 i2c_set_clientdata(i2c, tc3589x); in tc3589x_probe()
415 ret = request_threaded_irq(tc3589x->i2c->irq, NULL, tc3589x_irq, in tc3589x_probe()
445 struct i2c_client *client = tc3589x->i2c; in tc3589x_suspend()
459 struct i2c_client *client = tc3589x->i2c; in tc3589x_resume()
483 MODULE_DEVICE_TABLE(i2c, tc3589x_id);