Lines Matching refs:error
133 int error; in drv2667_set_waveform_freq() local
145 error = regmap_read(haptics->regmap, DRV2667_PAGE, &read_buf); in drv2667_set_waveform_freq()
146 if (error) { in drv2667_set_waveform_freq()
148 "Failed to read the page number: %d\n", error); in drv2667_set_waveform_freq()
154 error = regmap_write(haptics->regmap, in drv2667_set_waveform_freq()
156 if (error) { in drv2667_set_waveform_freq()
158 "Failed to set the page: %d\n", error); in drv2667_set_waveform_freq()
163 error = regmap_write(haptics->regmap, DRV2667_RAM_FREQ, freq); in drv2667_set_waveform_freq()
164 if (error) in drv2667_set_waveform_freq()
166 "Failed to set the frequency: %d\n", error); in drv2667_set_waveform_freq()
171 error = regmap_write(haptics->regmap, DRV2667_PAGE, read_buf); in drv2667_set_waveform_freq()
172 if (error) { in drv2667_set_waveform_freq()
174 "Failed to set the page: %d\n", error); in drv2667_set_waveform_freq()
179 return error; in drv2667_set_waveform_freq()
185 int error; in drv2667_worker() local
188 error = regmap_write(haptics->regmap, in drv2667_worker()
190 if (error) { in drv2667_worker()
192 "Failed to set the page: %d\n", error); in drv2667_worker()
196 error = regmap_write(haptics->regmap, DRV2667_RAM_AMP, in drv2667_worker()
198 if (error) { in drv2667_worker()
200 "Failed to set the amplitude: %d\n", error); in drv2667_worker()
204 error = regmap_write(haptics->regmap, in drv2667_worker()
206 if (error) { in drv2667_worker()
208 "Failed to set the page: %d\n", error); in drv2667_worker()
212 error = regmap_write(haptics->regmap, in drv2667_worker()
214 if (error) { in drv2667_worker()
216 "Failed to set the GO bit: %d\n", error); in drv2667_worker()
219 error = regmap_update_bits(haptics->regmap, DRV2667_CTRL_2, in drv2667_worker()
221 if (error) { in drv2667_worker()
223 "Failed to unset the GO bit: %d\n", error); in drv2667_worker()
248 int error; in drv2667_close() local
252 error = regmap_update_bits(haptics->regmap, DRV2667_CTRL_2, in drv2667_close()
254 if (error) in drv2667_close()
256 "Failed to enter standby mode: %d\n", error); in drv2667_close()
280 int error; in drv2667_init() local
286 error = regmap_register_patch(haptics->regmap, in drv2667_init()
289 if (error) { in drv2667_init()
292 error); in drv2667_init()
293 return error; in drv2667_init()
296 error = regmap_write(haptics->regmap, DRV2667_PAGE, haptics->page); in drv2667_init()
297 if (error) { in drv2667_init()
299 error); in drv2667_init()
303 error = drv2667_set_waveform_freq(haptics); in drv2667_init()
304 if (error) in drv2667_init()
307 error = regmap_register_patch(haptics->regmap, in drv2667_init()
310 if (error) { in drv2667_init()
313 error); in drv2667_init()
314 return error; in drv2667_init()
317 error = regmap_write(haptics->regmap, DRV2667_PAGE, DRV2667_PAGE_0); in drv2667_init()
318 return error; in drv2667_init()
323 return error; in drv2667_init()
339 int error; in drv2667_probe() local
347 error = PTR_ERR(haptics->regulator); in drv2667_probe()
349 "unable to get regulator, error: %d\n", error); in drv2667_probe()
350 return error; in drv2667_probe()
365 error = input_ff_create_memless(haptics->input_dev, NULL, in drv2667_probe()
367 if (error) { in drv2667_probe()
369 error); in drv2667_probe()
370 return error; in drv2667_probe()
380 error = PTR_ERR(haptics->regmap); in drv2667_probe()
382 error); in drv2667_probe()
383 return error; in drv2667_probe()
386 error = drv2667_init(haptics); in drv2667_probe()
387 if (error) { in drv2667_probe()
388 dev_err(&client->dev, "Device init failed: %d\n", error); in drv2667_probe()
389 return error; in drv2667_probe()
392 error = input_register_device(haptics->input_dev); in drv2667_probe()
393 if (error) { in drv2667_probe()
395 error); in drv2667_probe()
396 return error; in drv2667_probe()