Input: max77693 - convert to atomic pwm operation
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Mon, 30 Jun 2025 16:27:26 +0000 (09:27 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 4 Aug 2025 06:12:09 +0000 (23:12 -0700)
commit61c6fef7c4b06b4bdbf3142f4e5cace70597e0de
tree7c3d4b9c791ade507902a74a727567dd78034e06
parent1c44b818b81bf6a111a702536a560f5bc830c6d5
Input: max77693 - convert to atomic pwm operation

The driver called pwm_config() and pwm_enable() separately. Today both
are wrappers for pwm_apply_might_sleep() and it's more effective to call
this function directly and only once. Also don't configure the
duty_cycle and period if the next operation is to disable the PWM so
configure the PWM in max77693_haptic_enable().

With the direct use of pwm_apply_might_sleep() the need to call
pwm_apply_args() in .probe() is now gone, too, so drop this one.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20250630103851.2069952-2-u.kleine-koenig@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/max77693-haptic.c