Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1612447rwb; Thu, 8 Dec 2022 12:58:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6cqBTwGjbD8B+/LQmtTPDfK7EydyQ0AHjeecCkJ1Gb3YXqh9lHRi/E7KnuwOq2k+M2G6eh X-Received: by 2002:a17:906:2988:b0:7c0:b56a:eadf with SMTP id x8-20020a170906298800b007c0b56aeadfmr7149866eje.271.1670533127450; Thu, 08 Dec 2022 12:58:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670533127; cv=none; d=google.com; s=arc-20160816; b=qCtxOVbqDweu878nwXeYl+8W21IxKbN2/vI1yQ+XUlmnzNcBzUaFMK00ldHirQQZir Y4OQOutT/sgjfeidUqrPgpSnfou9me8PZtGfKcyO1xhgQO3qwWpQDejniuGJGLkT10NG jj4OPoiI+JFryqWLgA9Ktxr3227LSNwq2lOQ3f8r9g1WVlIbzhiV6OnrhRz+xD4VOzGg Y4NsNvy+9fKUXhx5KsP09SXx7dNtGWGW5dNm8EOMn76jjsyzsxW7FfgiCHKLt3eY4F8L rZ+EmKoAwV7EccowmgBL7NumWCtCN5D3IsmDcMrJC+OGLuVmAxTjEGZTxeihr5yXzp+Q HjBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=A60271Vb7ABH2azl9B/3FtEe8iIAAcxXSVG5jkSBzGY=; b=KSfST+8erYk6oHfNj6rCRndKFSfKLaRmbu/qD7NhZ7SdEq4XafCx5/n2aYor3C/lqR xc1Z4RcGUyYj0RqG1p2ESGKwrwiFregNZ5c3MHk+F5iOGquFfwcFyEm41Q9vTEUG/dKr CzRww/TfC9XvBkAFssbIqFrPFqfFq3K9ZUL4CJEz9OnTDtsWgfAAuTWkBspoOZNu7aqk ggZFKRsB4ClzzF9yjFGjS+7cFm46Z039YS7BHqNmaSFq3/X9sTEwvNrLrC4biCGsh+3a Pk6M6HiAvnFoSSXFL1KFGFviYXJK2GM74PReHmqWzdYf3LfkQpyvhnqKPth93rmuf+XN Pb1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@free.fr header.s=smtp-20201208 header.b=JVo2uzx7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=free.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a05640227d100b0046b4fc516b7si8133384ede.128.2022.12.08.12.58.29; Thu, 08 Dec 2022 12:58:47 -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=pass header.i=@free.fr header.s=smtp-20201208 header.b=JVo2uzx7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=free.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbiLHUjF (ORCPT + 74 others); Thu, 8 Dec 2022 15:39:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiLHUjD (ORCPT ); Thu, 8 Dec 2022 15:39:03 -0500 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4385582F9A for ; Thu, 8 Dec 2022 12:39:02 -0800 (PST) Received: from sopl295-1.home (unknown [IPv6:2a01:cb19:8d70:d500:6d47:7868:523:4848]) (Authenticated sender: robert.jarzmik@free.fr) by smtp1-g21.free.fr (Postfix) with ESMTPSA id CFD18B00571; Thu, 8 Dec 2022 21:38:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1670531940; bh=YstTq1Myiif2EgThZ1/Ik29o/fO83gS7mbfHozyghFU=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=JVo2uzx7wkukQqGB/tORaLKiG+VvWQYfEUqaYh0iaYlC9MpVCfoTUkf4GAMP6rhFc TcvZt7ZD5EFlVm6fnXv6lgt6d11JQGRAXx2LAB2Vk/d3hj8PJDo0rzpK3Mz61lGeGk ehNIg/yOTycYsl18/3HC/+hxVQ4e5An1aLiDtS985aflFhOmWAttjR3EnAHgwIJ71u WtEfVNBiPqhO5Hz3gU05LK9oL13FOKJmDtVru/edrI8GjM24J8Dcr+zWIR1LdAuLGH jJFgRMNNoQwalTtZ2MHSqUZFH7wFTCihbvmcfkB8jBIS/nBJ+7WYnuNko9/WH8pWPu VT44TsUBnhitw== References: User-agent: mu4e 1.8.11; emacs 28.1 From: Robert Jarzmik To: "Russell King (Oracle)" , Jonathan =?utf-8?Q?Ne?= =?utf-8?Q?usch=C3=A4fer?= Cc: Robert Jarzmik , 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 Date: Thu, 08 Dec 2022 21:19:12 +0100 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS 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 "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. Therefore, if Jonathan has the will to make a patch, I would : - keep the patch identfied by Russell (ie. don't revert it) - amend the device-tree descriptions for pxa - pxa2xx.dtsi ... gpio: gpio@40e00000 { ... reg = <0x40e00000 0xc>, <0x40e00018 0x3c>, <0x40e00100 4>, <0x40e00118 0x34>; - amend the gpio_pxa.c driver, to map the 4 regions (and not only one as before) - the pinctrl-pxa25.c and its device-tree are already mapping the holes in the previous list - check that I didn't mess up the 4 iomem regions, they should overlap with "pinctrl: pinctrl@40e00000". Well it's up to Jonathan to see which version he prefers to choose, the simple one or the tedious one. Cheers. -- Robert