Lines Matching full:error
63 dev_err(dev, "Main firmware checksum error\n"); in goodix_firmware_verify()
70 dev_err(dev, "DSP firmware checksum error\n"); in goodix_firmware_verify()
88 int tries, error; in goodix_enter_upload_mode() local
93 error = goodix_i2c_write_u8(client, in goodix_enter_upload_mode()
95 if (error) in goodix_enter_upload_mode()
96 return error; in goodix_enter_upload_mode()
98 error = goodix_i2c_read(client, in goodix_enter_upload_mode()
100 if (error) in goodix_enter_upload_mode()
101 return error; in goodix_enter_upload_mode()
108 dev_err(&client->dev, "Error could not hold ss51 & dsp\n"); in goodix_enter_upload_mode()
113 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_DSP_CTL, 0x00); in goodix_enter_upload_mode()
114 if (error) in goodix_enter_upload_mode()
115 return error; in goodix_enter_upload_mode()
118 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_TMR0_EN, 0x00); in goodix_enter_upload_mode()
119 if (error) in goodix_enter_upload_mode()
120 return error; in goodix_enter_upload_mode()
123 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_CACHE_EN, 0x00); in goodix_enter_upload_mode()
124 if (error) in goodix_enter_upload_mode()
125 return error; in goodix_enter_upload_mode()
128 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_BOOTCTL, 0x02); in goodix_enter_upload_mode()
129 if (error) in goodix_enter_upload_mode()
130 return error; in goodix_enter_upload_mode()
133 error = goodix_i2c_write_u8(client, in goodix_enter_upload_mode()
135 if (error) in goodix_enter_upload_mode()
136 return error; in goodix_enter_upload_mode()
139 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_BOOTCTL, 0x00); in goodix_enter_upload_mode()
140 if (error) in goodix_enter_upload_mode()
141 return error; in goodix_enter_upload_mode()
144 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_BOOT_OPT, 0x00); in goodix_enter_upload_mode()
145 if (error) in goodix_enter_upload_mode()
146 return error; in goodix_enter_upload_mode()
149 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_MEM_CD_EN, 0x01); in goodix_enter_upload_mode()
150 if (error) in goodix_enter_upload_mode()
151 return error; in goodix_enter_upload_mode()
158 int error; in goodix_start_firmware() local
162 error = goodix_i2c_write_u8(client, GOODIX_REG_SW_WDT, 0xaa); in goodix_start_firmware()
163 if (error) in goodix_start_firmware()
164 return error; in goodix_start_firmware()
167 error = goodix_i2c_write_u8(client, GOODIX_REG_MISCTL_SWRST, 0x00); in goodix_start_firmware()
168 if (error) in goodix_start_firmware()
169 return error; in goodix_start_firmware()
171 error = goodix_i2c_read(client, GOODIX_REG_SW_WDT, &val, 1); in goodix_start_firmware()
172 if (error) in goodix_start_firmware()
173 return error; in goodix_start_firmware()
177 dev_err(&client->dev, "Error SW_WDT reg not cleared on fw startup\n"); in goodix_start_firmware()
182 error = goodix_i2c_write_u8(client, GOODIX_REG_SW_WDT, 0xaa); in goodix_start_firmware()
183 if (error) in goodix_start_firmware()
184 return error; in goodix_start_firmware()
194 int error; in goodix_firmware_upload() local
198 error = request_firmware(&fw, fw_name, &ts->client->dev); in goodix_firmware_upload()
199 if (error) { in goodix_firmware_upload()
200 dev_err(&ts->client->dev, "Firmware request error %d\n", error); in goodix_firmware_upload()
201 return error; in goodix_firmware_upload()
204 error = goodix_firmware_verify(&ts->client->dev, fw); in goodix_firmware_upload()
205 if (error) in goodix_firmware_upload()
208 error = goodix_reset_no_int_sync(ts); in goodix_firmware_upload()
209 if (error) in goodix_firmware_upload()
212 error = goodix_enter_upload_mode(ts->client); in goodix_firmware_upload()
213 if (error) in goodix_firmware_upload()
217 error = goodix_i2c_write_u8(ts->client, in goodix_firmware_upload()
219 if (error) in goodix_firmware_upload()
223 error = goodix_i2c_write(ts->client, GOODIX_FW_UPLOAD_ADDRESS, in goodix_firmware_upload()
225 if (error) in goodix_firmware_upload()
229 error = goodix_i2c_write_u8(ts->client, in goodix_firmware_upload()
231 if (error) in goodix_firmware_upload()
235 error = goodix_i2c_write(ts->client, GOODIX_FW_UPLOAD_ADDRESS, in goodix_firmware_upload()
237 if (error) in goodix_firmware_upload()
241 error = goodix_i2c_write_u8(ts->client, in goodix_firmware_upload()
243 if (error) in goodix_firmware_upload()
247 error = goodix_i2c_write(ts->client, GOODIX_FW_UPLOAD_ADDRESS, in goodix_firmware_upload()
249 if (error) in goodix_firmware_upload()
252 error = goodix_start_firmware(ts->client); in goodix_firmware_upload()
253 if (error) in goodix_firmware_upload()
256 error = goodix_int_sync(ts); in goodix_firmware_upload()
259 return error; in goodix_firmware_upload()
338 dev_err(&ts->client->dev, "Error no IRQ-pin access method, cannot upload fw.\n"); in goodix_firmware_check()
350 int error; in goodix_handle_fw_request() local
353 error = goodix_i2c_read(ts->client, GOODIX_REG_REQUEST, &val, 1); in goodix_handle_fw_request()
354 if (error) in goodix_handle_fw_request()
365 error = goodix_send_cfg(ts, ts->config, ts->chip->config_len); in goodix_handle_fw_request()
366 if (error) in goodix_handle_fw_request()
371 error = goodix_prepare_bak_ref(ts); in goodix_handle_fw_request()
372 if (error) in goodix_handle_fw_request()
375 error = goodix_i2c_write(ts->client, GOODIX_REG_BAK_REF, in goodix_handle_fw_request()
377 if (error) in goodix_handle_fw_request()
382 error = goodix_firmware_upload(ts); in goodix_handle_fw_request()
383 if (error) in goodix_handle_fw_request()
388 error = goodix_send_main_clock(ts); in goodix_handle_fw_request()
389 if (error) in goodix_handle_fw_request()
408 int error; in goodix_save_bak_ref() local
414 error = goodix_i2c_read(ts->client, GOODIX_REG_STATUS, &val, 1); in goodix_save_bak_ref()
415 if (error) in goodix_save_bak_ref()
421 error = goodix_i2c_read(ts->client, GOODIX_REG_BAK_REF, in goodix_save_bak_ref()
423 if (error) { in goodix_save_bak_ref()