Lines Matching full:error

124 	int error;  in silead_ts_request_input_dev()  local
149 error = input_register_device(data->input); in silead_ts_request_input_dev()
150 if (error) { in silead_ts_request_input_dev()
151 dev_err(dev, "Failed to register input device: %d\n", error); in silead_ts_request_input_dev()
152 return error; in silead_ts_request_input_dev()
161 int error; in silead_ts_request_pen_input_dev() local
183 error = input_register_device(data->pen_input); in silead_ts_request_pen_input_dev()
184 if (error) { in silead_ts_request_pen_input_dev()
185 dev_err(dev, "Failed to register pen input device: %d\n", error); in silead_ts_request_pen_input_dev()
186 return error; in silead_ts_request_pen_input_dev()
248 int touch_nr, softbutton, error, i; in silead_ts_read_data() local
251 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_DATA, in silead_ts_read_data()
253 if (error < 0) { in silead_ts_read_data()
254 dev_err(dev, "Data read error %d\n", error); in silead_ts_read_data()
317 int error; in silead_ts_init() local
319 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_init()
321 if (error) in silead_ts_init()
325 error = i2c_smbus_write_byte_data(client, SILEAD_REG_TOUCH_NR, in silead_ts_init()
327 if (error) in silead_ts_init()
331 error = i2c_smbus_write_byte_data(client, SILEAD_REG_CLOCK, in silead_ts_init()
333 if (error) in silead_ts_init()
337 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_init()
339 if (error) in silead_ts_init()
346 dev_err(&client->dev, "Registers clear error %d\n", error); in silead_ts_init()
347 return error; in silead_ts_init()
352 int error; in silead_ts_reset() local
354 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_reset()
356 if (error) in silead_ts_reset()
360 error = i2c_smbus_write_byte_data(client, SILEAD_REG_CLOCK, in silead_ts_reset()
362 if (error) in silead_ts_reset()
366 error = i2c_smbus_write_byte_data(client, SILEAD_REG_POWER, in silead_ts_reset()
368 if (error) in silead_ts_reset()
375 dev_err(&client->dev, "Chip reset error %d\n", error); in silead_ts_reset()
376 return error; in silead_ts_reset()
381 int error; in silead_ts_startup() local
383 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, 0x00); in silead_ts_startup()
384 if (error) { in silead_ts_startup()
385 dev_err(&client->dev, "Startup error %d\n", error); in silead_ts_startup()
386 return error; in silead_ts_startup()
401 int error; in silead_ts_load_fw() local
427 error = firmware_request_nowarn(&fw, data->fw_name, dev); in silead_ts_load_fw()
428 if (error) { in silead_ts_load_fw()
429 error = firmware_request_platform(&fw, data->fw_name, dev); in silead_ts_load_fw()
430 if (error) { in silead_ts_load_fw()
431 dev_err(dev, "Firmware request error %d\n", error); in silead_ts_load_fw()
432 return error; in silead_ts_load_fw()
435 error = device_property_read_u32_array(dev, "silead,efi-fw-min-max", in silead_ts_load_fw()
438 if (!error) in silead_ts_load_fw()
454 error = i2c_smbus_write_i2c_block_data(client, in silead_ts_load_fw()
458 if (error) { in silead_ts_load_fw()
459 dev_err(dev, "Firmware load error %d\n", error); in silead_ts_load_fw()
465 return error ?: 0; in silead_ts_load_fw()
470 int error; in silead_ts_get_status() local
473 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_STATUS, in silead_ts_get_status()
475 if (error < 0) { in silead_ts_get_status()
476 dev_err(&client->dev, "Status read error %d\n", error); in silead_ts_get_status()
477 return error; in silead_ts_get_status()
487 int error; in silead_ts_get_id() local
489 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_ID, in silead_ts_get_id()
491 if (error < 0) in silead_ts_get_id()
492 return error; in silead_ts_get_id()
502 int error; in silead_ts_setup() local
532 …dev_warn(&client->dev, FW_BUG "Stuck I2C bus: please ignore the next 'controller timed out' error\… in silead_ts_setup()
543 error = silead_ts_get_id(client); in silead_ts_setup()
544 if (error) { in silead_ts_setup()
545 dev_err(&client->dev, "Chip ID read error %d\n", error); in silead_ts_setup()
546 return error; in silead_ts_setup()
549 error = silead_ts_init(client); in silead_ts_setup()
550 if (error) in silead_ts_setup()
551 return error; in silead_ts_setup()
553 error = silead_ts_reset(client); in silead_ts_setup()
554 if (error) in silead_ts_setup()
555 return error; in silead_ts_setup()
557 error = silead_ts_load_fw(client); in silead_ts_setup()
558 if (error) in silead_ts_setup()
559 return error; in silead_ts_setup()
561 error = silead_ts_startup(client); in silead_ts_setup()
562 if (error) in silead_ts_setup()
563 return error; in silead_ts_setup()
568 "Initialization error, status: 0x%X\n", status); in silead_ts_setup()
590 int error; in silead_ts_read_props() local
592 error = device_property_read_string(dev, "firmware-name", &str); in silead_ts_read_props()
593 if (!error) in silead_ts_read_props()
597 dev_dbg(dev, "Firmware file name read error. Using default."); in silead_ts_read_props()
651 int error; in silead_ts_probe() local
668 error = silead_ts_set_default_fw_name(data, id); in silead_ts_probe()
669 if (error) in silead_ts_probe()
670 return error; in silead_ts_probe()
680 error = devm_regulator_bulk_get(dev, ARRAY_SIZE(data->regulators), in silead_ts_probe()
682 if (error) in silead_ts_probe()
683 return error; in silead_ts_probe()
689 error = regulator_bulk_enable(ARRAY_SIZE(data->regulators), in silead_ts_probe()
691 if (error) in silead_ts_probe()
692 return error; in silead_ts_probe()
694 error = devm_add_action_or_reset(dev, silead_disable_regulator, data); in silead_ts_probe()
695 if (error) in silead_ts_probe()
696 return error; in silead_ts_probe()
704 error = silead_ts_setup(client); in silead_ts_probe()
705 if (error) in silead_ts_probe()
706 return error; in silead_ts_probe()
708 error = silead_ts_request_input_dev(data); in silead_ts_probe()
709 if (error) in silead_ts_probe()
710 return error; in silead_ts_probe()
712 error = silead_ts_request_pen_input_dev(data); in silead_ts_probe()
713 if (error) in silead_ts_probe()
714 return error; in silead_ts_probe()
716 error = devm_request_threaded_irq(dev, client->irq, in silead_ts_probe()
719 if (error) { in silead_ts_probe()
720 if (error != -EPROBE_DEFER) in silead_ts_probe()
721 dev_err(dev, "IRQ request failed %d\n", error); in silead_ts_probe()
722 return error; in silead_ts_probe()
741 int error, status; in silead_ts_resume() local
746 error = silead_ts_reset(client); in silead_ts_resume()
747 if (error) in silead_ts_resume()
748 return error; in silead_ts_resume()
751 error = silead_ts_load_fw(client); in silead_ts_resume()
752 if (error) in silead_ts_resume()
753 return error; in silead_ts_resume()
756 error = silead_ts_startup(client); in silead_ts_resume()
757 if (error) in silead_ts_resume()
758 return error; in silead_ts_resume()
767 dev_err(dev, "Resume error, status: 0x%02x\n", status); in silead_ts_resume()