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;
530 error = -EINVAL;
533 return error;
542 int error;
548 error = cyapa_i2c_pip_write(cyapa, cmd, cmd_len);
549 if (error) {
551 return (error < 0) ? error : -EIO;
575 int error;
578 error = cyapa_i2c_pip_write(cyapa, cmd, cmd_len);
579 if (error) {
581 return error < 0 ? error : -EIO;
590 error = cyapa_empty_pip_output_data(cyapa,
592 if (error || *resp_len == 0)
597 if ((error || *resp_len == 0) || tries <= 0)
598 error = error ? error : -ETIMEDOUT;
602 return error;
614 int error;
620 error = mutex_lock_interruptible(&pip->cmd_lock);
621 if (error)
622 return error;
641 error = cyapa_do_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
643 if (error == -ETIMEDOUT && resp_data &&
650 error = cyapa_empty_pip_output_data(cyapa,
652 if (error || *resp_len == 0)
653 error = error ? error : -ETIMEDOUT;
657 error = cyapa_do_i2c_pip_cmd_polling(cyapa, cmd, cmd_len,
667 return error;
775 int error;
799 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
805 if (error)
806 return error;
1061 int error;
1104 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1108 if (error || resp_len != PIP_BL_INITIATE_RESP_LEN ||
1111 return error ? error : -EAGAIN;
1145 int error;
1148 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1152 if (error)
1153 return error;
1171 int error;
1173 error = cyapa_poll_state(cyapa, 500);
1174 if (error < 0)
1175 return error;
1192 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1197 if (error || resp_data[0] != 0x00 || resp_data[1] != 0x00)
1198 return error < 0 ? error : -EAGAIN;
1331 int error;
1370 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
1373 if (error || resp_len != PIP_BL_BLOCK_WRITE_RESP_LEN ||
1376 return error < 0 ? error : -EAGAIN;
1388 int error;
1400 error = cyapa_pip_write_fw_block(cyapa, &image_records[i]);
1401 if (error) {
1403 __func__, error);
1404 return error;
1416 int error;
1420 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1423 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x08) ||
1425 return error < 0 ? error : -EINVAL;
1440 int error;
1476 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
1479 if (error || resp_data[5] != parameter_id ||
1482 return error < 0 ? error : -EINVAL;
1498 int error;
1530 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, cmd_len,
1533 if (error || resp_data[5] != parameter_id || resp_data[6] == 0 ||
1535 return error < 0 ? error : -EINVAL;
1551 int error;
1564 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1567 if (error || resp_data[5] != GEN5_PARAMETER_DISABLE_PIP_REPORT ||
1570 return error < 0 ? error : -EINVAL;
1582 int error;
1585 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1588 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_SET_PROXIMITY) ||
1590 error = (error == -ETIMEDOUT) ? -EOPNOTSUPP : error;
1591 return error < 0 ? error : -EINVAL;
1602 int error;
1606 error = cyapa_i2c_pip_cmd_irq_sync(cyapa, cmd, sizeof(cmd),
1609 if (error || ((resp_data[3] & PIP_DEEP_SLEEP_STATE_MASK) != state))
1620 int error = 0;
1654 error = cyapa_pip_deep_sleep(cyapa, PIP_DEEP_SLEEP_STATE_OFF);
1655 if (error) {
1656 dev_err(dev, "enter deep sleep fail: %d\n", error);
1670 error = cyapa_pip_deep_sleep(cyapa, PIP_DEEP_SLEEP_STATE_ON);
1671 if (error) {
1672 dev_err(dev, "deep sleep wake fail: %d\n", error);
1678 error = cyapa_gen5_change_power_state(cyapa,
1680 if (error) {
1681 dev_err(dev, "change to active fail: %d\n", error);
1687 error = cyapa_gen5_change_power_state(cyapa,
1689 if (error) {
1690 dev_err(dev, "fail to button only mode: %d\n", error);
1712 error = cyapa_gen5_change_power_state(cyapa, power_state);
1713 if (error) {
1715 power_state, error);
1738 return error;
1746 int error;
1752 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1756 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x04))
1770 int error;
1776 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1780 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x03))
1796 int error;
1809 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
1813 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_CMD_CALIBRATE) ||
1815 return error < 0 ? error : -EAGAIN;
1825 int error, calibrate_error;
1828 error = cyapa_pip_suspend_scanning(cyapa);
1829 if (error)
1830 return error;
1846 error = cyapa_pip_resume_scanning(cyapa);
1847 if (error || calibrate_error)
1848 return error ? error : calibrate_error;
1950 int error;
2023 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2028 if (error || resp_len < GEN5_RESP_DATA_STRUCTURE_OFFSET ||
2032 return (error < 0) ? error : -EAGAIN;
2127 int error;
2133 error = cyapa_gen5_read_idac_data(cyapa,
2138 if (error)
2139 return error;
2141 error = cyapa_gen5_read_idac_data(cyapa,
2146 return error;
2154 int error;
2160 error = cyapa_gen5_read_idac_data(cyapa,
2165 if (error)
2166 return error;
2170 error = cyapa_gen5_read_idac_data(cyapa,
2175 return error;
2184 int error;
2193 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2197 if (error || resp_len != sizeof(resp_data) ||
2201 return error ? error : -EAGAIN;
2224 int error;
2253 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2257 if (error || resp_len < GEN5_RESP_DATA_STRUCTURE_OFFSET ||
2261 return error ? error : -EAGAIN;
2315 int error, resume_error;
2322 error = cyapa_pip_suspend_scanning(cyapa);
2323 if (error)
2324 return error;
2328 error = cyapa_gen5_read_mutual_idac_data(cyapa,
2332 if (error)
2336 error = cyapa_gen5_read_self_idac_data(cyapa,
2340 if (error)
2344 error = cyapa_gen5_execute_panel_scan(cyapa);
2345 if (error)
2349 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2356 if (error)
2360 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2367 if (error)
2371 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2378 if (error)
2382 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2389 if (error)
2393 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2400 if (error)
2404 error = cyapa_gen5_read_panel_scan_raw_data(cyapa,
2411 if (error)
2417 if (resume_error || error)
2418 return resume_error ? resume_error : error;
2451 int error;
2454 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2458 if (error || resp_len < PIP_BL_APP_INFO_RESP_LENGTH ||
2460 return error ? error : -EIO;
2483 int error;
2486 error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
2490 if (error || resp_len < sizeof(resp_data))
2491 return error ? error : -EIO;
2543 int error;
2550 error = cyapa_pip_bl_exit(cyapa);
2551 if (error) {
2567 error = cyapa_gen5_set_power_mode(cyapa,
2569 if (error)
2575 error = cyapa_pip_set_proximity(cyapa, true);
2576 if (error)
2583 error = cyapa_gen5_get_query_data(cyapa);
2584 if (error)
2591 error = -EINVAL;
2595 error = -EINVAL;
2599 return error;