Lines Matching refs:error
70 int error; in max77693_haptic_set_duty_cycle() local
72 error = pwm_config(haptic->pwm_dev, delta, haptic->pwm_dev->period); in max77693_haptic_set_duty_cycle()
73 if (error) { in max77693_haptic_set_duty_cycle()
74 dev_err(haptic->dev, "failed to configure pwm: %d\n", error); in max77693_haptic_set_duty_cycle()
75 return error; in max77693_haptic_set_duty_cycle()
85 int error; in max77693_haptic_configure() local
92 error = regmap_write(haptic->regmap_haptic, in max77693_haptic_configure()
94 if (error) { in max77693_haptic_configure()
96 "failed to update haptic config: %d\n", error); in max77693_haptic_configure()
97 return error; in max77693_haptic_configure()
105 int error; in max77693_haptic_lowsys() local
107 error = regmap_update_bits(haptic->regmap_pmic, in max77693_haptic_lowsys()
111 if (error) { in max77693_haptic_lowsys()
112 dev_err(haptic->dev, "cannot update pmic regmap: %d\n", error); in max77693_haptic_lowsys()
113 return error; in max77693_haptic_lowsys()
121 int error; in max77693_haptic_enable() local
126 error = pwm_enable(haptic->pwm_dev); in max77693_haptic_enable()
127 if (error) { in max77693_haptic_enable()
129 "failed to enable haptic pwm device: %d\n", error); in max77693_haptic_enable()
133 error = max77693_haptic_lowsys(haptic, true); in max77693_haptic_enable()
134 if (error) in max77693_haptic_enable()
137 error = max77693_haptic_configure(haptic, true); in max77693_haptic_enable()
138 if (error) in max77693_haptic_enable()
153 int error; in max77693_haptic_disable() local
158 error = max77693_haptic_configure(haptic, false); in max77693_haptic_disable()
159 if (error) in max77693_haptic_disable()
162 error = max77693_haptic_lowsys(haptic, false); in max77693_haptic_disable()
163 if (error) in max77693_haptic_disable()
179 int error; in max77693_haptic_play_work() local
181 error = max77693_haptic_set_duty_cycle(haptic); in max77693_haptic_play_work()
182 if (error) { in max77693_haptic_play_work()
183 dev_err(haptic->dev, "failed to set duty cycle: %d\n", error); in max77693_haptic_play_work()
220 int error; in max77693_haptic_open() local
222 error = regulator_enable(haptic->motor_reg); in max77693_haptic_open()
223 if (error) { in max77693_haptic_open()
225 "failed to enable regulator: %d\n", error); in max77693_haptic_open()
226 return error; in max77693_haptic_open()
235 int error; in max77693_haptic_close() local
240 error = regulator_disable(haptic->motor_reg); in max77693_haptic_close()
241 if (error) in max77693_haptic_close()
243 "failed to disable regulator: %d\n", error); in max77693_haptic_close()
250 int error; in max77693_haptic_probe() local
294 error = input_ff_create_memless(haptic->input_dev, NULL, in max77693_haptic_probe()
296 if (error) { in max77693_haptic_probe()
298 return error; in max77693_haptic_probe()
301 error = input_register_device(haptic->input_dev); in max77693_haptic_probe()
302 if (error) { in max77693_haptic_probe()
304 return error; in max77693_haptic_probe()