Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1748124rwb; Thu, 8 Dec 2022 14:58:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf4vPTQFZZAN1aaNHkjiAU0EMLL3PqV2vRw6LXHXZgTznNBIG/4jq+ybGQ/zn3bGmzkwSqd4 X-Received: by 2002:a17:90a:4942:b0:219:d999:770d with SMTP id c60-20020a17090a494200b00219d999770dmr4102437pjh.43.1670540300728; Thu, 08 Dec 2022 14:58:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670540300; cv=none; d=google.com; s=arc-20160816; b=CMOe0D/pm/ybNauI9PdfnglknDI7yiXdhoAixzTLg7qhCOmbJWP8ICNbj7hV+AP2c5 zET0McHG3hkUlZgB12iCJjrVULJTX7s7ClOGOfSGGf/0QtaFwYm5PUCnF7Z6pjqSJ/Bf 7K6meY0c4vxpY2Y9WVp8/GMcC3U8Xw4peRh2Cf41BoarjJ5JvFoWx/EX7+pJsu3KPydO BGXC6Ywgx8Qew/kAQ/cdoctzZjBtD95kmpjNFjueXJwJWyJ1vWPSWBLQSf2q0xP2qJQr CdCaFF9l+TiDoUOWIByViT6Yx3GZM/kwCUwtyIdlpWPlzPOoR30EG/g6E5Sxzskxev6V 9wuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9/E3aQ6joQfFe6Nebd8CYybcGRYfIRW8KVJYv3/3Gyc=; b=KA30MsKyUIfv1V+m1uHd79bC2Me/nJ0t899AYpmbp975dssmMh69OFjP0UWOhKNbJo f2FlKIYpB8mJ7G7fnRWfRp8bVr2xddAtrtO+Ajom4S/ked7jp7zWjkXuAmOsihV1m+Ye MIP4HY+InLWREtBysF8pDlPDcUDUjpbaTTTnK7it5xptOMMjPidVauLBdjGmqvd9IAIH JI91ddVlWmJOrpImzarwg4h1aCUEXdKB505utk0o4KrpwZnIcteE+icCkGc3FVd1veSn /zzGNQzYOI19XCaJK+wSNslJLg7Ep6djno3m7rdYJjPwsKpOAHoJUVKaMC8X//f0y7Hn qx1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=rEApFDX1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a636b06000000b004790794f259si4215879pgc.739.2022.12.08.14.58.09; Thu, 08 Dec 2022 14:58:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=rEApFDX1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229942AbiLHW3b (ORCPT + 73 others); Thu, 8 Dec 2022 17:29:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiLHW33 (ORCPT ); Thu, 8 Dec 2022 17:29:29 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2A911C43B for ; Thu, 8 Dec 2022 14:29:28 -0800 (PST) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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!