Lines Matching refs:error

62 	int error;  in max77843_haptic_set_duty_cycle()  local
64 error = pwm_config(haptic->pwm_dev, delta, haptic->pwm_dev->period); in max77843_haptic_set_duty_cycle()
65 if (error) { in max77843_haptic_set_duty_cycle()
66 dev_err(haptic->dev, "failed to configure pwm: %d\n", error); in max77843_haptic_set_duty_cycle()
67 return error; in max77843_haptic_set_duty_cycle()
75 int error; in max77843_haptic_bias() local
77 error = regmap_update_bits(haptic->regmap_haptic, in max77843_haptic_bias()
81 if (error) { in max77843_haptic_bias()
83 on ? "enable" : "disable", error); in max77843_haptic_bias()
84 return error; in max77843_haptic_bias()
93 int error; in max77843_haptic_config() local
99 error = regmap_write(haptic->regmap_haptic, in max77843_haptic_config()
101 if (error) { in max77843_haptic_config()
103 "failed to update haptic config: %d\n", error); in max77843_haptic_config()
104 return error; in max77843_haptic_config()
112 int error; in max77843_haptic_enable() local
117 error = pwm_enable(haptic->pwm_dev); in max77843_haptic_enable()
118 if (error) { in max77843_haptic_enable()
120 "failed to enable pwm device: %d\n", error); in max77843_haptic_enable()
121 return error; in max77843_haptic_enable()
124 error = max77843_haptic_config(haptic, true); in max77843_haptic_enable()
125 if (error) in max77843_haptic_enable()
135 return error; in max77843_haptic_enable()
140 int error; in max77843_haptic_disable() local
145 error = max77843_haptic_config(haptic, false); in max77843_haptic_disable()
146 if (error) in max77843_haptic_disable()
147 return error; in max77843_haptic_disable()
160 int error; in max77843_haptic_play_work() local
168 error = max77843_haptic_set_duty_cycle(haptic); in max77843_haptic_play_work()
169 if (error) { in max77843_haptic_play_work()
171 "failed to set duty cycle: %d\n", error); in max77843_haptic_play_work()
175 error = max77843_haptic_enable(haptic); in max77843_haptic_play_work()
176 if (error) in max77843_haptic_play_work()
178 "cannot enable haptic: %d\n", error); in max77843_haptic_play_work()
180 error = max77843_haptic_disable(haptic); in max77843_haptic_play_work()
181 if (error) in max77843_haptic_play_work()
183 "cannot disable haptic: %d\n", error); in max77843_haptic_play_work()
212 int error; in max77843_haptic_open() local
214 error = max77843_haptic_bias(haptic, true); in max77843_haptic_open()
215 if (error) in max77843_haptic_open()
216 return error; in max77843_haptic_open()
218 error = regulator_enable(haptic->motor_reg); in max77843_haptic_open()
219 if (error) { in max77843_haptic_open()
221 "failed to enable regulator: %d\n", error); in max77843_haptic_open()
222 return error; in max77843_haptic_open()
231 int error; in max77843_haptic_close() local
236 error = regulator_disable(haptic->motor_reg); in max77843_haptic_close()
237 if (error) in max77843_haptic_close()
239 "failed to disable regulator: %d\n", error); in max77843_haptic_close()
248 int error; in max77843_haptic_probe() local
288 error = input_ff_create_memless(haptic->input_dev, NULL, in max77843_haptic_probe()
290 if (error) { in max77843_haptic_probe()
292 return error; in max77843_haptic_probe()
295 error = input_register_device(haptic->input_dev); in max77843_haptic_probe()
296 if (error) { in max77843_haptic_probe()
298 return error; in max77843_haptic_probe()
310 int error; in max77843_haptic_suspend() local
312 error = mutex_lock_interruptible(&haptic->mutex); in max77843_haptic_suspend()
313 if (error) in max77843_haptic_suspend()
314 return error; in max77843_haptic_suspend()