Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

input: misc: max8997: Explicitly apply PWM config extracted from pwm_args

Call pwm_apply_args() just after requesting the PWM device so that the
polarity and period are initialized according to the information
provided in pwm_args.

This is an intermediate state, and pwm_apply_args() should be dropped as
soon as the atomic PWM infrastructure is in place and the driver makes
use of it.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Boris Brezillon and committed by
Thierry Reding
de93170b 7ff666bc

+6
+6
drivers/input/misc/max8997_haptic.c
··· 304 304 error); 305 305 goto err_free_mem; 306 306 } 307 + 308 + /* 309 + * FIXME: pwm_apply_args() should be removed when switching to 310 + * the atomic PWM API. 311 + */ 312 + pwm_apply_args(chip->pwm); 307 313 break; 308 314 309 315 default: