Lines Matching refs:error

255 	int error;
271 error = goodix_i2c_read(ts->client, addr, data,
273 if (error)
274 return error;
284 error = goodix_i2c_read(ts->client,
288 if (error)
289 return error;
350 int input_x, input_y, input_w, error;
354 error = input_register_device(ts->input_pen);
355 ts->pen_input_registered = (error == 0) ? 1 : error;
629 int error;
631 error = goodix_check_cfg(ts, cfg, len);
632 if (error)
633 return error;
635 error = goodix_i2c_write(ts->client, ts->chip->config_addr, cfg, len);
636 if (error)
637 return error;
725 int error;
727 error = goodix_irq_direction_output(ts, 0);
728 if (error)
729 goto error;
733 error = goodix_irq_direction_input(ts);
734 if (error)
735 goto error;
739 error:
741 return error;
751 int error;
754 error = gpiod_direction_output(ts->gpiod_rst, 0);
755 if (error)
756 goto error;
761 error = goodix_irq_direction_output(ts, ts->client->addr == 0x14);
762 if (error)
763 goto error;
767 error = gpiod_direction_output(ts->gpiod_rst, 1);
768 if (error)
769 goto error;
779 error = gpiod_direction_input(ts->gpiod_rst);
780 if (error)
781 goto error;
786 error:
788 return error;
798 int error;
800 error = goodix_reset_no_int_sync(ts);
801 if (error)
802 return error;
938 * at all on x86/ACPI boards, except when needed for error-recover.
1041 int error;
1049 error = goodix_i2c_read(ts->client, ts->chip->config_addr,
1051 if (error) {
1078 int error;
1082 error = goodix_i2c_read(ts->client, GOODIX_REG_ID, buf, sizeof(buf));
1083 if (error)
1084 return error;
1106 int error;
1110 error = goodix_i2c_read(client, GOODIX_REG_ID, &test, 1);
1111 if (!error)
1117 return error;
1132 int error;
1184 error = goodix_reset(ts);
1185 if (error)
1186 return error;
1214 error = input_mt_init_slots(ts->input_dev, ts->max_touch_num,
1216 if (error) {
1218 "Failed to initialize MT slots: %d", error);
1219 return error;
1222 error = input_register_device(ts->input_dev);
1223 if (error) {
1225 "Failed to register input device: %d", error);
1226 return error;
1236 error = goodix_create_pen_input(ts);
1237 if (error)
1238 return error;
1241 error = goodix_request_irq(ts);
1242 if (error) {
1243 dev_err(&ts->client->dev, "request IRQ failed: %d\n", error);
1244 return error;
1262 int error;
1268 error = goodix_check_cfg(ts, cfg->data, cfg->size);
1269 if (error)
1275 error = goodix_send_cfg(ts, cfg->data, cfg->size);
1276 if (error)
1299 int error;
1317 error = goodix_get_gpio_config(ts);
1318 if (error)
1319 return error;
1322 error = regulator_enable(ts->avdd28);
1323 if (error) {
1326 error);
1327 return error;
1330 error = regulator_enable(ts->vddio);
1331 if (error) {
1334 error);
1336 return error;
1339 error = devm_add_action_or_reset(&client->dev,
1341 if (error)
1342 return error;
1347 error = goodix_reset(ts);
1348 if (error)
1349 return error;
1352 error = goodix_i2c_test(client);
1353 if (error) {
1360 dev_err(&client->dev, "I2C communication failure: %d\n", error);
1361 return error;
1364 error = goodix_firmware_check(ts);
1365 if (error)
1366 return error;
1368 error = goodix_read_version(ts);
1369 if (error)
1370 return error;
1376 error = device_property_read_string(&client->dev,
1379 if (!error)
1386 error = request_firmware_nowait(THIS_MODULE, true, ts->cfg_name,
1389 if (error) {
1392 error);
1393 return error;
1398 error = goodix_configure_dev(ts);
1399 if (error)
1400 return error;
1418 int error;
1436 error = goodix_irq_direction_output(ts, 0);
1437 if (error) {
1439 return error;
1444 error = goodix_i2c_write_u8(ts->client, GOODIX_REG_COMMAND,
1446 if (error) {
1466 int error;
1477 error = goodix_irq_direction_output(ts, 1);
1478 if (error)
1479 return error;
1483 error = goodix_int_sync(ts);
1484 if (error)
1485 return error;
1487 error = goodix_i2c_read(ts->client, ts->chip->config_addr,
1489 if (!error && config_ver != ts->config[0])
1493 if (error != 0 || config_ver != ts->config[0]) {
1494 error = goodix_reset(ts);
1495 if (error)
1496 return error;
1498 error = goodix_send_cfg(ts, ts->config, ts->chip->config_len);
1499 if (error)
1500 return error;
1503 error = goodix_request_irq(ts);
1504 if (error)
1505 return error;