PWM: core: apply initial state in of_pwm_request
This functions prepares a state that can later be tweaked and applied
to the PWM device with pwm_apply_state(). This is a convenient function
that first retrieves the current PWM state and the replaces the period
with the reference values defined in pwm->args.
Once the function returns, you can adjust the ->enabled and ->duty_cycle
fields according to your needs before calling pwm_apply_state().

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent bc2c433 commit 91912a0d5576441db1a4c9a03d309258bd49f149
@Ahmad Fatoum Ahmad Fatoum authored on 30 Mar 2020
Sascha Hauer committed on 31 Mar 2020
Showing 2 changed files
View
drivers/pwm/core.c
View
include/pwm.h