Commit 59921a73 authored by Liu Ying's avatar Liu Ying Committed by Uwe Kleine-König

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: e9b50387 ("pwm: adp5585: Add Analog Devices ADP5585 support")
Signed-off-by: default avatarLiu Ying <victor.liu@nxp.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240826083337.1835405-1-victor.liu@nxp.comSigned-off-by: default avatarUwe Kleine-König <ukleinek@kernel.org>
parent 4c82005f
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment