From mboxrd@z Thu Jan 1 00:00:00 1970 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 457E178F2D for ; Thu, 19 Dec 2024 06:02:28 +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=1734588150; cv=none; b=KOVaQpMknydkk1mzINlDjo3vyLwyaEYp28k9FC8wczkYCFs6GNffJyVyNGGYEJtxYWDLJIPCkmwztlQICTOqyDjX0VG1Yp7SryVntU/zv7Syahs1M841yten9JVypnJonpplIcf/MjygKWGm3RcTAnbDbGvNHWEORx2vXv60Gws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734588150; c=relaxed/simple; bh=aa219JzHD9UYbB1Q5YwI37k1VSyTgbBwDI4SUvPQd4E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=siP+H0tCT0jCCNHA17AAMWDwgTIKMRIU7MssXr1jNJ0V5g94FlQ3ls03iGNoUtn1mYtBLIr2ZdWznVoK9MgRewfsHGj1eV55yajOPMViPVy7lhwsXrVftiJRhNptSyUtuPJCCQexyeNphnwcGcGJoAmBokJDMKsgk/z2i1XhzfE= 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 1tO9c2-0000r0-PE; Thu, 19 Dec 2024 07:02:18 +0100 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 1tO9c1-0049eU-1p; Thu, 19 Dec 2024 07:02:18 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tO9c2-008N4g-0k; Thu, 19 Dec 2024 07:02:18 +0100 Date: Thu, 19 Dec 2024 07:02:18 +0100 From: Oleksij Rempel To: Carlos Song Cc: andi.shyti@kernel.org, frank.li@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, linux-i2c@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] i2c: imx: switch different pinctrl state in different system power status Message-ID: References: <20241218044114.143358-1-carlos.song@nxp.com> Precedence: bulk X-Mailing-List: linux-i2c@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: <20241218044114.143358-1-carlos.song@nxp.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-i2c@vger.kernel.org On Wed, Dec 18, 2024 at 12:41:14PM +0800, Carlos Song wrote: > Switch different pinctrl state in different system power status. > > Signed-off-by: Carlos Song > Reviewed-by: Frank Li > --- > Change for V2: > - Add Frank reviewed-by. No code change. > --- > drivers/i2c/busses/i2c-imx.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > index b6ed270dd04b..350346a7892c 100644 > --- a/drivers/i2c/busses/i2c-imx.c > +++ b/drivers/i2c/busses/i2c-imx.c > @@ -1871,6 +1871,7 @@ static int i2c_imx_runtime_suspend(struct device *dev) > struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev); > > clk_disable(i2c_imx->clk); > + pinctrl_pm_select_sleep_state(dev); > > return 0; > } > @@ -1880,6 +1881,7 @@ static int i2c_imx_runtime_resume(struct device *dev) > struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev); > int ret; > > + pinctrl_pm_select_default_state(dev); Both pinctrl_pm_select_sleep_state() and pinctrl_pm_select_default_state() may fail. Please use return values. -- 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 |