Linux-PWM Archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Viorel Suman <viorel.suman@nxp.com>
Cc: "Viorel Suman (OSS)" <viorel.suman@oss.nxp.com>,
	 Florin Leotescu <florin.leotescu@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-pwm@vger.kernel.org,  linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: imx-tpm: reset module on probe
Date: Thu, 15 Feb 2024 11:12:30 +0100	[thread overview]
Message-ID: <zeieriiouilwf23g4v5wv7oetdee43qcm5lvxiygyxmxm7lgde@m3a2uain6g45> (raw)
In-Reply-To: <3d866664-d2fd-4d36-9e8f-5242327e41b9@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]

Hello,

On Thu, Feb 01, 2024 at 06:25:26PM +0200, Viorel Suman wrote:
> On 2/1/24 15:38, Uwe Kleine-König wrote:
> > > +	/* 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?
> 
> Yes, I was not aware of such use case. Is it acceptable if I'll update
> 
> the patch in a such way so that the software reset happens as function
> 
> of a property in the related DTS node ?

That sounds wrong. Why do you reset at all? If at all, only reset if all
channels are disabled (if at all).

> > 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.
> 
> The default state above means IP internal logic being reset to the initial
> state and
> 
> registers values being set to their reset values. We're facing a situation
> on iMX95 when
> 
> A core may be reset independently from the rest of the SoC, this triggers a
> new
> 
> SPL->U-Boot->Linux boot, and in Linux probe phase PWM will inherit its state
> from
> 
> previous Linux runtime - this leads to some issues in suspend/resume
> functionality.

What kind of issues?

Best regards
Uwe

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2024-02-15 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 12:22 [PATCH] pwm: imx-tpm: reset module on probe Viorel Suman (OSS)
2024-02-01 13:38 ` Uwe Kleine-König
     [not found]   ` <3d866664-d2fd-4d36-9e8f-5242327e41b9@nxp.com>
2024-02-15 10:12     ` Uwe Kleine-König [this message]

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=zeieriiouilwf23g4v5wv7oetdee43qcm5lvxiygyxmxm7lgde@m3a2uain6g45 \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=festevam@gmail.com \
    --cc=florin.leotescu@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=viorel.suman@nxp.com \
    --cc=viorel.suman@oss.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).