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 4FBA5C4332F for ; Thu, 8 Dec 2022 22:30:40 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l/98SbtYJ9KIsWoYn+7J9j4zv6aUy3YIE24DO9ZH1bE=; b=DO5ifNQyxAX4UR ns91k4J9hEN0j6QTl+7jFTzAJOMT5XVE5JGyu4dWnUqoEoMHVz9dhzdvXfM/qvEr+44uZgDamy38z DKQdBjeG+QvbRxTnO2X2OOIwn1O7t8SaovrX0zKvVapDdCWNHl1FCyAlTsjvODHA3GiumcfeJJXYe SULM3T0wRRuEupzXqLspHykOfNrYgmBBE6zmKC26u3DoOzFjSR9gfNm1ZpQ8Or4VFI6GaLBv/E6TY dCnv2aGexettwdSRB6XL3q5OZTNfF0a7dqUIh+aa3EP02dIGLLDsKlzHusTT4JehYqeYkuDXH4+eV YMD9P6feISooy3FTNBKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3POW-00DkFw-PQ; Thu, 08 Dec 2022 22:29:32 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3POU-00Dk1T-4J for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 22:29:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9/E3aQ6joQfFe6Nebd8CYybcGRYfIRW8KVJYv3/3Gyc=; b=rEApFDX1rVON7J2NUJkAbzb3uv N1T4+26Rs2yikGWYDTdkYy9IJNn/RnNku768T6beKpbdsFDxyUjjR01jRlI4amoAXwHFVdgZhoKqp DHrXa1fW3DL2nWvLaIurZa3qIdMJ8QFD+Tz92EClgq/rvawoduZLFxUth8hfOKCVOVxRre2ZopdyD YGcCJRU5ijf6q19s2CGKJuUqCBa1gN3uKSW1f2zH3wl9uQwDslJaoKqvoDgDl1NUu0rOSTahcoK3b hDpEI5eWR8rV5IAVMpNgRaT8tHO76F0a5a+V/o6U6gh26nbB3exj8rAMIbAxQTvayBCEwUYMBYSJH V2sJS3pA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35636) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p3PON-0002Jp-7N; Thu, 08 Dec 2022 22:29:23 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1p3POK-00022E-LB; Thu, 08 Dec 2022 22:29:20 +0000 Date: Thu, 8 Dec 2022 22:29:20 +0000 From: "Russell King (Oracle)" To: Robert Jarzmik Cc: Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , Andrew Lunn , linux-arm-kernel@lists.infradead.org, Haojian Zhuang , Daniel Mack , linux-kernel@vger.kernel.org Subject: Re: PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_142930_220286_8DD0166E X-CRM114-Status: GOOD ( 16.98 ) 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 Thu, Dec 08, 2022 at 09:19:12PM +0100, Robert Jarzmik wrote: > > "Russell King (Oracle)" writes: > > From a quick look, I think this commit is to blame: > > > > 542c25b7a209 drivers: gpio: pxa: use devm_platform_ioremap_resource() > > > > Someone "helpfully" making this change: > > > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - if (!res) > > - return -EINVAL; > > - gpio_reg_base = devm_ioremap(&pdev->dev, res->start, > > - resource_size(res)); > > + > > + gpio_reg_base = devm_platform_ioremap_resource(pdev, 0); > > > > which introduces request_mem_region() to the PXA GPIO driver, resulting > > in this resource clash. > You're right. > > Now, as for Jonathan, there are 2 options : > - first one : revert the patch Russell pointed out > - second one : a lot of work, detailed below : > > Given that Arnd is removing legacy platformdata code, that will only leave > the > device-tree one, which works only with the pinctrl driver enabled. > That gives the opportunity to drop the use of GPDR from the gpio-pxa driver, > and now we can map with separate iomem ressources pinctrl-pxa and gpio-pxa. Does the GPIO driver talk to the pinctrl driver to switch GPIOs between input and output mode? If it does, that's fine. If not, that can cause regressions, as GPIOs may need to be switched between input and output mode at runtime (e.g. for I2C gpio-based bitbang). -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel