Lines Matching refs:error

74 	int error;  in max77693_haptic_set_duty_cycle()  local
76 error = pwm_config(haptic->pwm_dev, delta, haptic->pwm_dev->period); in max77693_haptic_set_duty_cycle()
77 if (error) { in max77693_haptic_set_duty_cycle()
78 dev_err(haptic->dev, "failed to configure pwm: %d\n", error); in max77693_haptic_set_duty_cycle()
79 return error; in max77693_haptic_set_duty_cycle()
87 int error; in max77843_haptic_bias() local
92 error = regmap_update_bits(haptic->regmap_haptic, in max77843_haptic_bias()
96 if (error) { in max77843_haptic_bias()
98 on ? "enable" : "disable", error); in max77843_haptic_bias()
99 return error; in max77843_haptic_bias()
109 int error; in max77693_haptic_configure() local
129 error = regmap_write(haptic->regmap_haptic, in max77693_haptic_configure()
131 if (error) { in max77693_haptic_configure()
133 "failed to update haptic config: %d\n", error); in max77693_haptic_configure()
134 return error; in max77693_haptic_configure()
142 int error; in max77693_haptic_lowsys() local
147 error = regmap_update_bits(haptic->regmap_pmic, in max77693_haptic_lowsys()
151 if (error) { in max77693_haptic_lowsys()
152 dev_err(haptic->dev, "cannot update pmic regmap: %d\n", error); in max77693_haptic_lowsys()
153 return error; in max77693_haptic_lowsys()
161 int error; in max77693_haptic_enable() local
166 error = pwm_enable(haptic->pwm_dev); in max77693_haptic_enable()
167 if (error) { in max77693_haptic_enable()
169 "failed to enable haptic pwm device: %d\n", error); in max77693_haptic_enable()
173 error = max77693_haptic_lowsys(haptic, true); in max77693_haptic_enable()
174 if (error) in max77693_haptic_enable()
177 error = max77693_haptic_configure(haptic, true); in max77693_haptic_enable()
178 if (error) in max77693_haptic_enable()
193 int error; in max77693_haptic_disable() local
198 error = max77693_haptic_configure(haptic, false); in max77693_haptic_disable()
199 if (error) in max77693_haptic_disable()
202 error = max77693_haptic_lowsys(haptic, false); in max77693_haptic_disable()
203 if (error) in max77693_haptic_disable()
219 int error; in max77693_haptic_play_work() local
221 error = max77693_haptic_set_duty_cycle(haptic); in max77693_haptic_play_work()
222 if (error) { in max77693_haptic_play_work()
223 dev_err(haptic->dev, "failed to set duty cycle: %d\n", error); in max77693_haptic_play_work()
260 int error; in max77693_haptic_open() local
262 error = max77843_haptic_bias(haptic, true); in max77693_haptic_open()
263 if (error) in max77693_haptic_open()
264 return error; in max77693_haptic_open()
266 error = regulator_enable(haptic->motor_reg); in max77693_haptic_open()
267 if (error) { in max77693_haptic_open()
269 "failed to enable regulator: %d\n", error); in max77693_haptic_open()
270 return error; in max77693_haptic_open()
279 int error; in max77693_haptic_close() local
284 error = regulator_disable(haptic->motor_reg); in max77693_haptic_close()
285 if (error) in max77693_haptic_close()
287 "failed to disable regulator: %d\n", error); in max77693_haptic_close()
296 int error; in max77693_haptic_probe() local
353 error = input_ff_create_memless(haptic->input_dev, NULL, in max77693_haptic_probe()
355 if (error) { in max77693_haptic_probe()
357 return error; in max77693_haptic_probe()
360 error = input_register_device(haptic->input_dev); in max77693_haptic_probe()
361 if (error) { in max77693_haptic_probe()
363 return error; in max77693_haptic_probe()