Lines Matching refs:client

74 	struct i2c_client	*client;  member
225 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGCONFIG); in dbg_show()
229 value = i2c_smbus_read_byte_data(tps->client, TPS_CHGSTATUS); in dbg_show()
232 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK1); in dbg_show()
237 value = i2c_smbus_read_byte_data(tps->client, TPS_REGSTATUS); in dbg_show()
240 value = i2c_smbus_read_byte_data(tps->client, TPS_MASK2); in dbg_show()
249 value = i2c_smbus_read_byte_data(tps->client, TPS_VDCDC1); in dbg_show()
253 value = i2c_smbus_read_byte_data(tps->client, TPS_VDCDC2); in dbg_show()
257 value = i2c_smbus_read_byte_data(tps->client, TPS_VREGS1); in dbg_show()
262 value = i2c_smbus_read_byte_data(tps->client, TPS_LED1_ON); in dbg_show()
263 v2 = i2c_smbus_read_byte_data(tps->client, TPS_LED1_PER); in dbg_show()
271 value = i2c_smbus_read_byte_data(tps->client, TPS_LED2_ON); in dbg_show()
272 v2 = i2c_smbus_read_byte_data(tps->client, TPS_LED2_PER); in dbg_show()
280 value = i2c_smbus_read_byte_data(tps->client, TPS_DEFGPIO); in dbg_show()
281 v2 = i2c_smbus_read_byte_data(tps->client, TPS_MASK3); in dbg_show()
331 tmp = i2c_smbus_read_byte_data(tps->client, TPS_REGSTATUS); in tps65010_interrupt()
358 tmp = i2c_smbus_read_byte_data(tps->client, TPS_CHGSTATUS); in tps65010_interrupt()
423 chgconfig = i2c_smbus_read_byte_data(tps->client, in tps65010_work()
431 status = i2c_smbus_write_byte_data(tps->client, in tps65010_work()
435 tmp = i2c_smbus_read_byte_data(tps->client, TPS_CHGCONFIG); in tps65010_work()
441 enable_irq(tps->client->irq); in tps65010_work()
500 value = i2c_smbus_read_byte_data(tps->client, TPS_DEFGPIO); in tps65010_gpio_get()
518 static int tps65010_remove(struct i2c_client *client) in tps65010_remove() argument
520 struct tps65010 *tps = i2c_get_clientdata(client); in tps65010_remove()
521 struct tps65010_board *board = dev_get_platdata(&client->dev); in tps65010_remove()
524 int status = board->teardown(client, board->context); in tps65010_remove()
526 dev_dbg(&client->dev, "board %s %s err %d\n", in tps65010_remove()
527 "teardown", client->name, status); in tps65010_remove()
529 if (client->irq > 0) in tps65010_remove()
530 free_irq(client->irq, tps); in tps65010_remove()
537 static int tps65010_probe(struct i2c_client *client, in tps65010_probe() argument
542 struct tps65010_board *board = dev_get_platdata(&client->dev); in tps65010_probe()
545 dev_dbg(&client->dev, "only one tps6501x chip allowed\n"); in tps65010_probe()
549 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) in tps65010_probe()
552 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps65010_probe()
558 tps->client = client; in tps65010_probe()
564 if (client->irq > 0) { in tps65010_probe()
565 status = request_irq(client->irq, tps65010_irq, in tps65010_probe()
568 dev_dbg(&client->dev, "can't get IRQ %d, err %d\n", in tps65010_probe()
569 client->irq, status); in tps65010_probe()
576 disable_irq(client->irq); in tps65010_probe()
579 dev_warn(&client->dev, "IRQ not configured!\n"); in tps65010_probe()
589 tps->chgconf = i2c_smbus_read_byte_data(client, TPS_CHGCONFIG); in tps65010_probe()
593 i2c_smbus_read_byte_data(client, TPS_CHGSTATUS)); in tps65010_probe()
595 i2c_smbus_read_byte_data(client, TPS_REGSTATUS)); in tps65010_probe()
598 i2c_smbus_read_byte_data(client, TPS_VDCDC1), in tps65010_probe()
599 i2c_smbus_read_byte_data(client, TPS_VDCDC2), in tps65010_probe()
600 i2c_smbus_read_byte_data(client, TPS_VREGS1)); in tps65010_probe()
602 i2c_smbus_read_byte_data(client, TPS_DEFGPIO), in tps65010_probe()
603 i2c_smbus_read_byte_data(client, TPS_MASK3)); in tps65010_probe()
605 i2c_set_clientdata(client, tps); in tps65010_probe()
621 (void) i2c_smbus_write_byte_data(client, TPS_MASK1, ~tps->nmask1); in tps65010_probe()
626 (void) i2c_smbus_write_byte_data(client, TPS_MASK2, ~tps->nmask2); in tps65010_probe()
628 (void) i2c_smbus_write_byte_data(client, TPS_MASK3, 0x0f in tps65010_probe()
629 | i2c_smbus_read_byte_data(client, TPS_MASK3)); in tps65010_probe()
640 tps->chip.label = client->name; in tps65010_probe()
641 tps->chip.dev = &client->dev; in tps65010_probe()
656 dev_err(&client->dev, "can't add gpiochip, err %d\n", in tps65010_probe()
659 status = board->setup(client, board->context); in tps65010_probe()
661 dev_dbg(&client->dev, in tps65010_probe()
663 "setup", client->name, status); in tps65010_probe()
744 defgpio = i2c_smbus_read_byte_data(the_tps->client, TPS_DEFGPIO); in tps65010_set_gpio_out_value()
760 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_gpio_out_value()
765 i2c_smbus_read_byte_data(the_tps->client, TPS_DEFGPIO)); in tps65010_set_gpio_out_value()
795 i2c_smbus_read_byte_data(the_tps->client, in tps65010_set_led()
799 i2c_smbus_read_byte_data(the_tps->client, in tps65010_set_led()
822 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_led()
833 i2c_smbus_read_byte_data(the_tps->client, TPS_LED1_ON + offs)); in tps65010_set_led()
835 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_led()
846 i2c_smbus_read_byte_data(the_tps->client, in tps65010_set_led()
869 vdcdc2 = i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC2); in tps65010_set_vib()
873 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_vib()
899 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65010_set_low_pwr()
901 vdcdc1 = i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1); in tps65010_set_low_pwr()
913 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_set_low_pwr()
921 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65010_set_low_pwr()
944 i2c_smbus_read_byte_data(the_tps->client, TPS_VREGS1)); in tps65010_config_vregs1()
946 status = i2c_smbus_write_byte_data(the_tps->client, in tps65010_config_vregs1()
954 i2c_smbus_read_byte_data(the_tps->client, TPS_VREGS1)); in tps65010_config_vregs1()
970 c = the_tps->client; in tps65010_config_vdcdc2()
1011 i2c_smbus_read_byte_data(the_tps->client, TPS_CHGCONFIG), in tps65013_set_low_pwr()
1012 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65013_set_low_pwr()
1014 chgconfig = i2c_smbus_read_byte_data(the_tps->client, TPS_CHGCONFIG); in tps65013_set_low_pwr()
1015 vdcdc1 = i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1); in tps65013_set_low_pwr()
1029 status = i2c_smbus_write_byte_data(the_tps->client, in tps65013_set_low_pwr()
1038 chgconfig = i2c_smbus_read_byte_data(the_tps->client, TPS_CHGCONFIG); in tps65013_set_low_pwr()
1042 status = i2c_smbus_write_byte_data(the_tps->client, in tps65013_set_low_pwr()
1050 i2c_smbus_read_byte_data(the_tps->client, TPS_VDCDC1)); in tps65013_set_low_pwr()