From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Liu Ying <victor.liu@nxp.com>
Cc: linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-kernel@vger.kernel.org, ukleinek@kernel.org,
xiaoning.wang@nxp.com, Frank.Li@nxp.com, lee@kernel.org
Subject: Re: [PATCH] pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled
Date: Mon, 26 Aug 2024 11:50:49 +0300 [thread overview]
Message-ID: <20240826085049.GA23129@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240826083337.1835405-1-victor.liu@nxp.com>
Hi Liu,
Thank you for the patch.
On Mon, Aug 26, 2024 at 04:33:37PM +0800, Liu Ying wrote:
> 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.
Indeed, this likely got lost during one of the reworks. The apply
function correctly clears the bit when disabling PWM, but doesn't set it
otherwise.
> Fixes: e9b503879fd2 ("pwm: adp5585: Add Analog Devices ADP5585 support")
> Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Uwe, would you be able to queue this for v6.12 ?
> ---
> 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);
> }
>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-08-26 8:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 8:33 [PATCH] pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled Liu Ying
2024-08-26 8:50 ` Laurent Pinchart [this message]
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=20240826085049.GA23129@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Frank.Li@nxp.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=victor.liu@nxp.com \
--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