diff options
author | Liu Ying <[email protected]> | 2024-08-26 16:33:37 +0800 |
---|---|---|
committer | Uwe Kleine-König <[email protected]> | 2024-09-16 15:24:58 +0200 |
commit | 59921a7397074e90030659bbb74aad372effdeee (patch) | |
tree | c50839a59ab15d656fc21d38808b7e695ae6ed7a | |
parent | 4c82005f17ec40863ee9bd5c82efcee1edd5282c (diff) |
pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled
It turns out that OSC_EN bit in GERNERAL_CFG register has to be set to 1
when PWM state is enabled, otherwise PWM signal won't be generated.
Fixes: e9b503879fd2 ("pwm: adp5585: Add Analog Devices ADP5585 support")
Signed-off-by: Liu Ying <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
-rw-r--r-- | drivers/pwm/pwm-adp5585.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c index ed7e8c6bcf32..40472ac5db64 100644 --- a/drivers/pwm/pwm-adp5585.c +++ b/drivers/pwm/pwm-adp5585.c @@ -100,6 +100,10 @@ static int pwm_adp5585_apply(struct pwm_chip *chip, if (ret) return ret; + ret = regmap_set_bits(regmap, ADP5585_GENERAL_CFG, ADP5585_OSC_EN); + if (ret) + return ret; + return regmap_set_bits(regmap, ADP5585_PWM_CFG, ADP5585_PWM_EN); } |