Lines Matching refs:error
125 int error; in silead_ts_request_input_dev() local
150 error = input_register_device(data->input); in silead_ts_request_input_dev()
151 if (error) { in silead_ts_request_input_dev()
152 dev_err(dev, "Failed to register input device: %d\n", error); in silead_ts_request_input_dev()
153 return error; in silead_ts_request_input_dev()
162 int error; in silead_ts_request_pen_input_dev() local
184 error = input_register_device(data->pen_input); in silead_ts_request_pen_input_dev()
185 if (error) { in silead_ts_request_pen_input_dev()
186 dev_err(dev, "Failed to register pen input device: %d\n", error); in silead_ts_request_pen_input_dev()
187 return error; in silead_ts_request_pen_input_dev()
249 int touch_nr, softbutton, error, i; in silead_ts_read_data() local
252 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_DATA, in silead_ts_read_data()
254 if (error < 0) { in silead_ts_read_data()
255 dev_err(dev, "Data read error %d\n", error); in silead_ts_read_data()
319 int error; in silead_ts_init() local
321 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_init()
323 if (error) in silead_ts_init()
327 error = i2c_smbus_write_byte_data(client, SILEAD_REG_TOUCH_NR, in silead_ts_init()
329 if (error) in silead_ts_init()
333 error = i2c_smbus_write_byte_data(client, SILEAD_REG_CLOCK, in silead_ts_init()
335 if (error) in silead_ts_init()
339 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_init()
341 if (error) in silead_ts_init()
348 dev_err(&client->dev, "Registers clear error %d\n", error); in silead_ts_init()
349 return error; in silead_ts_init()
354 int error; in silead_ts_reset() local
356 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_reset()
358 if (error) in silead_ts_reset()
362 error = i2c_smbus_write_byte_data(client, SILEAD_REG_CLOCK, in silead_ts_reset()
364 if (error) in silead_ts_reset()
368 error = i2c_smbus_write_byte_data(client, SILEAD_REG_POWER, in silead_ts_reset()
370 if (error) in silead_ts_reset()
377 dev_err(&client->dev, "Chip reset error %d\n", error); in silead_ts_reset()
378 return error; in silead_ts_reset()
383 int error; in silead_ts_startup() local
385 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, 0x00); in silead_ts_startup()
386 if (error) { in silead_ts_startup()
387 dev_err(&client->dev, "Startup error %d\n", error); in silead_ts_startup()
388 return error; in silead_ts_startup()
403 int error; in silead_ts_load_fw() local
429 error = firmware_request_nowarn(&fw, data->fw_name, dev); in silead_ts_load_fw()
430 if (error) { in silead_ts_load_fw()
431 error = firmware_request_platform(&fw, data->fw_name, dev); in silead_ts_load_fw()
432 if (error) { in silead_ts_load_fw()
433 dev_err(dev, "Firmware request error %d\n", error); in silead_ts_load_fw()
434 return error; in silead_ts_load_fw()
437 error = device_property_read_u32_array(dev, "silead,efi-fw-min-max", in silead_ts_load_fw()
440 if (!error) in silead_ts_load_fw()
456 error = i2c_smbus_write_i2c_block_data(client, in silead_ts_load_fw()
460 if (error) { in silead_ts_load_fw()
461 dev_err(dev, "Firmware load error %d\n", error); in silead_ts_load_fw()
467 return error ?: 0; in silead_ts_load_fw()
472 int error; in silead_ts_get_status() local
475 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_STATUS, in silead_ts_get_status()
477 if (error < 0) { in silead_ts_get_status()
478 dev_err(&client->dev, "Status read error %d\n", error); in silead_ts_get_status()
479 return error; in silead_ts_get_status()
489 int error; in silead_ts_get_id() local
491 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_ID, in silead_ts_get_id()
493 if (error < 0) in silead_ts_get_id()
494 return error; in silead_ts_get_id()
504 int error; in silead_ts_setup() local
545 error = silead_ts_get_id(client); in silead_ts_setup()
546 if (error) { in silead_ts_setup()
547 dev_err(&client->dev, "Chip ID read error %d\n", error); in silead_ts_setup()
548 return error; in silead_ts_setup()
551 error = silead_ts_init(client); in silead_ts_setup()
552 if (error) in silead_ts_setup()
553 return error; in silead_ts_setup()
555 error = silead_ts_reset(client); in silead_ts_setup()
556 if (error) in silead_ts_setup()
557 return error; in silead_ts_setup()
559 error = silead_ts_load_fw(client); in silead_ts_setup()
560 if (error) in silead_ts_setup()
561 return error; in silead_ts_setup()
563 error = silead_ts_startup(client); in silead_ts_setup()
564 if (error) in silead_ts_setup()
565 return error; in silead_ts_setup()
592 int error; in silead_ts_read_props() local
594 error = device_property_read_u32(dev, "silead,max-fingers", in silead_ts_read_props()
596 if (error) { in silead_ts_read_props()
597 dev_dbg(dev, "Max fingers read error %d\n", error); in silead_ts_read_props()
601 error = device_property_read_string(dev, "firmware-name", &str); in silead_ts_read_props()
602 if (!error) in silead_ts_read_props()
660 int error; in silead_ts_probe() local
677 error = silead_ts_set_default_fw_name(data, id); in silead_ts_probe()
678 if (error) in silead_ts_probe()
679 return error; in silead_ts_probe()
689 error = devm_regulator_bulk_get(dev, ARRAY_SIZE(data->regulators), in silead_ts_probe()
691 if (error) in silead_ts_probe()
692 return error; in silead_ts_probe()
698 error = regulator_bulk_enable(ARRAY_SIZE(data->regulators), in silead_ts_probe()
700 if (error) in silead_ts_probe()
701 return error; in silead_ts_probe()
703 error = devm_add_action_or_reset(dev, silead_disable_regulator, data); in silead_ts_probe()
704 if (error) in silead_ts_probe()
705 return error; in silead_ts_probe()
713 error = silead_ts_setup(client); in silead_ts_probe()
714 if (error) in silead_ts_probe()
715 return error; in silead_ts_probe()
717 error = silead_ts_request_input_dev(data); in silead_ts_probe()
718 if (error) in silead_ts_probe()
719 return error; in silead_ts_probe()
721 error = silead_ts_request_pen_input_dev(data); in silead_ts_probe()
722 if (error) in silead_ts_probe()
723 return error; in silead_ts_probe()
725 error = devm_request_threaded_irq(dev, client->irq, in silead_ts_probe()
728 if (error) { in silead_ts_probe()
729 if (error != -EPROBE_DEFER) in silead_ts_probe()
730 dev_err(dev, "IRQ request failed %d\n", error); in silead_ts_probe()
731 return error; in silead_ts_probe()
750 int error, status; in silead_ts_resume() local
755 error = silead_ts_reset(client); in silead_ts_resume()
756 if (error) in silead_ts_resume()
757 return error; in silead_ts_resume()
760 error = silead_ts_load_fw(client); in silead_ts_resume()
761 if (error) in silead_ts_resume()
762 return error; in silead_ts_resume()
765 error = silead_ts_startup(client); in silead_ts_resume()
766 if (error) in silead_ts_resume()
767 return error; in silead_ts_resume()