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: e9b503879f ("pwm: adp5585: Add Analog Devices ADP5585 support")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240826083337.1835405-1-victor.liu@nxp.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
This commit is contained in:
Liu Ying 2024-08-26 16:33:37 +08:00 committed by Uwe Kleine-König
parent 4c82005f17
commit 59921a7397

View File

@ -100,6 +100,10 @@ static int pwm_adp5585_apply(struct pwm_chip *chip,
if (ret) if (ret)
return 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); return regmap_set_bits(regmap, ADP5585_PWM_CFG, ADP5585_PWM_EN);
} }