Lines Matching refs:cyapa
42 static int cyapa_reinitialize(struct cyapa *cyapa);
44 bool cyapa_is_pip_bl_mode(struct cyapa *cyapa) in cyapa_is_pip_bl_mode() argument
46 if (cyapa->gen == CYAPA_GEN6 && cyapa->state == CYAPA_STATE_GEN6_BL) in cyapa_is_pip_bl_mode()
49 if (cyapa->gen == CYAPA_GEN5 && cyapa->state == CYAPA_STATE_GEN5_BL) in cyapa_is_pip_bl_mode()
55 bool cyapa_is_pip_app_mode(struct cyapa *cyapa) in cyapa_is_pip_app_mode() argument
57 if (cyapa->gen == CYAPA_GEN6 && cyapa->state == CYAPA_STATE_GEN6_APP) in cyapa_is_pip_app_mode()
60 if (cyapa->gen == CYAPA_GEN5 && cyapa->state == CYAPA_STATE_GEN5_APP) in cyapa_is_pip_app_mode()
66 static bool cyapa_is_bootloader_mode(struct cyapa *cyapa) in cyapa_is_bootloader_mode() argument
68 if (cyapa_is_pip_bl_mode(cyapa)) in cyapa_is_bootloader_mode()
71 if (cyapa->gen == CYAPA_GEN3 && in cyapa_is_bootloader_mode()
72 cyapa->state >= CYAPA_STATE_BL_BUSY && in cyapa_is_bootloader_mode()
73 cyapa->state <= CYAPA_STATE_BL_ACTIVE) in cyapa_is_bootloader_mode()
79 static inline bool cyapa_is_operational_mode(struct cyapa *cyapa) in cyapa_is_operational_mode() argument
81 if (cyapa_is_pip_app_mode(cyapa)) in cyapa_is_operational_mode()
84 if (cyapa->gen == CYAPA_GEN3 && cyapa->state == CYAPA_STATE_OP) in cyapa_is_operational_mode()
91 static ssize_t cyapa_i2c_read(struct cyapa *cyapa, u8 reg, size_t len, in cyapa_i2c_read() argument
94 struct i2c_client *client = cyapa->client; in cyapa_i2c_read()
128 static int cyapa_i2c_write(struct cyapa *cyapa, u8 reg, in cyapa_i2c_write() argument
131 struct i2c_client *client = cyapa->client; in cyapa_i2c_write()
164 static int cyapa_get_state(struct cyapa *cyapa) in cyapa_get_state() argument
169 bool even_addr = ((cyapa->client->addr & 0x0001) == 0); in cyapa_get_state()
174 cyapa->state = CYAPA_STATE_NO_DEVICE; in cyapa_get_state()
182 error = cyapa_i2c_reg_read_block(cyapa, BL_HEAD_OFFSET, BL_STATUS_SIZE, in cyapa_get_state()
190 if (cyapa->smbus && (error == -ETIMEDOUT || error == -ENXIO)) { in cyapa_get_state()
192 error = cyapa_read_block(cyapa, in cyapa_get_state()
204 cyapa->status[REG_OP_STATUS] = status[REG_OP_STATUS]; in cyapa_get_state()
205 cyapa->status[REG_BL_STATUS] = status[REG_BL_STATUS]; in cyapa_get_state()
206 cyapa->status[REG_BL_ERROR] = status[REG_BL_ERROR]; in cyapa_get_state()
208 if (cyapa->gen == CYAPA_GEN_UNKNOWN || in cyapa_get_state()
209 cyapa->gen == CYAPA_GEN3) { in cyapa_get_state()
210 error = cyapa_gen3_ops.state_parse(cyapa, in cyapa_get_state()
215 if (cyapa->gen == CYAPA_GEN_UNKNOWN || in cyapa_get_state()
216 cyapa->gen == CYAPA_GEN6 || in cyapa_get_state()
217 cyapa->gen == CYAPA_GEN5) { in cyapa_get_state()
218 error = cyapa_pip_state_parse(cyapa, in cyapa_get_state()
224 if ((cyapa->gen == CYAPA_GEN_UNKNOWN || in cyapa_get_state()
225 cyapa->gen == CYAPA_GEN5) && in cyapa_get_state()
227 error = cyapa_gen5_ops.state_parse(cyapa, in cyapa_get_state()
240 error = cyapa_i2c_write(cyapa, 0, 2, cmd); in cyapa_get_state()
246 error = cyapa_i2c_read(cyapa, BL_HEAD_OFFSET, in cyapa_get_state()
256 if (cyapa->state <= CYAPA_STATE_BL_BUSY) in cyapa_get_state()
279 int cyapa_poll_state(struct cyapa *cyapa, unsigned int timeout) in cyapa_poll_state() argument
285 error = cyapa_get_state(cyapa); in cyapa_poll_state()
286 if (!error && cyapa->state > CYAPA_STATE_BL_BUSY) in cyapa_poll_state()
311 static int cyapa_check_is_operational(struct cyapa *cyapa) in cyapa_check_is_operational() argument
315 error = cyapa_poll_state(cyapa, 4000); in cyapa_check_is_operational()
319 switch (cyapa->gen) { in cyapa_check_is_operational()
321 cyapa->ops = &cyapa_gen6_ops; in cyapa_check_is_operational()
324 cyapa->ops = &cyapa_gen5_ops; in cyapa_check_is_operational()
327 cyapa->ops = &cyapa_gen3_ops; in cyapa_check_is_operational()
333 error = cyapa->ops->operational_check(cyapa); in cyapa_check_is_operational()
334 if (!error && cyapa_is_operational_mode(cyapa)) in cyapa_check_is_operational()
335 cyapa->operational = true; in cyapa_check_is_operational()
337 cyapa->operational = false; in cyapa_check_is_operational()
348 static int cyapa_detect(struct cyapa *cyapa) in cyapa_detect() argument
350 struct device *dev = &cyapa->client->dev; in cyapa_detect()
353 error = cyapa_check_is_operational(cyapa); in cyapa_detect()
356 cyapa_is_bootloader_mode(cyapa)) { in cyapa_detect()
370 struct cyapa *cyapa = input_get_drvdata(input); in cyapa_open() local
371 struct i2c_client *client = cyapa->client; in cyapa_open()
375 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_open()
379 if (cyapa->operational) { in cyapa_open()
385 error = cyapa->ops->set_power_mode(cyapa, in cyapa_open()
392 error = cyapa_reinitialize(cyapa); in cyapa_open()
393 if (error || !cyapa->operational) { in cyapa_open()
409 mutex_unlock(&cyapa->state_sync_lock); in cyapa_open()
415 struct cyapa *cyapa = input_get_drvdata(input); in cyapa_close() local
416 struct i2c_client *client = cyapa->client; in cyapa_close()
417 struct device *dev = &cyapa->client->dev; in cyapa_close()
419 mutex_lock(&cyapa->state_sync_lock); in cyapa_close()
426 if (cyapa->operational) in cyapa_close()
427 cyapa->ops->set_power_mode(cyapa, in cyapa_close()
430 mutex_unlock(&cyapa->state_sync_lock); in cyapa_close()
433 static int cyapa_create_input_dev(struct cyapa *cyapa) in cyapa_create_input_dev() argument
435 struct device *dev = &cyapa->client->dev; in cyapa_create_input_dev()
439 if (!cyapa->physical_size_x || !cyapa->physical_size_y) in cyapa_create_input_dev()
449 input->phys = cyapa->phys; in cyapa_create_input_dev()
453 input->dev.parent = &cyapa->client->dev; in cyapa_create_input_dev()
458 input_set_drvdata(input, cyapa); in cyapa_create_input_dev()
463 input_set_abs_params(input, ABS_MT_POSITION_X, 0, cyapa->max_abs_x, 0, in cyapa_create_input_dev()
465 input_set_abs_params(input, ABS_MT_POSITION_Y, 0, cyapa->max_abs_y, 0, in cyapa_create_input_dev()
467 input_set_abs_params(input, ABS_MT_PRESSURE, 0, cyapa->max_z, 0, 0); in cyapa_create_input_dev()
468 if (cyapa->gen > CYAPA_GEN3) { in cyapa_create_input_dev()
485 if (cyapa->gen >= CYAPA_GEN5) { in cyapa_create_input_dev()
492 cyapa->max_abs_x / cyapa->physical_size_x); in cyapa_create_input_dev()
494 cyapa->max_abs_y / cyapa->physical_size_y); in cyapa_create_input_dev()
496 if (cyapa->btn_capability & CAPABILITY_LEFT_BTN_MASK) in cyapa_create_input_dev()
498 if (cyapa->btn_capability & CAPABILITY_MIDDLE_BTN_MASK) in cyapa_create_input_dev()
500 if (cyapa->btn_capability & CAPABILITY_RIGHT_BTN_MASK) in cyapa_create_input_dev()
503 if (cyapa->btn_capability == CAPABILITY_LEFT_BTN_MASK) in cyapa_create_input_dev()
521 cyapa->input = input; in cyapa_create_input_dev()
525 static void cyapa_enable_irq_for_cmd(struct cyapa *cyapa) in cyapa_enable_irq_for_cmd() argument
527 struct input_dev *input = cyapa->input; in cyapa_enable_irq_for_cmd()
536 if (!input || cyapa->operational) in cyapa_enable_irq_for_cmd()
537 cyapa->ops->set_power_mode(cyapa, in cyapa_enable_irq_for_cmd()
540 if (cyapa->gen >= CYAPA_GEN5) in cyapa_enable_irq_for_cmd()
541 enable_irq(cyapa->client->irq); in cyapa_enable_irq_for_cmd()
545 static void cyapa_disable_irq_for_cmd(struct cyapa *cyapa) in cyapa_disable_irq_for_cmd() argument
547 struct input_dev *input = cyapa->input; in cyapa_disable_irq_for_cmd()
550 if (cyapa->gen >= CYAPA_GEN5) in cyapa_disable_irq_for_cmd()
551 disable_irq(cyapa->client->irq); in cyapa_disable_irq_for_cmd()
552 if (!input || cyapa->operational) in cyapa_disable_irq_for_cmd()
553 cyapa->ops->set_power_mode(cyapa, in cyapa_disable_irq_for_cmd()
590 static int cyapa_initialize(struct cyapa *cyapa) in cyapa_initialize() argument
594 cyapa->state = CYAPA_STATE_NO_DEVICE; in cyapa_initialize()
595 cyapa->gen = CYAPA_GEN_UNKNOWN; in cyapa_initialize()
596 mutex_init(&cyapa->state_sync_lock); in cyapa_initialize()
602 cyapa->suspend_power_mode = PWR_MODE_SLEEP; in cyapa_initialize()
603 cyapa->suspend_sleep_time = in cyapa_initialize()
604 cyapa_pwr_cmd_to_sleep_time(cyapa->suspend_power_mode); in cyapa_initialize()
607 error = cyapa_gen3_ops.initialize(cyapa); in cyapa_initialize()
609 error = cyapa_gen5_ops.initialize(cyapa); in cyapa_initialize()
611 error = cyapa_gen6_ops.initialize(cyapa); in cyapa_initialize()
615 error = cyapa_detect(cyapa); in cyapa_initialize()
620 if (cyapa->operational) in cyapa_initialize()
621 cyapa->ops->set_power_mode(cyapa, in cyapa_initialize()
627 static int cyapa_reinitialize(struct cyapa *cyapa) in cyapa_reinitialize() argument
629 struct device *dev = &cyapa->client->dev; in cyapa_reinitialize()
630 struct input_dev *input = cyapa->input; in cyapa_reinitialize()
637 if (cyapa->operational) in cyapa_reinitialize()
638 cyapa->ops->set_power_mode(cyapa, in cyapa_reinitialize()
641 error = cyapa_detect(cyapa); in cyapa_reinitialize()
645 if (!input && cyapa->operational) { in cyapa_reinitialize()
646 error = cyapa_create_input_dev(cyapa); in cyapa_reinitialize()
657 if (cyapa->operational) in cyapa_reinitialize()
658 cyapa->ops->set_power_mode(cyapa, in cyapa_reinitialize()
660 } else if (!error && cyapa->operational) { in cyapa_reinitialize()
678 struct cyapa *cyapa = dev_id; in cyapa_irq() local
679 struct device *dev = &cyapa->client->dev; in cyapa_irq()
686 if (cyapa->ops->irq_cmd_handler(cyapa)) { in cyapa_irq()
690 if (!cyapa->input) { in cyapa_irq()
695 cyapa->ops->sort_empty_output_data(cyapa, in cyapa_irq()
700 if (cyapa->operational) { in cyapa_irq()
701 error = cyapa->ops->irq_handler(cyapa); in cyapa_irq()
717 if (!cyapa->operational || error) { in cyapa_irq()
718 if (!mutex_trylock(&cyapa->state_sync_lock)) { in cyapa_irq()
719 cyapa->ops->sort_empty_output_data(cyapa, in cyapa_irq()
723 cyapa_reinitialize(cyapa); in cyapa_irq()
724 mutex_unlock(&cyapa->state_sync_lock); in cyapa_irq()
742 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_show_suspend_scanrate() local
748 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_show_suspend_scanrate()
752 pwr_cmd = cyapa->suspend_power_mode; in cyapa_show_suspend_scanrate()
753 sleep_time = cyapa->suspend_sleep_time; in cyapa_show_suspend_scanrate()
755 mutex_unlock(&cyapa->state_sync_lock); in cyapa_show_suspend_scanrate()
768 cyapa->gen == CYAPA_GEN3 ? in cyapa_show_suspend_scanrate()
781 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_update_suspend_scanrate() local
785 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_update_suspend_scanrate()
790 cyapa->suspend_power_mode = PWR_MODE_BTN_ONLY; in cyapa_update_suspend_scanrate()
792 cyapa->suspend_power_mode = PWR_MODE_OFF; in cyapa_update_suspend_scanrate()
794 cyapa->suspend_sleep_time = min_t(u16, sleep_time, 1000); in cyapa_update_suspend_scanrate()
795 cyapa->suspend_power_mode = in cyapa_update_suspend_scanrate()
796 cyapa_sleep_time_to_pwr_cmd(cyapa->suspend_sleep_time); in cyapa_update_suspend_scanrate()
801 mutex_unlock(&cyapa->state_sync_lock); in cyapa_update_suspend_scanrate()
822 struct cyapa *cyapa = data; in cyapa_remove_power_wakeup_group() local
824 sysfs_unmerge_group(&cyapa->client->dev.kobj, in cyapa_remove_power_wakeup_group()
828 static int cyapa_prepare_wakeup_controls(struct cyapa *cyapa) in cyapa_prepare_wakeup_controls() argument
830 struct i2c_client *client = cyapa->client; in cyapa_prepare_wakeup_controls()
844 cyapa_remove_power_wakeup_group, cyapa); in cyapa_prepare_wakeup_controls()
855 static inline int cyapa_prepare_wakeup_controls(struct cyapa *cyapa) in cyapa_prepare_wakeup_controls() argument
866 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_show_rt_suspend_scanrate() local
871 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_show_rt_suspend_scanrate()
875 pwr_cmd = cyapa->runtime_suspend_power_mode; in cyapa_show_rt_suspend_scanrate()
876 sleep_time = cyapa->runtime_suspend_sleep_time; in cyapa_show_rt_suspend_scanrate()
878 mutex_unlock(&cyapa->state_sync_lock); in cyapa_show_rt_suspend_scanrate()
881 cyapa->gen == CYAPA_GEN3 ? in cyapa_show_rt_suspend_scanrate()
890 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_update_rt_suspend_scanrate() local
906 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_update_rt_suspend_scanrate()
910 cyapa->runtime_suspend_sleep_time = min_t(u16, time, 1000); in cyapa_update_rt_suspend_scanrate()
911 cyapa->runtime_suspend_power_mode = in cyapa_update_rt_suspend_scanrate()
912 cyapa_sleep_time_to_pwr_cmd(cyapa->runtime_suspend_sleep_time); in cyapa_update_rt_suspend_scanrate()
914 mutex_unlock(&cyapa->state_sync_lock); in cyapa_update_rt_suspend_scanrate()
937 struct cyapa *cyapa = data; in cyapa_remove_power_runtime_group() local
939 sysfs_unmerge_group(&cyapa->client->dev.kobj, in cyapa_remove_power_runtime_group()
943 static int cyapa_start_runtime(struct cyapa *cyapa) in cyapa_start_runtime() argument
945 struct device *dev = &cyapa->client->dev; in cyapa_start_runtime()
948 cyapa->runtime_suspend_power_mode = PWR_MODE_IDLE; in cyapa_start_runtime()
949 cyapa->runtime_suspend_sleep_time = in cyapa_start_runtime()
950 cyapa_pwr_cmd_to_sleep_time(cyapa->runtime_suspend_power_mode); in cyapa_start_runtime()
960 cyapa); in cyapa_start_runtime()
976 static inline int cyapa_start_runtime(struct cyapa *cyapa) in cyapa_start_runtime() argument
986 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_show_fm_ver() local
988 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_show_fm_ver()
991 error = scnprintf(buf, PAGE_SIZE, "%d.%d\n", cyapa->fw_maj_ver, in cyapa_show_fm_ver()
992 cyapa->fw_min_ver); in cyapa_show_fm_ver()
993 mutex_unlock(&cyapa->state_sync_lock); in cyapa_show_fm_ver()
1000 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_show_product_id() local
1004 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_show_product_id()
1007 size = scnprintf(buf, PAGE_SIZE, "%s\n", cyapa->product_id); in cyapa_show_product_id()
1008 mutex_unlock(&cyapa->state_sync_lock); in cyapa_show_product_id()
1012 static int cyapa_firmware(struct cyapa *cyapa, const char *fw_name) in cyapa_firmware() argument
1014 struct device *dev = &cyapa->client->dev; in cyapa_firmware()
1025 error = cyapa->ops->check_fw(cyapa, fw); in cyapa_firmware()
1040 cyapa_enable_irq_for_cmd(cyapa); in cyapa_firmware()
1042 error = cyapa->ops->bl_enter(cyapa); in cyapa_firmware()
1048 error = cyapa->ops->bl_activate(cyapa); in cyapa_firmware()
1054 error = cyapa->ops->bl_initiate(cyapa, fw); in cyapa_firmware()
1060 error = cyapa->ops->update_fw(cyapa, fw); in cyapa_firmware()
1067 cyapa_disable_irq_for_cmd(cyapa); in cyapa_firmware()
1079 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_update_fw_store() local
1094 if (cyapa->input) { in cyapa_update_fw_store()
1100 input_unregister_device(cyapa->input); in cyapa_update_fw_store()
1101 cyapa->input = NULL; in cyapa_update_fw_store()
1104 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_update_fw_store()
1110 cyapa_reinitialize(cyapa); in cyapa_update_fw_store()
1114 error = cyapa_firmware(cyapa, fw_name); in cyapa_update_fw_store()
1124 ret = cyapa_reinitialize(cyapa); in cyapa_update_fw_store()
1130 mutex_unlock(&cyapa->state_sync_lock); in cyapa_update_fw_store()
1139 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_calibrate_store() local
1142 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_calibrate_store()
1146 if (cyapa->operational) { in cyapa_calibrate_store()
1147 cyapa_enable_irq_for_cmd(cyapa); in cyapa_calibrate_store()
1148 error = cyapa->ops->calibrate_store(dev, attr, buf, count); in cyapa_calibrate_store()
1149 cyapa_disable_irq_for_cmd(cyapa); in cyapa_calibrate_store()
1154 mutex_unlock(&cyapa->state_sync_lock); in cyapa_calibrate_store()
1161 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_show_baseline() local
1164 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_show_baseline()
1168 if (cyapa->operational) { in cyapa_show_baseline()
1169 cyapa_enable_irq_for_cmd(cyapa); in cyapa_show_baseline()
1170 error = cyapa->ops->show_baseline(dev, attr, buf); in cyapa_show_baseline()
1171 cyapa_disable_irq_for_cmd(cyapa); in cyapa_show_baseline()
1176 mutex_unlock(&cyapa->state_sync_lock); in cyapa_show_baseline()
1180 static char *cyapa_state_to_string(struct cyapa *cyapa) in cyapa_state_to_string() argument
1182 switch (cyapa->state) { in cyapa_state_to_string()
1204 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_show_mode() local
1208 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_show_mode()
1213 cyapa->gen, cyapa_state_to_string(cyapa)); in cyapa_show_mode()
1215 mutex_unlock(&cyapa->state_sync_lock); in cyapa_show_mode()
1242 struct cyapa *cyapa = data; in cyapa_disable_regulator() local
1244 regulator_disable(cyapa->vcc); in cyapa_disable_regulator()
1251 struct cyapa *cyapa; in cyapa_probe() local
1267 cyapa = devm_kzalloc(dev, sizeof(struct cyapa), GFP_KERNEL); in cyapa_probe()
1268 if (!cyapa) in cyapa_probe()
1273 cyapa->smbus = true; in cyapa_probe()
1275 cyapa->client = client; in cyapa_probe()
1276 i2c_set_clientdata(client, cyapa); in cyapa_probe()
1277 sprintf(cyapa->phys, "i2c-%d-%04x/input0", client->adapter->nr, in cyapa_probe()
1280 cyapa->vcc = devm_regulator_get(dev, "vcc"); in cyapa_probe()
1281 if (IS_ERR(cyapa->vcc)) { in cyapa_probe()
1282 error = PTR_ERR(cyapa->vcc); in cyapa_probe()
1287 error = regulator_enable(cyapa->vcc); in cyapa_probe()
1293 error = devm_add_action_or_reset(dev, cyapa_disable_regulator, cyapa); in cyapa_probe()
1300 error = cyapa_initialize(cyapa); in cyapa_probe()
1312 error = cyapa_prepare_wakeup_controls(cyapa); in cyapa_probe()
1318 error = cyapa_start_runtime(cyapa); in cyapa_probe()
1327 "cyapa", cyapa); in cyapa_probe()
1341 if (cyapa->operational) { in cyapa_probe()
1342 error = cyapa_create_input_dev(cyapa); in cyapa_probe()
1356 struct cyapa *cyapa = i2c_get_clientdata(client); in cyapa_suspend() local
1360 error = mutex_lock_interruptible(&cyapa->state_sync_lock); in cyapa_suspend()
1377 if (cyapa->operational) { in cyapa_suspend()
1378 power_mode = device_may_wakeup(dev) ? cyapa->suspend_power_mode in cyapa_suspend()
1380 error = cyapa->ops->set_power_mode(cyapa, power_mode, in cyapa_suspend()
1381 cyapa->suspend_sleep_time, CYAPA_PM_SUSPEND); in cyapa_suspend()
1391 if (cyapa->dev_pwr_mode != PWR_MODE_OFF) in cyapa_suspend()
1392 cyapa->ops->set_proximity(cyapa, false); in cyapa_suspend()
1395 cyapa->irq_wake = (enable_irq_wake(client->irq) == 0); in cyapa_suspend()
1397 mutex_unlock(&cyapa->state_sync_lock); in cyapa_suspend()
1404 struct cyapa *cyapa = i2c_get_clientdata(client); in cyapa_resume() local
1407 mutex_lock(&cyapa->state_sync_lock); in cyapa_resume()
1409 if (device_may_wakeup(dev) && cyapa->irq_wake) { in cyapa_resume()
1411 cyapa->irq_wake = false; in cyapa_resume()
1418 error = cyapa_reinitialize(cyapa); in cyapa_resume()
1424 mutex_unlock(&cyapa->state_sync_lock); in cyapa_resume()
1430 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_runtime_suspend() local
1433 error = cyapa->ops->set_power_mode(cyapa, in cyapa_runtime_suspend()
1434 cyapa->runtime_suspend_power_mode, in cyapa_runtime_suspend()
1435 cyapa->runtime_suspend_sleep_time, in cyapa_runtime_suspend()
1445 struct cyapa *cyapa = dev_get_drvdata(dev); in cyapa_runtime_resume() local
1448 error = cyapa->ops->set_power_mode(cyapa, in cyapa_runtime_resume()