From: Liu Ying <victor.liu@nxp.com>
To: linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com, ukleinek@kernel.org,
xiaoning.wang@nxp.com, Frank.Li@nxp.com, lee@kernel.org
Subject: [PATCH] pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled
Date: Mon, 26 Aug 2024 16:33:37 +0800 [thread overview]
Message-ID: <20240826083337.1835405-1-victor.liu@nxp.com> (raw)
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 <victor.liu@nxp.com>
---
drivers/pwm/pwm-adp5585.c | 4 ++++
1 file changed, 4 insertions(+)
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);
}
--
2.34.1
next reply other threads:[~2024-08-26 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 8:33 Liu Ying [this message]
2024-08-26 8:50 ` [PATCH] pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled Laurent Pinchart
2024-09-03 16:20 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240826083337.1835405-1-victor.liu@nxp.com \
--to=victor.liu@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lee@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=ukleinek@kernel.org \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox