lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240826085049.GA23129@pendragon.ideasonboard.com>
Date: Mon, 26 Aug 2024 11:50:49 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Liu Ying <victor.liu@....com>
Cc: linux-gpio@...r.kernel.org, linux-pwm@...r.kernel.org,
	linux-kernel@...r.kernel.org, ukleinek@...nel.org,
	xiaoning.wang@....com, Frank.Li@....com, lee@...nel.org
Subject: Re: [PATCH] pwm: adp5585: Set OSC_EN bit to 1 when PWM state is
 enabled

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@....com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ