Lines Matching refs:error
58 int len, error; in elan_smbus_initialize() local
65 error = len < 0 ? len : -EIO; in elan_smbus_initialize()
66 return error; in elan_smbus_initialize()
77 error = i2c_smbus_write_byte(client, ETP_SMBUS_ENABLE_TP); in elan_smbus_initialize()
78 if (error) { in elan_smbus_initialize()
79 dev_err(&client->dev, "failed to enable touchpad: %d\n", error); in elan_smbus_initialize()
80 return error; in elan_smbus_initialize()
117 int error; in elan_smbus_calibrate_result() local
122 error = i2c_smbus_read_block_data(client, in elan_smbus_calibrate_result()
124 if (error < 0) in elan_smbus_calibrate_result()
125 return error; in elan_smbus_calibrate_result()
134 int error; in elan_smbus_get_baseline_data() local
137 error = i2c_smbus_read_block_data(client, in elan_smbus_get_baseline_data()
142 if (error < 0) in elan_smbus_get_baseline_data()
143 return error; in elan_smbus_get_baseline_data()
153 int error; in elan_smbus_get_version() local
156 error = i2c_smbus_read_block_data(client, in elan_smbus_get_version()
160 if (error < 0) { in elan_smbus_get_version()
162 iap ? "IAP" : "FW", error); in elan_smbus_get_version()
163 return error; in elan_smbus_get_version()
173 int error; in elan_smbus_get_sm_version() local
176 error = i2c_smbus_read_block_data(client, in elan_smbus_get_sm_version()
178 if (error < 0) { in elan_smbus_get_sm_version()
179 dev_err(&client->dev, "failed to get SM version: %d\n", error); in elan_smbus_get_sm_version()
180 return error; in elan_smbus_get_sm_version()
191 int error; in elan_smbus_get_product_id() local
194 error = i2c_smbus_read_block_data(client, in elan_smbus_get_product_id()
196 if (error < 0) { in elan_smbus_get_product_id()
197 dev_err(&client->dev, "failed to get product ID: %d\n", error); in elan_smbus_get_product_id()
198 return error; in elan_smbus_get_product_id()
208 int error; in elan_smbus_get_checksum() local
211 error = i2c_smbus_read_block_data(client, in elan_smbus_get_checksum()
215 if (error < 0) { in elan_smbus_get_checksum()
217 iap ? "IAP" : "FW", error); in elan_smbus_get_checksum()
218 return error; in elan_smbus_get_checksum()
229 int error; in elan_smbus_get_max() local
234 error = ret < 0 ? ret : -EIO; in elan_smbus_get_max()
235 dev_err(&client->dev, "failed to get dimensions: %d\n", error); in elan_smbus_get_max()
236 return error; in elan_smbus_get_max()
249 int error; in elan_smbus_get_resolution() local
254 error = ret < 0 ? ret : -EIO; in elan_smbus_get_resolution()
255 dev_err(&client->dev, "failed to get resolution: %d\n", error); in elan_smbus_get_resolution()
256 return error; in elan_smbus_get_resolution()
270 int error; in elan_smbus_get_num_traces() local
275 error = ret < 0 ? ret : -EIO; in elan_smbus_get_num_traces()
276 dev_err(&client->dev, "failed to get trace info: %d\n", error); in elan_smbus_get_num_traces()
277 return error; in elan_smbus_get_num_traces()
296 int error; in elan_smbus_iap_get_mode() local
300 error = i2c_smbus_read_block_data(client, ETP_SMBUS_IAP_CTRL_CMD, val); in elan_smbus_iap_get_mode()
301 if (error < 0) { in elan_smbus_iap_get_mode()
303 error); in elan_smbus_iap_get_mode()
304 return error; in elan_smbus_iap_get_mode()
317 int error; in elan_smbus_iap_reset() local
319 error = i2c_smbus_write_byte(client, ETP_SMBUS_IAP_RESET_CMD); in elan_smbus_iap_reset()
320 if (error) { in elan_smbus_iap_reset()
321 dev_err(&client->dev, "cannot reset IC: %d\n", error); in elan_smbus_iap_reset()
322 return error; in elan_smbus_iap_reset()
330 int error; in elan_smbus_set_flash_key() local
333 error = i2c_smbus_write_block_data(client, ETP_SMBUS_IAP_CMD, in elan_smbus_set_flash_key()
335 if (error) { in elan_smbus_set_flash_key()
336 dev_err(&client->dev, "cannot set flash key: %d\n", error); in elan_smbus_set_flash_key()
337 return error; in elan_smbus_set_flash_key()
348 int error; in elan_smbus_prepare_fw_update() local
355 error = elan_smbus_iap_get_mode(client, &mode); in elan_smbus_prepare_fw_update()
356 if (error) in elan_smbus_prepare_fw_update()
357 return error; in elan_smbus_prepare_fw_update()
362 error = elan_smbus_set_flash_key(client); in elan_smbus_prepare_fw_update()
363 if (error) in elan_smbus_prepare_fw_update()
364 return error; in elan_smbus_prepare_fw_update()
373 error = i2c_smbus_write_block_data(client, ETP_SMBUS_IAP_CMD, in elan_smbus_prepare_fw_update()
375 if (error) { in elan_smbus_prepare_fw_update()
377 error); in elan_smbus_prepare_fw_update()
378 return error; in elan_smbus_prepare_fw_update()
389 error = len < 0 ? len : -EIO; in elan_smbus_prepare_fw_update()
391 error); in elan_smbus_prepare_fw_update()
392 return error; in elan_smbus_prepare_fw_update()
405 error = elan_smbus_set_flash_key(client); in elan_smbus_prepare_fw_update()
406 if (error) in elan_smbus_prepare_fw_update()
407 return error; in elan_smbus_prepare_fw_update()
410 error = elan_smbus_iap_reset(client); in elan_smbus_prepare_fw_update()
411 if (error) in elan_smbus_prepare_fw_update()
412 return error; in elan_smbus_prepare_fw_update()
422 int error; in elan_smbus_write_fw_block() local
431 error = i2c_smbus_write_block_data(client, in elan_smbus_write_fw_block()
435 if (error) { in elan_smbus_write_fw_block()
437 idx, 1, error); in elan_smbus_write_fw_block()
438 return error; in elan_smbus_write_fw_block()
441 error = i2c_smbus_write_block_data(client, in elan_smbus_write_fw_block()
445 if (error) { in elan_smbus_write_fw_block()
447 idx, 2, error); in elan_smbus_write_fw_block()
448 return error; in elan_smbus_write_fw_block()
455 error = i2c_smbus_read_block_data(client, in elan_smbus_write_fw_block()
457 if (error < 0) { in elan_smbus_write_fw_block()
459 error); in elan_smbus_write_fw_block()
460 return error; in elan_smbus_write_fw_block()