Lines Matching refs:client
62 struct i2c_client *client; member
213 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGCONFIG); in dbg_show()
217 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGSTATUS); in dbg_show()
220 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK1); in dbg_show()
225 value = i2c_smbus_read_byte_data(tps->client, TPS_REGSTATUS); in dbg_show()
228 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK2); in dbg_show()
237 value = i2c_smbus_read_byte_data(tps->client, TPS_VDCDC1); in dbg_show()
241 value = i2c_smbus_read_byte_data(tps->client, TPS_VDCDC2); in dbg_show()
245 value = i2c_smbus_read_byte_data(tps->client, TPS_VREGS1); in dbg_show()
250 value = i2c_smbus_read_byte_data(tps->client, TPS_LED1_ON); in dbg_show()
251 v2 = i2c_smbus_read_byte_data(tps->client, TPS_LED1_PER); in dbg_show()
259 value = i2c_smbus_read_byte_data(tps->client, TPS_LED2_ON); in dbg_show()
260 v2 = i2c_smbus_read_byte_data(tps->client, TPS_LED2_PER); in dbg_show()
268 value = i2c_smbus_read_byte_data(tps->client, TPS_DEFGPIO); in dbg_show()
269 v2 = i2c_smbus_read_byte_data(tps->client, TPS_MASK3); in dbg_show()
319 tmp = i2c_smbus_read_byte_data(tps->client, TPS_REGSTATUS); in tps65010_interrupt()
346 tmp = i2c_smbus_read_byte_data(tps->client, TPS_CHGSTATUS); in tps65010_interrupt()
410 chgconfig = i2c_smbus_read_byte_data(tps->client, in tps65010_work()
418 i2c_smbus_write_byte_data(tps->client, in tps65010_work()
422 tmp = i2c_smbus_read_byte_data(tps->client, TPS_CHGCONFIG); in tps65010_work()
428 enable_irq(tps->client->irq); in tps65010_work()
489 value = i2c_smbus_read_byte_data(tps->client, TPS_DEFGPIO); in tps65010_gpio_get()
507 static void tps65010_remove(struct i2c_client *client) in tps65010_remove() argument
509 struct tps65010 *tps = i2c_get_clientdata(client); in tps65010_remove()
510 struct tps65010_board *board = dev_get_platdata(&client->dev); in tps65010_remove()
513 board->teardown(client, &tps->chip); in tps65010_remove()
514 if (client->irq > 0) in tps65010_remove()
515 free_irq(client->irq, tps); in tps65010_remove()
520 static int tps65010_probe(struct i2c_client *client) in tps65010_probe() argument
522 const struct i2c_device_id *id = i2c_client_get_device_id(client); in tps65010_probe()
525 struct tps65010_board *board = dev_get_platdata(&client->dev); in tps65010_probe()
528 dev_dbg(&client->dev, "only one tps6501x chip allowed\n"); in tps65010_probe()
532 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) in tps65010_probe()
535 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps65010_probe()
541 tps->client = client; in tps65010_probe()
547 if (client->irq > 0) { in tps65010_probe()
548 status = request_irq(client->irq, tps65010_irq, in tps65010_probe()
552 dev_dbg(&client->dev, "can't get IRQ %d, err %d\n", in tps65010_probe()
553 client->irq, status); in tps65010_probe()
558 dev_warn(&client->dev, "IRQ not configured!\n"); in tps65010_probe()
568 tps->chgconf = i2c_smbus_read_byte_data(client, TPS_CHGCONFIG); in tps65010_probe()
572 i2c_smbus_read_byte_data(client, TPS_CHGSTATUS)); in tps65010_probe()
574 i2c_smbus_read_byte_data(client, TPS_REGSTATUS)); in tps65010_probe()
577 i2c_smbus_read_byte_data(client, TPS_VDCDC1), in tps65010_probe()
578 i2c_smbus_read_byte_data(client, TPS_VDCDC2), in tps65010_probe()
579 i2c_smbus_read_byte_data(client, TPS_VREGS1)); in tps65010_probe()
581 i2c_smbus_read_byte_data(client, TPS_DEFGPIO), in tps65010_probe()
582 i2c_smbus_read_byte_data(client, TPS_MASK3)); in tps65010_probe()
584 i2c_set_clientdata(client, tps); in tps65010_probe()
600 (void) i2c_smbus_write_byte_data(client, TPS_MASK1, ~tps->nmask1); in tps65010_probe()
605 (void) i2c_smbus_write_byte_data(client, TPS_MASK2, ~tps->nmask2); in tps65010_probe()
607 (void) i2c_smbus_write_byte_data(client, TPS_MASK3, 0x0f in tps65010_probe()
608 | i2c_smbus_read_byte_data(client, TPS_MASK3)); in tps65010_probe()
612 tps->file = debugfs_create_file(DRIVER_NAME, S_IRUGO, client->debugfs, in tps65010_probe()
619 tps->chip.label = client->name; in tps65010_probe()
620 tps->chip.parent = &client->dev; in tps65010_probe()
635 dev_err(&client->dev, "can't add gpiochip, err %d\n", in tps65010_probe()
638 status = board->setup(client, &tps->chip); in tps65010_probe()
640 dev_dbg(&client->dev, in tps65010_probe()
642 "setup", client->name, status); in tps65010_probe()
723 defgpio = i2c_smbus_read_byte_data(the_tps->client, TPS_DEFGPIO); in tps65010_set_gpio_out_value()
739 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_gpio_out_value()
744 i2c_smbus_read_byte_data(the_tps->client, TPS_DEFGPIO)); in tps65010_set_gpio_out_value()
774 i2c_smbus_read_byte_data(the_tps->client, in tps65010_set_led()
778 i2c_smbus_read_byte_data(the_tps->client, in tps65010_set_led()
801 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_led()
812 i2c_smbus_read_byte_data(the_tps->client, TPS_LED1_ON + offs)); in tps65010_set_led()
814 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_led()
825 i2c_smbus_read_byte_data(the_tps->client, in tps65010_set_led()
848 vdcdc2 = i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC2); in tps65010_set_vib()
852 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_vib()
878 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65010_set_low_pwr()
880 vdcdc1 = i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1); in tps65010_set_low_pwr()
892 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_low_pwr()
900 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65010_set_low_pwr()
923 i2c_smbus_read_byte_data(the_tps->client, TPS_VREGS1)); in tps65010_config_vregs1()
925 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_config_vregs1()
933 i2c_smbus_read_byte_data(the_tps->client, TPS_VREGS1)); in tps65010_config_vregs1()
949 c = the_tps->client; in tps65010_config_vdcdc2()
990 i2c_smbus_read_byte_data(the_tps->client, TPS_CHGCONFIG), in tps65013_set_low_pwr()
991 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65013_set_low_pwr()
993 chgconfig = i2c_smbus_read_byte_data(the_tps->client, TPS_CHGCONFIG); in tps65013_set_low_pwr()
994 vdcdc1 = i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1); in tps65013_set_low_pwr()
1008 status = i2c_smbus_write_byte_data(the_tps->client, in tps65013_set_low_pwr()
1017 chgconfig = i2c_smbus_read_byte_data(the_tps->client, TPS_CHGCONFIG); in tps65013_set_low_pwr()
1021 status = i2c_smbus_write_byte_data(the_tps->client, in tps65013_set_low_pwr()
1029 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65013_set_low_pwr()