Lines Matching +full:rmi4 +full:- +full:f01
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2011-2016 Synaptics Incorporated
6 * This driver provides the core support for a single RMI4-based device.
8 * The RMI4 specification can be found here (URL split for line length):
11 * 511-000136-01-Rev-E-RMI4-Interfacing-Guide.pdf
38 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_free_function_list()
40 rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, "Freeing function list\n"); in rmi_free_function_list()
42 /* Doing it in the reverse order so F01 will be removed last */ in rmi_free_function_list()
44 &data->function_list, node) { in rmi_free_function_list()
45 list_del(&fn->node); in rmi_free_function_list()
49 devm_kfree(&rmi_dev->dev, data->irq_memory); in rmi_free_function_list()
50 data->irq_memory = NULL; in rmi_free_function_list()
51 data->irq_status = NULL; in rmi_free_function_list()
52 data->fn_irq_bits = NULL; in rmi_free_function_list()
53 data->current_irq_mask = NULL; in rmi_free_function_list()
54 data->new_irq_mask = NULL; in rmi_free_function_list()
56 data->f01_container = NULL; in rmi_free_function_list()
57 data->f34_container = NULL; in rmi_free_function_list()
65 if (!fn || !fn->dev.driver) in reset_one_function()
68 fh = to_rmi_function_handler(fn->dev.driver); in reset_one_function()
69 if (fh->reset) { in reset_one_function()
70 retval = fh->reset(fn); in reset_one_function()
72 dev_err(&fn->dev, "Reset failed with code %d.\n", in reset_one_function()
84 if (!fn || !fn->dev.driver) in configure_one_function()
87 fh = to_rmi_function_handler(fn->dev.driver); in configure_one_function()
88 if (fh->config) { in configure_one_function()
89 retval = fh->config(fn); in configure_one_function()
91 dev_err(&fn->dev, "Config failed with code %d.\n", in configure_one_function()
100 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_driver_process_reset_requests()
104 list_for_each_entry(entry, &data->function_list, node) { in rmi_driver_process_reset_requests()
115 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_driver_process_config_requests()
119 list_for_each_entry(entry, &data->function_list, node) { in rmi_driver_process_config_requests()
130 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_process_interrupt_requests()
131 struct device *dev = &rmi_dev->dev; in rmi_process_interrupt_requests()
138 if (!data->attn_data.data) { in rmi_process_interrupt_requests()
140 data->f01_container->fd.data_base_addr + 1, in rmi_process_interrupt_requests()
141 data->irq_status, data->num_of_irq_regs); in rmi_process_interrupt_requests()
148 mutex_lock(&data->irq_mutex); in rmi_process_interrupt_requests()
149 bitmap_and(data->irq_status, data->irq_status, data->fn_irq_bits, in rmi_process_interrupt_requests()
150 data->irq_count); in rmi_process_interrupt_requests()
155 mutex_unlock(&data->irq_mutex); in rmi_process_interrupt_requests()
157 for_each_set_bit(i, data->irq_status, data->irq_count) in rmi_process_interrupt_requests()
158 handle_nested_irq(irq_find_mapping(data->irqdomain, i)); in rmi_process_interrupt_requests()
160 if (data->input) in rmi_process_interrupt_requests()
161 input_sync(data->input); in rmi_process_interrupt_requests()
169 struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev); in rmi_set_attn_data()
173 if (!drvdata->enabled) in rmi_set_attn_data()
184 kfifo_put(&drvdata->attn_fifo, attn_data); in rmi_set_attn_data()
191 struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev); in rmi_irq_fn()
195 count = kfifo_get(&drvdata->attn_fifo, &attn_data); in rmi_irq_fn()
197 *(drvdata->irq_status) = attn_data.irq_status; in rmi_irq_fn()
198 drvdata->attn_data = attn_data; in rmi_irq_fn()
203 rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, in rmi_irq_fn()
208 drvdata->attn_data.data = NULL; in rmi_irq_fn()
211 if (!kfifo_is_empty(&drvdata->attn_fifo)) in rmi_irq_fn()
220 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_irq_init()
221 int irq_flags = irq_get_trigger_type(pdata->irq); in rmi_irq_init()
227 ret = devm_request_threaded_irq(&rmi_dev->dev, pdata->irq, NULL, in rmi_irq_init()
229 dev_driver_string(rmi_dev->xport->dev), in rmi_irq_init()
232 dev_err(&rmi_dev->dev, "Failed to register interrupt %d\n", in rmi_irq_init()
233 pdata->irq); in rmi_irq_init()
238 data->enabled = true; in rmi_irq_init()
245 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_find_function()
248 list_for_each_entry(entry, &data->function_list, node) { in rmi_find_function()
249 if (entry->fd.function_number == number) in rmi_find_function()
261 if (!fn || !fn->dev.driver) in suspend_one_function()
264 fh = to_rmi_function_handler(fn->dev.driver); in suspend_one_function()
265 if (fh->suspend) { in suspend_one_function()
266 retval = fh->suspend(fn); in suspend_one_function()
268 dev_err(&fn->dev, "Suspend failed with code %d.\n", in suspend_one_function()
277 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_suspend_functions()
281 list_for_each_entry(entry, &data->function_list, node) { in rmi_suspend_functions()
295 if (!fn || !fn->dev.driver) in resume_one_function()
298 fh = to_rmi_function_handler(fn->dev.driver); in resume_one_function()
299 if (fh->resume) { in resume_one_function()
300 retval = fh->resume(fn); in resume_one_function()
302 dev_err(&fn->dev, "Resume failed with code %d.\n", in resume_one_function()
311 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_resume_functions()
315 list_for_each_entry(entry, &data->function_list, node) { in rmi_resume_functions()
336 * rmi_driver_set_input_params - set input device id and other data.
345 input->name = SYNAPTICS_INPUT_DEVICE_NAME; in rmi_driver_set_input_params()
346 input->id.vendor = SYNAPTICS_VENDOR_ID; in rmi_driver_set_input_params()
347 input->id.bustype = BUS_RMI; in rmi_driver_set_input_params()
354 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_driver_set_input_name()
355 const char *device_name = rmi_f01_get_product_ID(data->f01_container); in rmi_driver_set_input_name()
358 name = devm_kasprintf(&rmi_dev->dev, GFP_KERNEL, in rmi_driver_set_input_name()
363 input->name = name; in rmi_driver_set_input_name()
370 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_driver_set_irq_bits()
371 struct device *dev = &rmi_dev->dev; in rmi_driver_set_irq_bits()
373 mutex_lock(&data->irq_mutex); in rmi_driver_set_irq_bits()
374 bitmap_or(data->new_irq_mask, in rmi_driver_set_irq_bits()
375 data->current_irq_mask, mask, data->irq_count); in rmi_driver_set_irq_bits()
378 data->f01_container->fd.control_base_addr + 1, in rmi_driver_set_irq_bits()
379 data->new_irq_mask, data->num_of_irq_regs); in rmi_driver_set_irq_bits()
385 bitmap_copy(data->current_irq_mask, data->new_irq_mask, in rmi_driver_set_irq_bits()
386 data->num_of_irq_regs); in rmi_driver_set_irq_bits()
388 bitmap_or(data->fn_irq_bits, data->fn_irq_bits, mask, data->irq_count); in rmi_driver_set_irq_bits()
391 mutex_unlock(&data->irq_mutex); in rmi_driver_set_irq_bits()
399 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_driver_clear_irq_bits()
400 struct device *dev = &rmi_dev->dev; in rmi_driver_clear_irq_bits()
402 mutex_lock(&data->irq_mutex); in rmi_driver_clear_irq_bits()
403 bitmap_andnot(data->fn_irq_bits, in rmi_driver_clear_irq_bits()
404 data->fn_irq_bits, mask, data->irq_count); in rmi_driver_clear_irq_bits()
405 bitmap_andnot(data->new_irq_mask, in rmi_driver_clear_irq_bits()
406 data->current_irq_mask, mask, data->irq_count); in rmi_driver_clear_irq_bits()
409 data->f01_container->fd.control_base_addr + 1, in rmi_driver_clear_irq_bits()
410 data->new_irq_mask, data->num_of_irq_regs); in rmi_driver_clear_irq_bits()
416 bitmap_copy(data->current_irq_mask, data->new_irq_mask, in rmi_driver_clear_irq_bits()
417 data->num_of_irq_regs); in rmi_driver_clear_irq_bits()
420 mutex_unlock(&data->irq_mutex); in rmi_driver_clear_irq_bits()
426 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_driver_reset_handler()
433 if (!data || !data->f01_container) { in rmi_driver_reset_handler()
434 dev_warn(&rmi_dev->dev, in rmi_driver_reset_handler()
440 data->f01_container->fd.control_base_addr + 1, in rmi_driver_reset_handler()
441 data->current_irq_mask, data->num_of_irq_regs); in rmi_driver_reset_handler()
443 dev_err(&rmi_dev->dev, "%s: Failed to read current IRQ mask.\n", in rmi_driver_reset_handler()
467 dev_err(&rmi_dev->dev, "Read PDT entry at %#06x failed, code: %d.\n", in rmi_read_pdt_entry()
472 entry->page_start = pdt_address & RMI4_PAGE_MASK; in rmi_read_pdt_entry()
473 entry->query_base_addr = buf[0]; in rmi_read_pdt_entry()
474 entry->command_base_addr = buf[1]; in rmi_read_pdt_entry()
475 entry->control_base_addr = buf[2]; in rmi_read_pdt_entry()
476 entry->data_base_addr = buf[3]; in rmi_read_pdt_entry()
477 entry->interrupt_source_count = buf[4] & RMI_PDT_INT_SOURCE_COUNT_MASK; in rmi_read_pdt_entry()
478 entry->function_version = (buf[4] & RMI_PDT_FUNCTION_VERSION_MASK) >> 5; in rmi_read_pdt_entry()
479 entry->function_number = buf[5]; in rmi_read_pdt_entry()
487 fd->query_base_addr = pdt->query_base_addr + pdt->page_start; in rmi_driver_copy_pdt_to_fd()
488 fd->command_base_addr = pdt->command_base_addr + pdt->page_start; in rmi_driver_copy_pdt_to_fd()
489 fd->control_base_addr = pdt->control_base_addr + pdt->page_start; in rmi_driver_copy_pdt_to_fd()
490 fd->data_base_addr = pdt->data_base_addr + pdt->page_start; in rmi_driver_copy_pdt_to_fd()
491 fd->function_number = pdt->function_number; in rmi_driver_copy_pdt_to_fd()
492 fd->interrupt_source_count = pdt->interrupt_source_count; in rmi_driver_copy_pdt_to_fd()
493 fd->function_version = pdt->function_version; in rmi_driver_copy_pdt_to_fd()
507 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_scan_pdt_page()
516 for (addr = pdt_start; addr >= pdt_end; addr -= RMI_PDT_ENTRY_SIZE) { in rmi_scan_pdt_page()
538 return (data->bootloader_mode || *empty_pages >= 2) ? in rmi_scan_pdt_page()
584 return -EIO; in rmi_read_register_desc()
600 rdesc->struct_size = buf[1] | (buf[2] << 8); in rmi_read_register_desc()
602 rdesc->struct_size = buf[0]; in rmi_read_register_desc()
608 bitmap_set(rdesc->presense_map, map_offset, 1); in rmi_read_register_desc()
613 rdesc->num_registers = bitmap_weight(rdesc->presense_map, in rmi_read_register_desc()
616 rdesc->registers = devm_kcalloc(&d->dev, in rmi_read_register_desc()
617 rdesc->num_registers, in rmi_read_register_desc()
620 if (!rdesc->registers) in rmi_read_register_desc()
621 return -ENOMEM; in rmi_read_register_desc()
628 struct_buf = kzalloc(rdesc->struct_size, GFP_KERNEL); in rmi_read_register_desc()
630 return -ENOMEM; in rmi_read_register_desc()
638 ret = rmi_read_block(d, addr, struct_buf, rdesc->struct_size); in rmi_read_register_desc()
642 reg = find_first_bit(rdesc->presense_map, RMI_REG_DESC_PRESENSE_BITS); in rmi_read_register_desc()
643 for (i = 0; i < rdesc->num_registers; i++) { in rmi_read_register_desc()
644 struct rmi_register_desc_item *item = &rdesc->registers[i]; in rmi_read_register_desc()
662 item->reg = reg; in rmi_read_register_desc()
663 item->reg_size = reg_size; in rmi_read_register_desc()
670 bitmap_set(item->subpacket_map, in rmi_read_register_desc()
676 item->num_subpackets = bitmap_weight(item->subpacket_map, in rmi_read_register_desc()
679 rmi_dbg(RMI_DEBUG_CORE, &d->dev, in rmi_read_register_desc()
681 item->reg, item->reg_size, item->num_subpackets); in rmi_read_register_desc()
683 reg = find_next_bit(rdesc->presense_map, in rmi_read_register_desc()
698 for (i = 0; i < rdesc->num_registers; i++) { in rmi_get_register_desc_item()
699 item = &rdesc->registers[i]; in rmi_get_register_desc_item()
700 if (item->reg == reg) in rmi_get_register_desc_item()
713 for (i = 0; i < rdesc->num_registers; i++) { in rmi_register_desc_calc_size()
714 item = &rdesc->registers[i]; in rmi_register_desc_calc_size()
715 size += item->reg_size; in rmi_register_desc_calc_size()
728 for (i = 0; i < rdesc->num_registers; i++) { in rmi_register_desc_calc_reg_offset()
729 item = &rdesc->registers[i]; in rmi_register_desc_calc_reg_offset()
730 if (item->reg == reg) in rmi_register_desc_calc_reg_offset()
734 return -1; in rmi_register_desc_calc_reg_offset()
740 return find_next_bit(item->subpacket_map, RMI_REG_DESC_PRESENSE_BITS, in rmi_register_desc_has_subpacket()
747 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_check_bootloader_mode()
751 if (pdt->function_number == 0x34 && pdt->function_version > 1) { in rmi_check_bootloader_mode()
752 ret = rmi_read(rmi_dev, pdt->data_base_addr, &status); in rmi_check_bootloader_mode()
754 dev_err(&rmi_dev->dev, in rmi_check_bootloader_mode()
760 data->bootloader_mode = true; in rmi_check_bootloader_mode()
761 } else if (pdt->function_number == 0x01) { in rmi_check_bootloader_mode()
762 ret = rmi_read(rmi_dev, pdt->data_base_addr, &status); in rmi_check_bootloader_mode()
764 dev_err(&rmi_dev->dev, in rmi_check_bootloader_mode()
765 "Failed to read F01 status: %d.\n", ret); in rmi_check_bootloader_mode()
770 data->bootloader_mode = true; in rmi_check_bootloader_mode()
782 *irq_count += pdt->interrupt_source_count; in rmi_count_irqs()
796 if (pdt->function_number == 0x01) { in rmi_initial_reset()
797 u16 cmd_addr = pdt->page_start + pdt->command_base_addr; in rmi_initial_reset()
802 if (rmi_dev->xport->ops->reset) { in rmi_initial_reset()
803 error = rmi_dev->xport->ops->reset(rmi_dev->xport, in rmi_initial_reset()
811 rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, "Sending reset\n"); in rmi_initial_reset()
814 dev_err(&rmi_dev->dev, in rmi_initial_reset()
819 mdelay(pdata->reset_delay_ms ?: DEFAULT_RESET_DELAY_MS); in rmi_initial_reset()
824 /* F01 should always be on page 0. If we don't find it there, fail. */ in rmi_initial_reset()
825 return pdt->page_start == 0 ? RMI_SCAN_CONTINUE : -ENODEV; in rmi_initial_reset()
831 struct device *dev = &rmi_dev->dev; in rmi_create_function()
839 pdt->function_number); in rmi_create_function()
842 BITS_TO_LONGS(data->irq_count) * sizeof(unsigned long), in rmi_create_function()
846 pdt->function_number); in rmi_create_function()
847 return -ENOMEM; in rmi_create_function()
850 INIT_LIST_HEAD(&fn->node); in rmi_create_function()
851 rmi_driver_copy_pdt_to_fd(pdt, &fn->fd); in rmi_create_function()
853 fn->rmi_dev = rmi_dev; in rmi_create_function()
855 fn->num_of_irqs = pdt->interrupt_source_count; in rmi_create_function()
856 fn->irq_pos = *current_irq_count; in rmi_create_function()
857 *current_irq_count += fn->num_of_irqs; in rmi_create_function()
859 for (i = 0; i < fn->num_of_irqs; i++) in rmi_create_function()
860 set_bit(fn->irq_pos + i, fn->irq_mask); in rmi_create_function()
866 if (pdt->function_number == 0x01) in rmi_create_function()
867 data->f01_container = fn; in rmi_create_function()
868 else if (pdt->function_number == 0x34) in rmi_create_function()
869 data->f34_container = fn; in rmi_create_function()
871 list_add_tail(&fn->node, &data->function_list); in rmi_create_function()
879 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_enable_irq()
880 int irq = pdata->irq; in rmi_enable_irq()
884 mutex_lock(&data->enabled_mutex); in rmi_enable_irq()
886 if (data->enabled) in rmi_enable_irq()
890 data->enabled = true; in rmi_enable_irq()
891 if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) { in rmi_enable_irq()
894 dev_warn(&rmi_dev->dev, in rmi_enable_irq()
901 * otherwise we may lose interrupt on edge-triggered systems. in rmi_enable_irq()
903 irq_flags = irq_get_trigger_type(pdata->irq); in rmi_enable_irq()
908 mutex_unlock(&data->enabled_mutex); in rmi_enable_irq()
914 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_disable_irq()
916 int irq = pdata->irq; in rmi_disable_irq()
919 mutex_lock(&data->enabled_mutex); in rmi_disable_irq()
921 if (!data->enabled) in rmi_disable_irq()
924 data->enabled = false; in rmi_disable_irq()
926 if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) { in rmi_disable_irq()
929 dev_warn(&rmi_dev->dev, in rmi_disable_irq()
935 while (!kfifo_is_empty(&data->attn_fifo)) { in rmi_disable_irq()
936 count = kfifo_get(&data->attn_fifo, &attn_data); in rmi_disable_irq()
942 mutex_unlock(&data->enabled_mutex); in rmi_disable_irq()
951 dev_warn(&rmi_dev->dev, "Failed to suspend functions: %d\n", in rmi_driver_suspend()
967 dev_warn(&rmi_dev->dev, "Failed to suspend functions: %d\n", in rmi_driver_resume()
977 struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); in rmi_driver_remove()
984 irq_domain_remove(data->irqdomain); in rmi_driver_remove()
985 data->irqdomain = NULL; in rmi_driver_remove()
996 retval = rmi_of_property_read_u32(dev, &pdata->reset_delay_ms, in rmi_driver_of_probe()
997 "syna,reset-delay-ms", 1); in rmi_driver_of_probe()
1007 return -ENODEV; in rmi_driver_of_probe()
1013 struct rmi_device *rmi_dev = data->rmi_dev; in rmi_probe_interrupts()
1014 struct device *dev = &rmi_dev->dev; in rmi_probe_interrupts()
1015 struct fwnode_handle *fwnode = rmi_dev->xport->dev->fwnode; in rmi_probe_interrupts()
1027 data->bootloader_mode = false; in rmi_probe_interrupts()
1035 if (data->bootloader_mode) in rmi_probe_interrupts()
1039 data->irqdomain = irq_domain_create_linear(fwnode, irq_count, in rmi_probe_interrupts()
1042 if (!data->irqdomain) { in rmi_probe_interrupts()
1043 dev_err(&rmi_dev->dev, "Failed to create IRQ domain\n"); in rmi_probe_interrupts()
1044 return -ENOMEM; in rmi_probe_interrupts()
1047 data->irq_count = irq_count; in rmi_probe_interrupts()
1048 data->num_of_irq_regs = (data->irq_count + 7) / 8; in rmi_probe_interrupts()
1050 size = BITS_TO_LONGS(data->irq_count) * sizeof(unsigned long); in rmi_probe_interrupts()
1051 data->irq_memory = devm_kcalloc(dev, size, 4, GFP_KERNEL); in rmi_probe_interrupts()
1052 if (!data->irq_memory) { in rmi_probe_interrupts()
1054 return -ENOMEM; in rmi_probe_interrupts()
1057 data->irq_status = data->irq_memory + size * 0; in rmi_probe_interrupts()
1058 data->fn_irq_bits = data->irq_memory + size * 1; in rmi_probe_interrupts()
1059 data->current_irq_mask = data->irq_memory + size * 2; in rmi_probe_interrupts()
1060 data->new_irq_mask = data->irq_memory + size * 3; in rmi_probe_interrupts()
1067 struct rmi_device *rmi_dev = data->rmi_dev; in rmi_init_functions()
1068 struct device *dev = &rmi_dev->dev; in rmi_init_functions()
1080 if (!data->f01_container) { in rmi_init_functions()
1081 dev_err(dev, "Missing F01 container!\n"); in rmi_init_functions()
1082 retval = -EINVAL; in rmi_init_functions()
1087 data->f01_container->fd.control_base_addr + 1, in rmi_init_functions()
1088 data->current_irq_mask, data->num_of_irq_regs); in rmi_init_functions()
1115 return -ENODEV; in rmi_driver_probe()
1119 rmi_driver = to_rmi_driver(dev->driver); in rmi_driver_probe()
1120 rmi_dev->driver = rmi_driver; in rmi_driver_probe()
1124 if (rmi_dev->xport->dev->of_node) { in rmi_driver_probe()
1125 retval = rmi_driver_of_probe(rmi_dev->xport->dev, pdata); in rmi_driver_probe()
1132 return -ENOMEM; in rmi_driver_probe()
1134 INIT_LIST_HEAD(&data->function_list); in rmi_driver_probe()
1135 data->rmi_dev = rmi_dev; in rmi_driver_probe()
1136 dev_set_drvdata(&rmi_dev->dev, data); in rmi_driver_probe()
1163 retval = rmi_read(rmi_dev, PDT_PROPERTIES_LOCATION, &data->pdt_props); in rmi_driver_probe()
1173 mutex_init(&data->irq_mutex); in rmi_driver_probe()
1174 mutex_init(&data->enabled_mutex); in rmi_driver_probe()
1180 if (rmi_dev->xport->input) { in rmi_driver_probe()
1185 * One example is some HID touchpads report "pass-through" in rmi_driver_probe()
1188 data->input = rmi_dev->xport->input; in rmi_driver_probe()
1190 data->input = devm_input_allocate_device(dev); in rmi_driver_probe()
1191 if (!data->input) { in rmi_driver_probe()
1194 retval = -ENOMEM; in rmi_driver_probe()
1197 rmi_driver_set_input_params(rmi_dev, data->input); in rmi_driver_probe()
1198 data->input->phys = devm_kasprintf(dev, GFP_KERNEL, in rmi_driver_probe()
1200 if (!data->input->phys) { in rmi_driver_probe()
1201 retval = -ENOMEM; in rmi_driver_probe()
1214 if (data->input) { in rmi_driver_probe()
1215 rmi_driver_set_input_name(rmi_dev, data->input); in rmi_driver_probe()
1216 if (!rmi_dev->xport->input) { in rmi_driver_probe()
1217 retval = input_register_device(data->input); in rmi_driver_probe()
1230 if (data->f01_container->dev.driver) { in rmi_driver_probe()