Lines Matching full:client

258 	struct i2c_client *client;  member
271 * @client: Handle to ROHM BU21023/24
282 static int rohm_i2c_burst_read(struct i2c_client *client, u8 start, void *buf, in rohm_i2c_burst_read() argument
285 struct i2c_adapter *adap = client->adapter; in rohm_i2c_burst_read()
289 msg[0].addr = client->addr; in rohm_i2c_burst_read()
294 msg[1].addr = client->addr; in rohm_i2c_burst_read()
315 struct i2c_client *client = ts->client; in rohm_ts_manual_calibration() local
316 struct device *dev = &client->dev; in rohm_ts_manual_calibration()
335 reg1_orig = i2c_smbus_read_byte_data(client, CALIBRATION_REG1); in rohm_ts_manual_calibration()
339 reg2_orig = i2c_smbus_read_byte_data(client, CALIBRATION_REG2); in rohm_ts_manual_calibration()
343 reg3_orig = i2c_smbus_read_byte_data(client, CALIBRATION_REG3); in rohm_ts_manual_calibration()
347 error = i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_manual_calibration()
353 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_manual_calibration()
364 error = rohm_i2c_burst_read(client, PRM1_X_H, buf, sizeof(buf)); in rohm_ts_manual_calibration()
378 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_manual_calibration()
413 error = i2c_smbus_write_byte_data(client, in rohm_ts_manual_calibration()
418 error = i2c_smbus_write_byte_data(client, in rohm_ts_manual_calibration()
423 error = i2c_smbus_write_byte_data(client, in rohm_ts_manual_calibration()
431 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_manual_calibration()
436 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_manual_calibration()
442 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_manual_calibration()
454 val = i2c_smbus_read_byte_data(client, TOUCH_GESTURE); in rohm_ts_manual_calibration()
465 val = i2c_smbus_read_byte_data(client, INT_STATUS); in rohm_ts_manual_calibration()
479 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG1, in rohm_ts_manual_calibration()
484 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG2, in rohm_ts_manual_calibration()
489 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG3, in rohm_ts_manual_calibration()
495 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_manual_calibration()
508 error2 = i2c_smbus_write_byte_data(client, INT_MASK, INT_ALL); in rohm_ts_manual_calibration()
511 error2 = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_manual_calibration()
523 struct i2c_client *client = ts->client; in rohm_ts_soft_irq() local
525 struct device *dev = &client->dev; in rohm_ts_soft_irq()
539 error = i2c_smbus_write_byte_data(client, INT_MASK, INT_ALL); in rohm_ts_soft_irq()
544 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_soft_irq()
550 error = rohm_i2c_burst_read(client, POS_X1_H, buf, sizeof(buf)); in rohm_ts_soft_irq()
635 i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_soft_irq()
642 static int rohm_ts_load_firmware(struct i2c_client *client, in rohm_ts_load_firmware() argument
645 struct device *dev = &client->dev; in rohm_ts_load_firmware()
659 error = i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_load_firmware()
670 error = i2c_smbus_write_byte_data(client, EX_WDAT, 0); in rohm_ts_load_firmware()
675 error = i2c_smbus_write_byte_data(client, EX_ADDR_H, 0); in rohm_ts_load_firmware()
679 error = i2c_smbus_write_byte_data(client, EX_ADDR_L, 0); in rohm_ts_load_firmware()
683 error = i2c_smbus_write_byte_data(client, COMMON_SETUP1, in rohm_ts_load_firmware()
695 error = i2c_smbus_write_i2c_block_data(client, EX_WDAT, in rohm_ts_load_firmware()
705 status = i2c_smbus_read_byte_data(client, INT_STATUS); in rohm_ts_load_firmware()
712 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_load_firmware()
723 error2 = i2c_smbus_write_byte_data(client, INT_MASK, INT_ALL); in rohm_ts_load_firmware()
740 error = i2c_smbus_write_byte_data(ts->client, in rohm_ts_update_setting()
754 struct i2c_client *client = to_i2c_client(dev); in swap_xy_show() local
755 struct rohm_ts_data *ts = i2c_get_clientdata(client); in swap_xy_show()
763 struct i2c_client *client = to_i2c_client(dev); in swap_xy_store() local
764 struct rohm_ts_data *ts = i2c_get_clientdata(client); in swap_xy_store()
779 struct i2c_client *client = to_i2c_client(dev); in inv_x_show() local
780 struct rohm_ts_data *ts = i2c_get_clientdata(client); in inv_x_show()
788 struct i2c_client *client = to_i2c_client(dev); in inv_x_store() local
789 struct rohm_ts_data *ts = i2c_get_clientdata(client); in inv_x_store()
804 struct i2c_client *client = to_i2c_client(dev); in inv_y_show() local
805 struct rohm_ts_data *ts = i2c_get_clientdata(client); in inv_y_show()
813 struct i2c_client *client = to_i2c_client(dev); in inv_y_store() local
814 struct rohm_ts_data *ts = i2c_get_clientdata(client); in inv_y_store()
838 static int rohm_ts_device_init(struct i2c_client *client, u8 setup2) in rohm_ts_device_init() argument
840 struct device *dev = &client->dev; in rohm_ts_device_init()
843 guard(disable_irq)(&client->irq); in rohm_ts_device_init()
851 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_device_init()
860 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_device_init()
864 error = i2c_smbus_write_byte_data(client, EX_WDAT, 0); in rohm_ts_device_init()
868 error = i2c_smbus_write_byte_data(client, COMMON_SETUP1, 0); in rohm_ts_device_init()
872 error = i2c_smbus_write_byte_data(client, COMMON_SETUP2, setup2); in rohm_ts_device_init()
876 error = i2c_smbus_write_byte_data(client, COMMON_SETUP3, in rohm_ts_device_init()
881 error = i2c_smbus_write_byte_data(client, THRESHOLD_GESTURE, in rohm_ts_device_init()
886 error = i2c_smbus_write_byte_data(client, INTERVAL_TIME, in rohm_ts_device_init()
891 error = i2c_smbus_write_byte_data(client, CPU_FREQ, CPU_FREQ_10MHZ); in rohm_ts_device_init()
895 error = i2c_smbus_write_byte_data(client, PRM_SWOFF_TIME, in rohm_ts_device_init()
900 error = i2c_smbus_write_byte_data(client, ADC_CTRL, ADC_DIV_DEFAULT); in rohm_ts_device_init()
904 error = i2c_smbus_write_byte_data(client, ADC_WAIT, ADC_WAIT_DEFAULT); in rohm_ts_device_init()
911 error = i2c_smbus_write_byte_data(client, STEP_X, STEP_X_DEFAULT); in rohm_ts_device_init()
915 error = i2c_smbus_write_byte_data(client, STEP_Y, STEP_Y_DEFAULT); in rohm_ts_device_init()
919 error = i2c_smbus_write_byte_data(client, OFFSET_X, OFFSET_X_DEFAULT); in rohm_ts_device_init()
923 error = i2c_smbus_write_byte_data(client, OFFSET_Y, OFFSET_Y_DEFAULT); in rohm_ts_device_init()
927 error = i2c_smbus_write_byte_data(client, THRESHOLD_TOUCH, in rohm_ts_device_init()
932 error = i2c_smbus_write_byte_data(client, EVR_XY, EVR_XY_DEFAULT); in rohm_ts_device_init()
936 error = i2c_smbus_write_byte_data(client, EVR_X, EVR_X_DEFAULT); in rohm_ts_device_init()
940 error = i2c_smbus_write_byte_data(client, EVR_Y, EVR_Y_DEFAULT); in rohm_ts_device_init()
945 error = i2c_smbus_write_byte_data(client, CALIBRATION_ADJUST, in rohm_ts_device_init()
950 error = i2c_smbus_write_byte_data(client, SWCONT, SWCONT_DEFAULT); in rohm_ts_device_init()
954 error = i2c_smbus_write_byte_data(client, TEST1, in rohm_ts_device_init()
960 error = rohm_ts_load_firmware(client, BU21023_FIRMWARE_NAME); in rohm_ts_device_init()
972 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG1, in rohm_ts_device_init()
977 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG2, in rohm_ts_device_init()
982 error = i2c_smbus_write_byte_data(client, CALIBRATION_REG3, in rohm_ts_device_init()
987 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_device_init()
992 error = i2c_smbus_write_byte_data(client, FORCE_CALIBRATION, in rohm_ts_device_init()
998 error = i2c_smbus_write_byte_data(client, INT_CLEAR, 0xff); in rohm_ts_device_init()
1003 error = i2c_smbus_write_byte_data(client, INT_MASK, in rohm_ts_device_init()
1009 error = i2c_smbus_write_byte_data(client, ERR_MASK, in rohm_ts_device_init()
1016 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_device_init()
1024 static int rohm_ts_power_off(struct i2c_client *client) in rohm_ts_power_off() argument
1028 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_power_off()
1031 dev_err(&client->dev, in rohm_ts_power_off()
1036 error = i2c_smbus_write_byte_data(client, SYSTEM, in rohm_ts_power_off()
1039 dev_err(&client->dev, in rohm_ts_power_off()
1048 struct i2c_client *client = ts->client; in rohm_ts_open() local
1052 error = rohm_ts_device_init(client, ts->setup2); in rohm_ts_open()
1054 dev_err(&client->dev, in rohm_ts_open()
1069 rohm_ts_power_off(ts->client); in rohm_ts_close()
1074 static int rohm_bu21023_i2c_probe(struct i2c_client *client) in rohm_bu21023_i2c_probe() argument
1076 struct device *dev = &client->dev; in rohm_bu21023_i2c_probe()
1081 if (!client->irq) { in rohm_bu21023_i2c_probe()
1086 if (!client->adapter->algo->master_xfer) { in rohm_bu21023_i2c_probe()
1092 error = rohm_ts_power_off(client); in rohm_bu21023_i2c_probe()
1100 ts->client = client; in rohm_bu21023_i2c_probe()
1102 i2c_set_clientdata(client, ts); in rohm_bu21023_i2c_probe()
1129 error = devm_request_threaded_irq(dev, client->irq, in rohm_bu21023_i2c_probe()
1131 IRQF_ONESHOT, client->name, ts); in rohm_bu21023_i2c_probe()