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] [day] [month] [year] [list]
Message-ID: <vvldfzpthexjb7bir5imrdslgnnqztl2rdclfp6qiesj6hgiea@o53kcxs66mjr>
Date: Thu, 1 Feb 2024 14:38:19 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: "Viorel Suman (OSS)" <viorel.suman@....nxp.com>,
	Florin Leotescu <florin.leotescu@....com>,
	Cc@....codeaurora.org:Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	NXP Linux Team <linux-imx@....com>, linux-pwm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Viorel Suman <viorel.suman@....com>
Subject: Re: [PATCH] pwm: imx-tpm: reset module on probe

Hello,

On Thu, Feb 01, 2024 at 02:22:42PM +0200, Viorel Suman (OSS) wrote:
> From: Viorel Suman <viorel.suman@....com>
> 
> Reset Timer PWM module on probe so that the module
> takes the default state after probe is finished.
> 
> Signed-off-by: Viorel Suman <viorel.suman@....com>
> Signed-off-by: Florin Leotescu <florin.leotescu@....com>

The order of Signed-off-lines is supposed to be in the order that people
touched the patch during submission. So your S-o-b line should be last
and it should ideally use the email address you use for sending out the
patch.

> ---
>  drivers/pwm/pwm-imx-tpm.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c
> index 9fc290e647e1..27e6a5342693 100644
> --- a/drivers/pwm/pwm-imx-tpm.c
> +++ b/drivers/pwm/pwm-imx-tpm.c
> @@ -33,6 +33,7 @@
>  #define PWM_IMX_TPM_CnV(n)	(0x24 + (n) * 0x8)
>  
>  #define PWM_IMX_TPM_PARAM_CHAN			GENMASK(7, 0)
> +#define PWM_IMX_TPM_GLOBAL_RST			BIT(1)
>  
>  #define PWM_IMX_TPM_SC_PS			GENMASK(2, 0)
>  #define PWM_IMX_TPM_SC_CMOD			GENMASK(4, 3)
> @@ -362,6 +363,10 @@ static int pwm_imx_tpm_probe(struct platform_device *pdev)
>  	val = readl(tpm->base + PWM_IMX_TPM_PARAM);
>  	tpm->chip.npwm = FIELD_GET(PWM_IMX_TPM_PARAM_CHAN, val);
>  
> +	/* Resets all internal logic and registers */
> +	writel(PWM_IMX_TPM_GLOBAL_RST, tpm->base + PWM_IMX_TPM_GLOBAL);
> +	writel(0, tpm->base + PWM_IMX_TPM_GLOBAL);
> +

This opposes the use case that the bootloader setup the pwm-backlight to
show a splash screen that is simply taken over by Linux without
flickering, right?

Otherwise the commit log should motivate why "the module takes the
default state" is better than the status quo and what this default state
is.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ