Lines Matching refs:error
452 int error;
479 error = cyapa_i2c_pip_read(cyapa, pip->empty_buf,
481 if (error < 0)
482 return error;
505 error = cyapa_i2c_pip_read(cyapa, pip->empty_buf, length);
506 if (error < 0)
507 return error;
529 error = -EINVAL;
532 return error;
541 int error;
547 error = cyapa_i2c_pip_write(cyapa, cmd, cmd_len);
548 if (error) {
550 return (error < 0) ? error : -EIO;
574 int error;
577 error = cyapa_i2c_pip_write(cyapa, cmd, cmd_len);
578 if (error) {
580 return error < 0 ? error : -EIO;
589 error = cyapa_empty_pip_output_data(cyapa,
591 if (error || *resp_len == 0)
596 if ((error || *resp_len == 0) || tries <= 0)
597 error = error ? error : -ETIMEDOUT;
601 return error;
613 int error;
619 error = mutex_lock_interruptible(&pip->cmd_lock);
620 if (error)
621 return error;
640 error = cyapa_do_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
642 if (error == -ETIMEDOUT && resp_data &&
649 error = cyapa_empty_pip_output_data(cyapa,
651 if (error || *resp_len == 0)
652 error = error ? error : -ETIMEDOUT;
656 error = cyapa_do_i2c_pip_cmd_polling(cyapa, cmd, cmd_len,
666 return error;
774 int error;
798 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
804 if (error)
805 return error;
1060 int error;
1103 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1107 if (error || resp_len != PIP_BL_INITIATE_RESP_LEN ||
1110 return error ? error : -EAGAIN;
1144 int error;
1147 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1151 if (error)
1152 return error;
1170 int error;
1172 error = cyapa_poll_state(cyapa, 500);
1173 if (error < 0)
1174 return error;
1191 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1196 if (error || resp_data[0] != 0x00 || resp_data[1] != 0x00)
1197 return error < 0 ? error : -EAGAIN;
1330 int error;
1369 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
1372 if (error || resp_len != PIP_BL_BLOCK_WRITE_RESP_LEN ||
1375 return error < 0 ? error : -EAGAIN;
1387 int error;
1399 error = cyapa_pip_write_fw_block(cyapa, &image_records[i]);
1400 if (error) {
1402 __func__, error);
1403 return error;
1415 int error;
1419 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1422 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x08) ||
1424 return error < 0 ? error : -EINVAL;
1439 int error;
1475 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
1478 if (error || resp_data[5] != parameter_id ||
1481 return error < 0 ? error : -EINVAL;
1497 int error;
1529 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
1532 if (error || resp_data[5] != parameter_id || resp_data[6] == 0 ||
1534 return error < 0 ? error : -EINVAL;
1550 int error;
1563 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1566 if (error || resp_data[5] != GEN5_PARAMETER_DISABLE_PIP_REPORT ||
1569 return error < 0 ? error : -EINVAL;
1581 int error;
1584 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1587 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_SET_PROXIMITY) ||
1589 error = (error == -ETIMEDOUT) ? -EOPNOTSUPP : error;
1590 return error < 0 ? error : -EINVAL;
1601 int error;
1605 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1608 if (error || ((resp_data[3] & PIP_DEEP_SLEEP_STATE_MASK) != state))
1619 int error = 0;
1653 error = cyapa_pip_deep_sleep(cyapa, PIP_DEEP_SLEEP_STATE_OFF);
1654 if (error) {
1655 dev_err(dev, "enter deep sleep fail: %d\n", error);
1669 error = cyapa_pip_deep_sleep(cyapa, PIP_DEEP_SLEEP_STATE_ON);
1670 if (error) {
1671 dev_err(dev, "deep sleep wake fail: %d\n", error);
1677 error = cyapa_gen5_change_power_state(cyapa,
1679 if (error) {
1680 dev_err(dev, "change to active fail: %d\n", error);
1686 error = cyapa_gen5_change_power_state(cyapa,
1688 if (error) {
1689 dev_err(dev, "fail to button only mode: %d\n", error);
1711 error = cyapa_gen5_change_power_state(cyapa, power_state);
1712 if (error) {
1714 power_state, error);
1737 return error;
1745 int error;
1751 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1755 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x04))
1769 int error;
1775 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1779 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x03))
1795 int error;
1808 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1812 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_CMD_CALIBRATE) ||
1814 return error < 0 ? error : -EAGAIN;
1824 int error, calibrate_error;
1827 error = cyapa_pip_suspend_scanning(cyapa);
1828 if (error)
1829 return error;
1845 error = cyapa_pip_resume_scanning(cyapa);
1846 if (error || calibrate_error)
1847 return error ? error : calibrate_error;
1949 int error;
2022 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2027 if (error || resp_len < GEN5_RESP_DATA_STRUCTURE_OFFSET ||
2031 return (error < 0) ? error : -EAGAIN;
2126 int error;
2132 error = cyapa_gen5_read_idac_data(cyapa,
2137 if (error)
2138 return error;
2140 error = cyapa_gen5_read_idac_data(cyapa,
2145 return error;
2153 int error;
2159 error = cyapa_gen5_read_idac_data(cyapa,
2164 if (error)
2165 return error;
2169 error = cyapa_gen5_read_idac_data(cyapa,
2174 return error;
2183 int error;
2192 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2196 if (error || resp_len != sizeof(resp_data) ||
2200 return error ? error : -EAGAIN;
2223 int error;
2252 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2256 if (error || resp_len < GEN5_RESP_DATA_STRUCTURE_OFFSET ||
2260 return error ? error : -EAGAIN;
2314 int error, resume_error;
2321 error = cyapa_pip_suspend_scanning(cyapa);
2322 if (error)
2323 return error;
2327 error = cyapa_gen5_read_mutual_idac_data(cyapa,
2331 if (error)
2335 error = cyapa_gen5_read_self_idac_data(cyapa,
2339 if (error)
2343 error = cyapa_gen5_execute_panel_scan(cyapa);
2344 if (error)
2348 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2355 if (error)
2359 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2366 if (error)
2370 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2377 if (error)
2381 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2388 if (error)
2392 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2399 if (error)
2403 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2410 if (error)
2416 if (resume_error || error)
2417 return resume_error ? resume_error : error;
2450 int error;
2453 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2457 if (error || resp_len < PIP_BL_APP_INFO_RESP_LENGTH ||
2459 return error ? error : -EIO;
2482 int error;
2485 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2489 if (error || resp_len < sizeof(resp_data))
2490 return error ? error : -EIO;
2542 int error;
2549 error = cyapa_pip_bl_exit(cyapa);
2550 if (error) {
2566 error = cyapa_gen5_set_power_mode(cyapa,
2568 if (error)
2574 error = cyapa_pip_set_proximity(cyapa, true);
2575 if (error)
2582 error = cyapa_gen5_get_query_data(cyapa);
2583 if (error)
2590 error = -EINVAL;
2594 error = -EINVAL;
2598 return error;