From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 D24B738F94; Wed, 20 Mar 2024 08:37:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710923849; cv=none; b=WusI+gZVUcr7b+W1MELGUxVnFVnRgYRzp+EZU38F37LiEmDBPCpBNC/3uIKxrdBgnwnOF4BJlhhRW2ZoHnyidT2j3cNBOmX2wm0MjyONSKidL+/JwRRHtuVayklN6L9pFH8dqMOvFydl6t1Kj+iSogioHk8JM+ETz4xkK38Ud+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710923849; c=relaxed/simple; bh=e7sm5KHKe7u07Hsum6EAU2IzxwlcrcHFBumoupR3X0A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uxuYaJdW8uXRk4Spt+/0QGqZmodE5mBprctzoOqs7tzXP3uZW/x+Q1vhTQGOs7z8b8kgiAHZqOazg9aqIWhtzSpGFQNaj575B9+Wm/sPtJrhD0hy9VuH6LxaU3tWowxOo3bBpwfRTV25kcpFhnDjhuppG+q9Y2cKGQjZvhobZF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=YZcI3zZ6; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="YZcI3zZ6" Received: by mail.gandi.net (Postfix) with ESMTPSA id 45FB44000B; Wed, 20 Mar 2024 08:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710923843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=STDUP9Qpyn6byZT3Ex4nieAzKGvpxzwoBCLFYRcWYac=; b=YZcI3zZ6pCAGbOyaL4vujc3a8ofF3MTLoqFnqYp2nnh6+aION1xaleoyRffG047ewxT09f sAbNU86SW5htuCuTQnymVuuwp/9TS+uJ854aCbULiTNRZLut0QO6yurLmTxiWbboBE3Vzm idoVKgot7+G7goramB7nNFKAjUuPNJ3KWJB3N0XiT3x8T/NUECF7n64SH3OfaKGlZBGilc Rtwp2GMx7wArlXzCFnyM+RVp2pEedhtJy6oDAuH60kBFJK9byFbZNVdqce+2o4QoBChdg2 WTV5ompOrojR4xHgMsWPjDHilcSja1wX1gZ5i3z5sqYkp3un611thZiP4rQbCg== Message-ID: Date: Wed, 20 Mar 2024 09:37:21 +0100 Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 02/18] pinctrl: pinctrl-single: move suspend()/resume() callbacks to noirq Content-Language: en-US To: Dhruva Gole Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Andy Shevchenko References: <20240102-j7200-pcie-s2r-v4-0-6f1f53390c85@bootlin.com> <20240102-j7200-pcie-s2r-v4-2-6f1f53390c85@bootlin.com> <20240320074431.6yzao3jlyaxuii7c@dhruva> From: Thomas Richard In-Reply-To: <20240320074431.6yzao3jlyaxuii7c@dhruva> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-Sasl: thomas.richard@bootlin.com On 3/20/24 08:44, Dhruva Gole wrote: > Hi, > > On Mar 04, 2024 at 16:35:45 +0100, Thomas Richard wrote: >> The goal is to extend the active period of pinctrl. >> Some devices may need active pinctrl after suspend() and/or before >> resume(). >> So move suspend()/resume() to suspend_noirq()/resume_noirq() in order to >> have active pinctrl until suspend_noirq() (included), and from >> resume_noirq() (included). >> >> The deprecated API has been removed to use the new one (dev_pm_ops struct). >> >> No need to check the pointer returned by dev_get_drvdata(), as >> platform_set_drvdata() is called during the probe. >> >> Reviewed-by: Linus Walleij >> Reviewed-by: Andy Shevchenko >> Signed-off-by: Thomas Richard >> --- > > I was planning to do this but didn't see particular benefit to it. Do > you see the benefit on your specific device? Can you help me understand > how? Not against the patch, just curious. Hello Dhruva, We need this patch to support suspend to ram for the PCIe on J7200. In root complex mode, a gpio is used to reset endpoints. This gpio shall be managed during suspend_noirq and resume_noirq stages. On J7200 this gpio is on a gpio expander. So we need this patch to restore pinctrl to be able to do i2c accesses in noirq stages. Best Regards, -- Thomas Richard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9B8BC54E67 for ; Wed, 20 Mar 2024 08:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vl5h8jg9/1JPXjFItp02ygz3ejyhNNBgUZyO+vewkas=; b=DOsz8lb8tab3Nd kwQPkTSK078tVe00NPpytyWi4FNgUsL7fnORvvwRPQBIlFxHNBgII5H/DSV5kTVzzqZvCSclkj/iL 8ZT7dII+jsK1FdufS60QbcWbhoeacuadkDl8TKIuX6FA/I8Bmyp/WDQKR6yWypIHUWPvSx2Z73ieT k9c//6Cw94GDDOhm5BYfeVCYc1bmoLhg8rzQKOpepuIAq4+6NrfXjXnWA/pA4fCrF22/wZmA1AgRW ICpeFhz01ANeQaGxAQ85FWQNsGFVdwniSHRKEls7tRfjJAyPt0j0hELEtd2Typ/RiODO5+tPPjKim hDxZeCnzvncCeQE4hCbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmrS0-0000000GDX7-1RrP; Wed, 20 Mar 2024 08:37:32 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmrRw-0000000GDUA-0lfx; Wed, 20 Mar 2024 08:37:30 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 45FB44000B; Wed, 20 Mar 2024 08:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710923843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=STDUP9Qpyn6byZT3Ex4nieAzKGvpxzwoBCLFYRcWYac=; b=YZcI3zZ6pCAGbOyaL4vujc3a8ofF3MTLoqFnqYp2nnh6+aION1xaleoyRffG047ewxT09f sAbNU86SW5htuCuTQnymVuuwp/9TS+uJ854aCbULiTNRZLut0QO6yurLmTxiWbboBE3Vzm idoVKgot7+G7goramB7nNFKAjUuPNJ3KWJB3N0XiT3x8T/NUECF7n64SH3OfaKGlZBGilc Rtwp2GMx7wArlXzCFnyM+RVp2pEedhtJy6oDAuH60kBFJK9byFbZNVdqce+2o4QoBChdg2 WTV5ompOrojR4xHgMsWPjDHilcSja1wX1gZ5i3z5sqYkp3un611thZiP4rQbCg== Message-ID: Date: Wed, 20 Mar 2024 09:37:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 02/18] pinctrl: pinctrl-single: move suspend()/resume() callbacks to noirq Content-Language: en-US To: Dhruva Gole Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Andy Shevchenko References: <20240102-j7200-pcie-s2r-v4-0-6f1f53390c85@bootlin.com> <20240102-j7200-pcie-s2r-v4-2-6f1f53390c85@bootlin.com> <20240320074431.6yzao3jlyaxuii7c@dhruva> From: Thomas Richard In-Reply-To: <20240320074431.6yzao3jlyaxuii7c@dhruva> X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240320_013728_682217_CE8C26D8 X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/20/24 08:44, Dhruva Gole wrote: > Hi, > > On Mar 04, 2024 at 16:35:45 +0100, Thomas Richard wrote: >> The goal is to extend the active period of pinctrl. >> Some devices may need active pinctrl after suspend() and/or before >> resume(). >> So move suspend()/resume() to suspend_noirq()/resume_noirq() in order to >> have active pinctrl until suspend_noirq() (included), and from >> resume_noirq() (included). >> >> The deprecated API has been removed to use the new one (dev_pm_ops struct). >> >> No need to check the pointer returned by dev_get_drvdata(), as >> platform_set_drvdata() is called during the probe. >> >> Reviewed-by: Linus Walleij >> Reviewed-by: Andy Shevchenko >> Signed-off-by: Thomas Richard >> --- > > I was planning to do this but didn't see particular benefit to it. Do > you see the benefit on your specific device? Can you help me understand > how? Not against the patch, just curious. Hello Dhruva, We need this patch to support suspend to ram for the PCIe on J7200. In root complex mode, a gpio is used to reset endpoints. This gpio shall be managed during suspend_noirq and resume_noirq stages. On J7200 this gpio is on a gpio expander. So we need this patch to restore pinctrl to be able to do i2c accesses in noirq stages. Best Regards, -- Thomas Richard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FED8C54E67 for ; Wed, 20 Mar 2024 08:37:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ezPcbcOshQ5klG2A0siY62QOZL1zvHYiMIx2oC/UHzs=; b=hz5UmzJSQbOYk+ Y+KY8S5tTmh4ExhHC/F5HCaUFV1dgBTo3CWgSgnzC041/dZqTEQ7tGPi+j0MEKhuP+XQXCITa/7qT 2sbvF1tkk7Rrby2qybezXpvkaYYXnCjtdC4yJ7s74fUaZizj7qAydH2PoQHmbs3dP20FODDmtpmeW QrAdt5WwVre4v4ckCINU86LnjD4vMDTN+2CRgbaONiP4UE8BZoEiauqDOQabicPzedRCtzQXX2lw3 MWGr7PLNHUVOpVSn5toSJApOByDyba/A9L8iKhpLVVzjUj0ID6mdGWzoWyqCHjDuH74yGqL9CYgkZ wOlcgk7HGCR2lArHcNcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmrS1-0000000GDYA-0xCb; Wed, 20 Mar 2024 08:37:33 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmrRw-0000000GDUA-0lfx; Wed, 20 Mar 2024 08:37:30 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 45FB44000B; Wed, 20 Mar 2024 08:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710923843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=STDUP9Qpyn6byZT3Ex4nieAzKGvpxzwoBCLFYRcWYac=; b=YZcI3zZ6pCAGbOyaL4vujc3a8ofF3MTLoqFnqYp2nnh6+aION1xaleoyRffG047ewxT09f sAbNU86SW5htuCuTQnymVuuwp/9TS+uJ854aCbULiTNRZLut0QO6yurLmTxiWbboBE3Vzm idoVKgot7+G7goramB7nNFKAjUuPNJ3KWJB3N0XiT3x8T/NUECF7n64SH3OfaKGlZBGilc Rtwp2GMx7wArlXzCFnyM+RVp2pEedhtJy6oDAuH60kBFJK9byFbZNVdqce+2o4QoBChdg2 WTV5ompOrojR4xHgMsWPjDHilcSja1wX1gZ5i3z5sqYkp3un611thZiP4rQbCg== Message-ID: Date: Wed, 20 Mar 2024 09:37:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 02/18] pinctrl: pinctrl-single: move suspend()/resume() callbacks to noirq Content-Language: en-US To: Dhruva Gole Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Andy Shevchenko References: <20240102-j7200-pcie-s2r-v4-0-6f1f53390c85@bootlin.com> <20240102-j7200-pcie-s2r-v4-2-6f1f53390c85@bootlin.com> <20240320074431.6yzao3jlyaxuii7c@dhruva> From: Thomas Richard In-Reply-To: <20240320074431.6yzao3jlyaxuii7c@dhruva> X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240320_013728_682217_CE8C26D8 X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On 3/20/24 08:44, Dhruva Gole wrote: > Hi, > > On Mar 04, 2024 at 16:35:45 +0100, Thomas Richard wrote: >> The goal is to extend the active period of pinctrl. >> Some devices may need active pinctrl after suspend() and/or before >> resume(). >> So move suspend()/resume() to suspend_noirq()/resume_noirq() in order to >> have active pinctrl until suspend_noirq() (included), and from >> resume_noirq() (included). >> >> The deprecated API has been removed to use the new one (dev_pm_ops struct). >> >> No need to check the pointer returned by dev_get_drvdata(), as >> platform_set_drvdata() is called during the probe. >> >> Reviewed-by: Linus Walleij >> Reviewed-by: Andy Shevchenko >> Signed-off-by: Thomas Richard >> --- > > I was planning to do this but didn't see particular benefit to it. Do > you see the benefit on your specific device? Can you help me understand > how? Not against the patch, just curious. Hello Dhruva, We need this patch to support suspend to ram for the PCIe on J7200. In root complex mode, a gpio is used to reset endpoints. This gpio shall be managed during suspend_noirq and resume_noirq stages. On J7200 this gpio is on a gpio expander. So we need this patch to restore pinctrl to be able to do i2c accesses in noirq stages. Best Regards, -- Thomas Richard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy