Lines Matching refs:error

88 	int error;  in silead_ts_request_input_dev()  local
112 error = input_register_device(data->input); in silead_ts_request_input_dev()
113 if (error) { in silead_ts_request_input_dev()
114 dev_err(dev, "Failed to register input device: %d\n", error); in silead_ts_request_input_dev()
115 return error; in silead_ts_request_input_dev()
138 int touch_nr, softbutton, error, i; in silead_ts_read_data() local
141 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_DATA, in silead_ts_read_data()
143 if (error < 0) { in silead_ts_read_data()
144 dev_err(dev, "Data read error %d\n", error); in silead_ts_read_data()
204 int error; in silead_ts_init() local
206 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_init()
208 if (error) in silead_ts_init()
212 error = i2c_smbus_write_byte_data(client, SILEAD_REG_TOUCH_NR, in silead_ts_init()
214 if (error) in silead_ts_init()
218 error = i2c_smbus_write_byte_data(client, SILEAD_REG_CLOCK, in silead_ts_init()
220 if (error) in silead_ts_init()
224 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_init()
226 if (error) in silead_ts_init()
233 dev_err(&client->dev, "Registers clear error %d\n", error); in silead_ts_init()
234 return error; in silead_ts_init()
239 int error; in silead_ts_reset() local
241 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, in silead_ts_reset()
243 if (error) in silead_ts_reset()
247 error = i2c_smbus_write_byte_data(client, SILEAD_REG_CLOCK, in silead_ts_reset()
249 if (error) in silead_ts_reset()
253 error = i2c_smbus_write_byte_data(client, SILEAD_REG_POWER, in silead_ts_reset()
255 if (error) in silead_ts_reset()
262 dev_err(&client->dev, "Chip reset error %d\n", error); in silead_ts_reset()
263 return error; in silead_ts_reset()
268 int error; in silead_ts_startup() local
270 error = i2c_smbus_write_byte_data(client, SILEAD_REG_RESET, 0x00); in silead_ts_startup()
271 if (error) { in silead_ts_startup()
272 dev_err(&client->dev, "Startup error %d\n", error); in silead_ts_startup()
273 return error; in silead_ts_startup()
288 int error; in silead_ts_load_fw() local
292 error = firmware_request_platform(&fw, data->fw_name, dev); in silead_ts_load_fw()
293 if (error) { in silead_ts_load_fw()
294 dev_err(dev, "Firmware request error %d\n", error); in silead_ts_load_fw()
295 return error; in silead_ts_load_fw()
302 error = i2c_smbus_write_i2c_block_data(client, in silead_ts_load_fw()
306 if (error) { in silead_ts_load_fw()
307 dev_err(dev, "Firmware load error %d\n", error); in silead_ts_load_fw()
313 return error ?: 0; in silead_ts_load_fw()
318 int error; in silead_ts_get_status() local
321 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_STATUS, in silead_ts_get_status()
323 if (error < 0) { in silead_ts_get_status()
324 dev_err(&client->dev, "Status read error %d\n", error); in silead_ts_get_status()
325 return error; in silead_ts_get_status()
335 int error; in silead_ts_get_id() local
337 error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_ID, in silead_ts_get_id()
339 if (error < 0) in silead_ts_get_id()
340 return error; in silead_ts_get_id()
350 int error; in silead_ts_setup() local
391 error = silead_ts_get_id(client); in silead_ts_setup()
392 if (error) { in silead_ts_setup()
393 dev_err(&client->dev, "Chip ID read error %d\n", error); in silead_ts_setup()
394 return error; in silead_ts_setup()
397 error = silead_ts_init(client); in silead_ts_setup()
398 if (error) in silead_ts_setup()
399 return error; in silead_ts_setup()
401 error = silead_ts_reset(client); in silead_ts_setup()
402 if (error) in silead_ts_setup()
403 return error; in silead_ts_setup()
405 error = silead_ts_load_fw(client); in silead_ts_setup()
406 if (error) in silead_ts_setup()
407 return error; in silead_ts_setup()
409 error = silead_ts_startup(client); in silead_ts_setup()
410 if (error) in silead_ts_setup()
411 return error; in silead_ts_setup()
438 int error; in silead_ts_read_props() local
440 error = device_property_read_u32(dev, "silead,max-fingers", in silead_ts_read_props()
442 if (error) { in silead_ts_read_props()
443 dev_dbg(dev, "Max fingers read error %d\n", error); in silead_ts_read_props()
447 error = device_property_read_string(dev, "firmware-name", &str); in silead_ts_read_props()
448 if (!error) in silead_ts_read_props()
502 int error; in silead_ts_probe() local
519 error = silead_ts_set_default_fw_name(data, id); in silead_ts_probe()
520 if (error) in silead_ts_probe()
521 return error; in silead_ts_probe()
531 error = devm_regulator_bulk_get(dev, ARRAY_SIZE(data->regulators), in silead_ts_probe()
533 if (error) in silead_ts_probe()
534 return error; in silead_ts_probe()
540 error = regulator_bulk_enable(ARRAY_SIZE(data->regulators), in silead_ts_probe()
542 if (error) in silead_ts_probe()
543 return error; in silead_ts_probe()
545 error = devm_add_action_or_reset(dev, silead_disable_regulator, data); in silead_ts_probe()
546 if (error) in silead_ts_probe()
547 return error; in silead_ts_probe()
557 error = silead_ts_setup(client); in silead_ts_probe()
558 if (error) in silead_ts_probe()
559 return error; in silead_ts_probe()
561 error = silead_ts_request_input_dev(data); in silead_ts_probe()
562 if (error) in silead_ts_probe()
563 return error; in silead_ts_probe()
565 error = devm_request_threaded_irq(dev, client->irq, in silead_ts_probe()
568 if (error) { in silead_ts_probe()
569 if (error != -EPROBE_DEFER) in silead_ts_probe()
570 dev_err(dev, "IRQ request failed %d\n", error); in silead_ts_probe()
571 return error; in silead_ts_probe()
590 int error, status; in silead_ts_resume() local
595 error = silead_ts_reset(client); in silead_ts_resume()
596 if (error) in silead_ts_resume()
597 return error; in silead_ts_resume()
600 error = silead_ts_load_fw(client); in silead_ts_resume()
601 if (error) in silead_ts_resume()
602 return error; in silead_ts_resume()
605 error = silead_ts_startup(client); in silead_ts_resume()
606 if (error) in silead_ts_resume()
607 return error; in silead_ts_resume()