Lines Matching refs:rc

84 	int rc;  in cyttsp4_load_status_regs()  local
86 rc = cyttsp4_adap_read(cd, CY_REG_BASE, si->si_ofs.mode_size, in cyttsp4_load_status_regs()
88 if (rc < 0) in cyttsp4_load_status_regs()
90 __func__, rc); in cyttsp4_load_status_regs()
95 return rc; in cyttsp4_load_status_regs()
101 int rc; in cyttsp4_handshake() local
110 rc = cyttsp4_adap_write(cd, CY_REG_BASE, sizeof(cmd), &cmd); in cyttsp4_handshake()
111 if (rc < 0) in cyttsp4_handshake()
113 __func__, rc); in cyttsp4_handshake()
115 return rc; in cyttsp4_handshake()
121 int rc = cyttsp4_adap_write(cd, CY_REG_BASE, sizeof(cmd), &cmd); in cyttsp4_hw_soft_reset() local
122 if (rc < 0) { in cyttsp4_hw_soft_reset()
125 return rc; in cyttsp4_hw_soft_reset()
143 int rc = cyttsp4_hw_hard_reset(cd); in cyttsp4_hw_reset() local
144 if (rc == -ENOSYS) in cyttsp4_hw_reset()
145 rc = cyttsp4_hw_soft_reset(cd); in cyttsp4_hw_reset()
146 return rc; in cyttsp4_hw_reset()
163 int rc = cyttsp4_adap_read(cd, CY_REG_BASE, sizeof(si->si_data), in cyttsp4_si_data_offsets() local
165 if (rc < 0) { in cyttsp4_si_data_offsets()
167 __func__, rc); in cyttsp4_si_data_offsets()
168 return rc; in cyttsp4_si_data_offsets()
193 return rc; in cyttsp4_si_data_offsets()
202 int rc; in cyttsp4_si_get_cydata() local
218 rc = cyttsp4_adap_read(cd, read_offset, in cyttsp4_si_get_cydata()
222 if (rc < 0) { in cyttsp4_si_get_cydata()
224 __func__, rc); in cyttsp4_si_get_cydata()
225 return rc; in cyttsp4_si_get_cydata()
241 rc = cyttsp4_adap_read(cd, read_offset, si->si_ptrs.cydata->mfgid_sz, in cyttsp4_si_get_cydata()
243 if (rc < 0) { in cyttsp4_si_get_cydata()
245 __func__, rc); in cyttsp4_si_get_cydata()
246 return rc; in cyttsp4_si_get_cydata()
252 rc = cyttsp4_adap_read(cd, read_offset, in cyttsp4_si_get_cydata()
256 if (rc < 0) { in cyttsp4_si_get_cydata()
258 __func__, rc); in cyttsp4_si_get_cydata()
259 return rc; in cyttsp4_si_get_cydata()
264 return rc; in cyttsp4_si_get_cydata()
271 int rc; in cyttsp4_si_get_test_data() local
282 rc = cyttsp4_adap_read(cd, si->si_ofs.test_ofs, si->si_ofs.test_size, in cyttsp4_si_get_test_data()
284 if (rc < 0) { in cyttsp4_si_get_test_data()
286 __func__, rc); in cyttsp4_si_get_test_data()
287 return rc; in cyttsp4_si_get_test_data()
315 return rc; in cyttsp4_si_get_test_data()
322 int rc; in cyttsp4_si_get_pcfg_data() local
328 rc = -ENOMEM; in cyttsp4_si_get_pcfg_data()
330 __func__, rc); in cyttsp4_si_get_pcfg_data()
331 return rc; in cyttsp4_si_get_pcfg_data()
335 rc = cyttsp4_adap_read(cd, si->si_ofs.pcfg_ofs, si->si_ofs.pcfg_size, in cyttsp4_si_get_pcfg_data()
337 if (rc < 0) { in cyttsp4_si_get_pcfg_data()
339 __func__, rc); in cyttsp4_si_get_pcfg_data()
340 return rc; in cyttsp4_si_get_pcfg_data()
357 return rc; in cyttsp4_si_get_pcfg_data()
368 int rc; in cyttsp4_si_get_opcfg_data() local
375 rc = -ENOMEM; in cyttsp4_si_get_opcfg_data()
380 rc = cyttsp4_adap_read(cd, si->si_ofs.opcfg_ofs, si->si_ofs.opcfg_size, in cyttsp4_si_get_opcfg_data()
382 if (rc < 0) { in cyttsp4_si_get_opcfg_data()
384 __func__, rc); in cyttsp4_si_get_opcfg_data()
451 return rc; in cyttsp4_si_get_opcfg_data()
458 int rc; in cyttsp4_si_get_ddata() local
469 rc = cyttsp4_adap_read(cd, si->si_ofs.ddata_ofs, si->si_ofs.ddata_size, in cyttsp4_si_get_ddata()
471 if (rc < 0) in cyttsp4_si_get_ddata()
473 __func__, rc); in cyttsp4_si_get_ddata()
478 return rc; in cyttsp4_si_get_ddata()
485 int rc; in cyttsp4_si_get_mdata() local
496 rc = cyttsp4_adap_read(cd, si->si_ofs.mdata_ofs, si->si_ofs.mdata_size, in cyttsp4_si_get_mdata()
498 if (rc < 0) in cyttsp4_si_get_mdata()
500 __func__, rc); in cyttsp4_si_get_mdata()
505 return rc; in cyttsp4_si_get_mdata()
515 int rc = 0; in cyttsp4_si_get_btn_data() local
552 return rc; in cyttsp4_si_get_btn_data()
558 return rc; in cyttsp4_si_get_btn_data()
654 int rc; in cyttsp4_get_sysinfo_regs() local
656 rc = cyttsp4_si_data_offsets(cd); in cyttsp4_get_sysinfo_regs()
657 if (rc < 0) in cyttsp4_get_sysinfo_regs()
658 return rc; in cyttsp4_get_sysinfo_regs()
660 rc = cyttsp4_si_get_cydata(cd); in cyttsp4_get_sysinfo_regs()
661 if (rc < 0) in cyttsp4_get_sysinfo_regs()
662 return rc; in cyttsp4_get_sysinfo_regs()
664 rc = cyttsp4_si_get_test_data(cd); in cyttsp4_get_sysinfo_regs()
665 if (rc < 0) in cyttsp4_get_sysinfo_regs()
666 return rc; in cyttsp4_get_sysinfo_regs()
668 rc = cyttsp4_si_get_pcfg_data(cd); in cyttsp4_get_sysinfo_regs()
669 if (rc < 0) in cyttsp4_get_sysinfo_regs()
670 return rc; in cyttsp4_get_sysinfo_regs()
672 rc = cyttsp4_si_get_opcfg_data(cd); in cyttsp4_get_sysinfo_regs()
673 if (rc < 0) in cyttsp4_get_sysinfo_regs()
674 return rc; in cyttsp4_get_sysinfo_regs()
676 rc = cyttsp4_si_get_ddata(cd); in cyttsp4_get_sysinfo_regs()
677 if (rc < 0) in cyttsp4_get_sysinfo_regs()
678 return rc; in cyttsp4_get_sysinfo_regs()
680 rc = cyttsp4_si_get_mdata(cd); in cyttsp4_get_sysinfo_regs()
681 if (rc < 0) in cyttsp4_get_sysinfo_regs()
682 return rc; in cyttsp4_get_sysinfo_regs()
684 rc = cyttsp4_si_get_btn_data(cd); in cyttsp4_get_sysinfo_regs()
685 if (rc < 0) in cyttsp4_get_sysinfo_regs()
686 return rc; in cyttsp4_get_sysinfo_regs()
688 rc = cyttsp4_si_get_op_data_ptrs(cd); in cyttsp4_get_sysinfo_regs()
689 if (rc < 0) { in cyttsp4_get_sysinfo_regs()
692 return rc; in cyttsp4_get_sysinfo_regs()
698 rc = cyttsp4_handshake(cd, si->si_data.hst_mode); in cyttsp4_get_sysinfo_regs()
699 if (rc < 0) in cyttsp4_get_sysinfo_regs()
704 return rc; in cyttsp4_get_sysinfo_regs()
949 int rc = 0; in cyttsp4_xy_worker() local
981 rc = cyttsp4_adap_read(cd, si->si_ofs.tt_stat_ofs + 1, in cyttsp4_xy_worker()
984 if (rc < 0) { in cyttsp4_xy_worker()
986 __func__, rc); in cyttsp4_xy_worker()
998 rc = 0; in cyttsp4_xy_worker()
1019 rc = 0; in cyttsp4_xy_worker()
1022 return rc; in cyttsp4_xy_worker()
1029 int rc = 0; in cyttsp4_mt_attention() local
1037 rc = cyttsp4_xy_worker(cd); in cyttsp4_mt_attention()
1043 if (rc < 0) in cyttsp4_mt_attention()
1044 dev_err(dev, "%s: xy_worker error r=%d\n", __func__, rc); in cyttsp4_mt_attention()
1046 return rc; in cyttsp4_mt_attention()
1056 int rc; in cyttsp4_irq() local
1076 rc = cyttsp4_adap_read(cd, CY_REG_BASE, sizeof(mode), mode); in cyttsp4_irq()
1077 if (rc) { in cyttsp4_irq()
1078 dev_err(cd->dev, "%s: Fail read adapter r=%d\n", __func__, rc); in cyttsp4_irq()
1191 rc = cyttsp4_load_status_regs(cd); in cyttsp4_irq()
1192 if (rc < 0) in cyttsp4_irq()
1194 __func__, rc); in cyttsp4_irq()
1202 __func__, mode[0], rc); in cyttsp4_irq()
1203 rc = cyttsp4_handshake(cd, mode[0]); in cyttsp4_irq()
1204 if (rc < 0) in cyttsp4_irq()
1206 __func__, mode[0], rc); in cyttsp4_irq()
1315 int rc = 0; in cyttsp4_wait_bl_heartbeat() local
1324 rc = -ETIME; in cyttsp4_wait_bl_heartbeat()
1327 return rc; in cyttsp4_wait_bl_heartbeat()
1352 int rc; in cyttsp4_reset_and_wait() local
1357 rc = cyttsp4_hw_reset(cd); in cyttsp4_reset_and_wait()
1360 if (rc < 0) { in cyttsp4_reset_and_wait()
1361 dev_err(cd->dev, "%s:Fail hw reset r=%d\n", __func__, rc); in cyttsp4_reset_and_wait()
1362 return rc; in cyttsp4_reset_and_wait()
1377 int rc; in cyttsp4_set_mode() local
1401 rc = cyttsp4_adap_read(cd, CY_REG_BASE, sizeof(mode), &mode); in cyttsp4_set_mode()
1402 if (rc < 0) { in cyttsp4_set_mode()
1405 __func__, rc); in cyttsp4_set_mode()
1414 rc = cyttsp4_adap_write(cd, CY_REG_BASE, sizeof(mode), &mode); in cyttsp4_set_mode()
1416 if (rc < 0) { in cyttsp4_set_mode()
1418 __func__, rc); in cyttsp4_set_mode()
1435 rc = -EINVAL; in cyttsp4_set_mode()
1439 return rc; in cyttsp4_set_mode()
1477 int rc = 0; in cyttsp4_core_sleep_() local
1496 rc = cyttsp4_adap_read(cd, CY_REG_BASE, sizeof(mode), &mode); in cyttsp4_core_sleep_()
1497 if (rc) { in cyttsp4_core_sleep_()
1499 dev_err(cd->dev, "%s: Fail read adapter r=%d\n", __func__, rc); in cyttsp4_core_sleep_()
1506 rc = -EINVAL; in cyttsp4_core_sleep_()
1511 rc = cyttsp4_adap_write(cd, CY_REG_BASE, sizeof(mode[0]), &mode[0]); in cyttsp4_core_sleep_()
1513 if (rc) { in cyttsp4_core_sleep_()
1514 dev_err(cd->dev, "%s: Fail write adapter r=%d\n", __func__, rc); in cyttsp4_core_sleep_()
1521 rc = cd->cpdata->power(cd->cpdata, 0, cd->dev, &cd->ignore_irq); in cyttsp4_core_sleep_()
1524 rc = 0; in cyttsp4_core_sleep_()
1526 if (rc < 0) { in cyttsp4_core_sleep_()
1528 __func__, rc); in cyttsp4_core_sleep_()
1548 return rc; in cyttsp4_core_sleep_()
1554 int rc; in cyttsp4_startup_() local
1564 rc = cyttsp4_reset_and_wait(cd); in cyttsp4_startup_()
1565 if (rc < 0) { in cyttsp4_startup_()
1566 dev_err(cd->dev, "%s: Error on h/w reset r=%d\n", __func__, rc); in cyttsp4_startup_()
1578 rc = cyttsp4_adap_write(cd, CY_REG_BASE, sizeof(ldr_exit), in cyttsp4_startup_()
1581 if (rc < 0) { in cyttsp4_startup_()
1582 dev_err(cd->dev, "%s: Fail write r=%d\n", __func__, rc); in cyttsp4_startup_()
1588 rc = cyttsp4_wait_sysinfo_mode(cd); in cyttsp4_startup_()
1589 if (rc < 0) { in cyttsp4_startup_()
1618 rc = cyttsp4_get_sysinfo_regs(cd); in cyttsp4_startup_()
1619 if (rc < 0) { in cyttsp4_startup_()
1621 __func__, rc); in cyttsp4_startup_()
1627 rc = cyttsp4_set_mode(cd, CY_MODE_OPERATIONAL); in cyttsp4_startup_()
1628 if (rc < 0) { in cyttsp4_startup_()
1630 __func__, rc); in cyttsp4_startup_()
1651 return rc; in cyttsp4_startup_()
1656 int rc; in cyttsp4_startup() local
1662 rc = cyttsp4_request_exclusive(cd, cd->dev, in cyttsp4_startup()
1664 if (rc < 0) { in cyttsp4_startup()
1670 rc = cyttsp4_startup_(cd); in cyttsp4_startup()
1686 return rc; in cyttsp4_startup()
1692 int rc; in cyttsp4_startup_work_function() local
1694 rc = cyttsp4_startup(cd); in cyttsp4_startup_work_function()
1695 if (rc < 0) in cyttsp4_startup_work_function()
1697 __func__, rc); in cyttsp4_startup_work_function()
1722 int rc; in cyttsp4_core_sleep() local
1724 rc = cyttsp4_request_exclusive(cd, cd->dev, in cyttsp4_core_sleep()
1726 if (rc < 0) { in cyttsp4_core_sleep()
1732 rc = cyttsp4_core_sleep_(cd); in cyttsp4_core_sleep()
1739 return rc; in cyttsp4_core_sleep()
1745 int rc; in cyttsp4_core_wake_() local
1761 rc = cd->cpdata->power(cd->cpdata, 1, dev, &cd->ignore_irq); in cyttsp4_core_wake_()
1764 rc = -ENOSYS; in cyttsp4_core_wake_()
1766 if (rc < 0) { in cyttsp4_core_wake_()
1768 __func__, rc); in cyttsp4_core_wake_()
1800 int rc; in cyttsp4_core_wake() local
1802 rc = cyttsp4_request_exclusive(cd, cd->dev, in cyttsp4_core_wake()
1804 if (rc < 0) { in cyttsp4_core_wake()
1810 rc = cyttsp4_core_wake_(cd); in cyttsp4_core_wake()
1817 return rc; in cyttsp4_core_wake()
1824 int rc; in cyttsp4_core_suspend() local
1828 rc = cyttsp4_core_sleep(cd); in cyttsp4_core_suspend()
1829 if (rc < 0) { in cyttsp4_core_suspend()
1840 int rc; in cyttsp4_core_resume() local
1844 rc = cyttsp4_core_wake(cd); in cyttsp4_core_resume()
1845 if (rc < 0) { in cyttsp4_core_resume()
1884 int rc; in cyttsp4_setup_input_device() local
1940 rc = input_register_device(md->input); in cyttsp4_setup_input_device()
1941 if (rc < 0) in cyttsp4_setup_input_device()
1943 __func__, rc); in cyttsp4_setup_input_device()
1944 return rc; in cyttsp4_setup_input_device()
1952 int rc = 0; in cyttsp4_mt_probe() local
1963 rc = -ENOSYS; in cyttsp4_mt_probe()
1984 rc = cyttsp4_setup_input_device(cd); in cyttsp4_mt_probe()
1985 if (rc) in cyttsp4_mt_probe()
1996 return rc; in cyttsp4_mt_probe()
2005 int rc = 0; in cyttsp4_probe() local
2009 rc = -ENODEV; in cyttsp4_probe()
2016 rc = -ENOMEM; in cyttsp4_probe()
2023 rc = -ENOMEM; in cyttsp4_probe()
2047 rc = -EINVAL; in cyttsp4_probe()
2056 rc = cd->cpdata->init(cd->cpdata, 1, cd->dev); in cyttsp4_probe()
2059 rc = 0; in cyttsp4_probe()
2061 if (rc < 0) in cyttsp4_probe()
2062 dev_err(cd->dev, "%s: HW Init fail r=%d\n", __func__, rc); in cyttsp4_probe()
2072 rc = request_threaded_irq(cd->irq, NULL, cyttsp4_irq, irq_flags, in cyttsp4_probe()
2074 if (rc < 0) { in cyttsp4_probe()
2087 rc = cyttsp4_startup(cd); in cyttsp4_probe()
2090 if (rc < 0 && cd->mode == CY_MODE_UNKNOWN) { in cyttsp4_probe()
2092 __func__, rc); in cyttsp4_probe()
2096 rc = cyttsp4_mt_probe(cd); in cyttsp4_probe()
2097 if (rc < 0) { in cyttsp4_probe()
2122 return ERR_PTR(rc); in cyttsp4_probe()