Lines Matching full:fn

18 	struct rmi_function *fn = f34->fn;  in rmi_f34_write_bootloader_id()  local
19 struct rmi_device *rmi_dev = fn->rmi_dev; in rmi_f34_write_bootloader_id()
23 ret = rmi_read_block(rmi_dev, fn->fd.query_base_addr, in rmi_f34_write_bootloader_id()
26 dev_err(&fn->dev, "%s: Reading bootloader ID failed: %d\n", in rmi_f34_write_bootloader_id()
31 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: writing bootloader id '%c%c'\n", in rmi_f34_write_bootloader_id()
35 fn->fd.data_base_addr + F34_BLOCK_DATA_OFFSET, in rmi_f34_write_bootloader_id()
38 dev_err(&fn->dev, "Failed to write bootloader ID: %d\n", ret); in rmi_f34_write_bootloader_id()
48 struct rmi_function *fn = f34->fn; in rmi_f34_command() local
49 struct rmi_device *rmi_dev = fn->rmi_dev; in rmi_f34_command()
62 dev_err(&f34->fn->dev, in rmi_f34_command()
72 dev_err(&f34->fn->dev, in rmi_f34_command()
83 dev_err(&f34->fn->dev, in rmi_f34_command()
90 dev_err(&f34->fn->dev, in rmi_f34_command()
102 struct rmi_function *fn = ctx; in rmi_f34_attention() local
103 struct f34_data *f34 = dev_get_drvdata(&fn->dev); in rmi_f34_attention()
108 ret = rmi_read(f34->fn->rmi_dev, f34->v5.ctrl_address, in rmi_f34_attention()
110 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: status: %#02x, ret: %d\n", in rmi_f34_attention()
116 ret = rmi_read_block(f34->fn->rmi_dev, in rmi_f34_attention()
117 f34->fn->fd.data_base_addr + in rmi_f34_attention()
120 rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev, "%s: cmd: %#02x, ret: %d\n", in rmi_f34_attention()
133 struct rmi_function *fn = f34->fn; in rmi_f34_write_blocks() local
134 struct rmi_device *rmi_dev = fn->rmi_dev; in rmi_f34_write_blocks()
135 u16 address = fn->fd.data_base_addr + F34_BLOCK_DATA_OFFSET; in rmi_f34_write_blocks()
140 ret = rmi_write_block(rmi_dev, fn->fd.data_base_addr, in rmi_f34_write_blocks()
143 dev_err(&fn->dev, "Failed to write initial zeros: %d\n", ret); in rmi_f34_write_blocks()
151 dev_err(&fn->dev, in rmi_f34_write_blocks()
158 dev_err(&fn->dev, in rmi_f34_write_blocks()
164 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "wrote block %d of %d\n", in rmi_f34_write_blocks()
197 struct rmi_function *fn = f34->fn; in rmi_f34_flash_firmware() local
206 dev_info(&fn->dev, "Erasing firmware...\n"); in rmi_f34_flash_firmware()
212 dev_info(&fn->dev, "Writing firmware (%d bytes)...\n", in rmi_f34_flash_firmware()
225 dev_info(&fn->dev, "Erasing config...\n"); in rmi_f34_flash_firmware()
232 dev_info(&fn->dev, "Writing config (%d bytes)...\n", in rmi_f34_flash_firmware()
254 rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev, in rmi_f34_update_firmware()
260 rmi_dbg(RMI_DEBUG_FN, &f34->fn->dev, in rmi_f34_update_firmware()
267 dev_err(&f34->fn->dev, in rmi_f34_update_firmware()
276 dev_err(&f34->fn->dev, in rmi_f34_update_firmware()
285 dev_err(&f34->fn->dev, "Bad firmware image: no config data\n"); in rmi_f34_update_firmware()
290 dev_info(&f34->fn->dev, "Firmware image OK\n"); in rmi_f34_update_firmware()
301 static int rmi_f34_status(struct rmi_function *fn) in rmi_f34_status() argument
303 struct f34_data *f34 = dev_get_drvdata(&fn->dev); in rmi_f34_status()
317 struct rmi_function *fn = data->f34_container; in rmi_driver_bootloader_id_show() local
320 if (fn) { in rmi_driver_bootloader_id_show()
321 f34 = dev_get_drvdata(&fn->dev); in rmi_driver_bootloader_id_show()
343 struct rmi_function *fn = data->f34_container; in rmi_driver_configuration_id_show() local
346 if (fn) { in rmi_driver_configuration_id_show()
347 f34 = dev_get_drvdata(&fn->dev); in rmi_driver_configuration_id_show()
423 dev_err(&f34->fn->dev, in rmi_firmware_update()
426 dev_info(&f34->fn->dev, "Firmware update complete\n"); in rmi_firmware_update()
520 static int rmi_f34_probe(struct rmi_function *fn) in rmi_f34_probe() argument
525 u8 version = fn->fd.function_version; in rmi_f34_probe()
528 f34 = devm_kzalloc(&fn->dev, sizeof(struct f34_data), GFP_KERNEL); in rmi_f34_probe()
532 f34->fn = fn; in rmi_f34_probe()
533 dev_set_drvdata(&fn->dev, f34); in rmi_f34_probe()
541 ret = rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr, in rmi_f34_probe()
544 dev_err(&fn->dev, "%s: Failed to query properties\n", in rmi_f34_probe()
558 f34->v5.ctrl_address = fn->fd.data_base_addr + F34_BLOCK_DATA_OFFSET + in rmi_f34_probe()
562 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "Bootloader ID: %s\n", in rmi_f34_probe()
564 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "Block size: %d\n", in rmi_f34_probe()
566 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "FW blocks: %d\n", in rmi_f34_probe()
568 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "CFG blocks: %d\n", in rmi_f34_probe()
572 ret = rmi_read_block(fn->rmi_dev, fn->fd.control_base_addr, in rmi_f34_probe()
575 dev_err(&fn->dev, "Failed to read F34 config ID\n"); in rmi_f34_probe()
584 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "Configuration ID: %s\n", in rmi_f34_probe()