Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp358735rdb; Thu, 15 Feb 2024 02:17:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiRLLe2CemEVdEwiBhzYUxJdK8l0mU67EQlJt2WdnYVhG28Of10ezZEHmwCD9KLdKRTd7rkBD6gj5qMjvEnUJ3eNfRQEMjDoc83S9RZw== X-Google-Smtp-Source: AGHT+IHyXCBWpesW7ZKKZKWhmP8mmns5WPN1NTrBlfmWnaWBA0cKNlDUCSR+qOd5bt+eV6+mgw+V X-Received: by 2002:a05:6402:2904:b0:563:c22b:2b40 with SMTP id ee4-20020a056402290400b00563c22b2b40mr244595edb.21.1707992232139; Thu, 15 Feb 2024 02:17:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707992232; cv=pass; d=google.com; s=arc-20160816; b=gcW7/+j/pYLQR/bgKgZmtKz5X7cwCwBBUPMGbbZaCVlTSNgyjS3LJlvkBG2WohXWO+ RQm9pkY4BpMcpf69dAstvKlw8s/k4ItHOdcbrA6TODanQCA1gY+2ZWNMPsOqKmQImzvL mon4vHhEGyYlujQmMETZa1jQWgFCLaqllY66Ya8qdnj7O6btMJYOw1jsaNaHbSdzzkV8 ZsSoRnqQsJ/C2wLYa7g3tUmkQWphvCxjg8ip6qNIRbrDu2z+f2gU5dSIjvSQlaNfezGU ldcU85SW5OslSgYn9unQTfFCUEb5ik5HTD2NgRJy4HYLjwsGT2K/vbkqYstrjiLjvV5g XiTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=bReMHX+nWd8FBkvO5jQY2bDDFOUGLT+DsXio8AxGLgo=; fh=1by1mXG7VyBss5WE5n1peZxot5zSjuf4i7p4kwiyn7I=; b=B9chiMtKHlqflJEBADYgZCydU52i99DM21B7ZO6/qlZaalKoyxqHCkQW3phKrzyPip j26TwrD1A1e5CwrYIPwvCdmpAuODyLiPF1Cj5XqnyBn2rwkAZA08pOUZCuEm0npH+lpy ujbXVZ5PbKPPQJT3ZDTpz7O6C88CsZLu8yKW3S8tNXs0FpKjt/uHQbg1sdN2zeLhkXDL bSa7j/92TqM4W1or+lUV4jgVObpOXrhAxqLzbU4vP3nqKnQggvau4sWBR4bqXfm/yAru D67k70Jwo8K/MpPbA+XUQNX1fGbh8TTkCIzTCtGf/sRysgJ/RIcs8wyZJOOxbzYfXcee heCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-66611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66611-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f20-20020a0564021e9400b00563b9327e44si311044edf.71.2024.02.15.02.17.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 02:17:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-66611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66611-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 86AA01F223E8 for ; Thu, 15 Feb 2024 10:16:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E0B869D18; Thu, 15 Feb 2024 10:12:43 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8DD667C44 for ; Thu, 15 Feb 2024 10:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707991962; cv=none; b=XxMhE6/Q3uAKtcJcgoa+a9V+01Yy2YVvaoq1o3HAAUEsCdgXbfHIRzTdFb2JN81WWogXu1wfF6bx3ybV1J0U3jWEpd3S/TMhkpugBRl2/hRtvcsbqLQngamDMMRcMp81mgDHCac5MmzYMQKu70qzvdcp0TeYy0l5gQ37EN4YJm0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707991962; c=relaxed/simple; bh=eIFtCimqDhFJk6HuIKLTMzw5qvsWlj3IyY8h7yW9DwU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s979FNUPpjEo3r0UoPAX485Iqjvas94sMKEh1tFMbNnORTHjNS678y7beGDDoUwp7JYNjoRadEsedjwyh7gF1CSnVEFRNj8q0Qsj9ae/89CKXSJWjGOPdrKz0NrPMvUtj0T5Z01YW64Kq3Tp4Np5FVf1YVEENbFEBN2YeeHznsI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1raYjH-0005ke-4v; Thu, 15 Feb 2024 11:12:31 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raYjG-000rdf-8J; Thu, 15 Feb 2024 11:12:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1raYjG-005I4L-0U; Thu, 15 Feb 2024 11:12:30 +0100 Date: Thu, 15 Feb 2024 11:12:30 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Viorel Suman Cc: "Viorel Suman (OSS)" , Florin Leotescu , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , 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 Message-ID: References: <20240201122242.1597601-1-viorel.suman@oss.nxp.com> <3d866664-d2fd-4d36-9e8f-5242327e41b9@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jxbuzkk2jq3itvqv" Content-Disposition: inline In-Reply-To: <3d866664-d2fd-4d36-9e8f-5242327e41b9@nxp.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org --jxbuzkk2jq3itvqv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Thu, Feb 01, 2024 at 06:25:26PM +0200, Viorel Suman wrote: > On 2/1/24 15:38, Uwe Kleine-K=F6nig 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? >=20 > Yes, I was not aware of such use case. Is it acceptable if I'll update >=20 > the patch in a such way so that the software reset happens as function >=20 > 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. >=20 > The default state above means IP internal logic being reset to the initial > state and >=20 > registers values being set to their reset values. We're facing a situation > on iMX95 when >=20 > A core may be reset independently from the rest of the SoC, this triggers= a > new >=20 > SPL->U-Boot->Linux boot, and in Linux probe phase PWM will inherit its st= ate > from >=20 > previous Linux runtime - this leads to some issues in suspend/resume > functionality. What kind of issues? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --jxbuzkk2jq3itvqv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmXN44gACgkQj4D7WH0S /k5Ciwf7BecLTtanPQd8D4/UIOl88dzpimfzOqdiUzZeHyMfb66uhQlG/1U+6JUE aWOR9SWebqo2GRGhzXevHWX0cMNtVIk04tBKyeEMvn+QiCBLuoPEi4JNP9pfTFCl Wdhbn+YDz0/oUOEo1PkAdJiKMyIBf/kKkHMh6qepajH0K1ul5aIRPIa6UA5SfgR8 CTFqTEnD3slilQ67anWF6oASkFZGukHluLtg1neiY6JbR6C4FwG2QjE30fsFjRll Yf6V171w4lQj76xAgxLMku/Z2j+l7bueEz7lJC04QBP9ZIwY/r+KnvPgzAtsoBLv 4XehTo0rOdEfwluvr6xyP/6brmlD0A== =d7Gu -----END PGP SIGNATURE----- --jxbuzkk2jq3itvqv--