From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (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 72275377004; Thu, 25 Jun 2026 07:15:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.200.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782371753; cv=none; b=bDiCBSIfA3O78ROkamGxwyfWZR1DZ1UuwHFgA6YDyf+5AXJqhV7q2Ho/4dewyOVJ9ryetPaDxUCTvy+Fqhcw0G8DLkEpTUP2O6HwTEMZX0/+QPkj0a3puBMrkyUieUgZrWX5r6zJYy/FrRpy+R3clbQ8GntcJlX9yt68GMIxZjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782371753; c=relaxed/simple; bh=jtLyUbKd7dDuflCpKpED/0d4+HlPwf4sht7We6CR1Kg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sbPrTDMtNsMJXr7enWwTTQ02/FjMsapLGJXz68A6tR9Z16zpOqODF79P4NIXv021dr4wsFjtVzMmgOMQNJcBFCPy3GrCKJtmJ/0DVTQ5etV0yGePL7VZA58Pvv7yut1rva2x6EdD9irv23CZLrw4fhJ3cbrXASCcLOq7oqW17ps= 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.200.13 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 (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id EBA0D200320; Thu, 25 Jun 2026 09:15:47 +0200 (CEST) Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wceJP-004YMk-2p; Thu, 25 Jun 2026 09:15:47 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1wceJP-0000000DGAN-39Df; Thu, 25 Jun 2026 09:15:47 +0200 Date: Thu, 25 Jun 2026 09:15:47 +0200 From: Oleksij Rempel To: "Carlos Song (OSS)" Cc: kernel@pengutronix.de, andi.shyti@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, carlos.song@nxp.com, haibo.chen@nxp.com, linux-i2c@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v5] i2c: imx: mark I2C adapter when hardware is powered down Message-ID: References: <20260525030400.3182911-1-carlos.song@oss.nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260525030400.3182911-1-carlos.song@oss.nxp.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain On Mon, May 25, 2026 at 11:04:00AM +0800, Carlos Song (OSS) wrote: > From: Carlos Song > > On some i.MX platforms, certain I2C client drivers keep a periodic > workqueue which continues to trigger I2C transfers. > > During system suspend/resume, there exists a time window between: > - suspend_noirq and the system entering suspend > - the system starting to resume and resume_noirq > > In this window, the I2C controller resources such as clock and pinctrl > may already be disabled or not yet restored. > > If a workqueue triggers an I2C transfer in this period, the driver > attempts to access I2C registers while the hardware resources are > unavailable, which may lead to system hang. > > Mark the I2C adapter as suspended during noirq suspend and block new > transfers until resume, ensuring that I2C transfers are only issued > when hardware resources are available. > > Fixes: 358025ac091e ("i2c: imx: make controller available until system suspend_noirq() and from resume_noirq()") > Cc: stable@vger.kernel.org > Signed-off-by: Carlos Song Acked-by: Oleksij Rempel Thank you! Best Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |