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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AD77C2D0CB for ; Fri, 9 Dec 2022 08:58:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbiLII6S (ORCPT ); Fri, 9 Dec 2022 03:58:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiLII6L (ORCPT ); Fri, 9 Dec 2022 03:58:11 -0500 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D382C4876E for ; Fri, 9 Dec 2022 00:58:09 -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 7925FB0055A; Fri, 9 Dec 2022 09:57:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1670576288; bh=oRefIkAOXaxlM+bT0sR8pPl0+u4qpNREsz38vn7WHa8=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=RPv/uX2dNIKGvFFvNU6I1/8oSaOePqh3z0IbJxv/rb73w+y5q4/X/6i0SXkPqYeG0 2ziZ7pyEbWDaiKuo6DKB9Or04quHsdFyni60J4W4+uLN0MnderyhXgLJWDfYqm9/97 mUwicQIzh5IuA+wA/MryWxAOrPciElB72FY7s62Ig7NqfYnePSkJ4Sl1BHe33MT86g HMprOaXwkvQ3rOHgDT5DbOKsu1pNTB2qv91DfRgBJmT65D5Xow/aK6TPGZEmhBko4U RgmG1oa7oYZq46o1UmQ4ZpLX82yk1FdR34u6f8WY2K2xfqbKxaRMi1ncWR0gcevpYc g0+bTV+wJsJiw== References: User-agent: mu4e 1.8.11; emacs 28.1 From: Robert Jarzmik To: "Russell King (Oracle)" Cc: Robert Jarzmik , Jonathan =?utf-8?Q?Neusch?= =?utf-8?Q?=C3=A4fer?= , 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: Fri, 09 Dec 2022 09:55:41 +0100 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Russell King (Oracle)" writes: > 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). It does. Basically it tries pinctrl first, and falls back to direct registers access. Here is a small extract of the gpio direction manipulation in gpio-pxa.c : if (pxa_gpio_has_pinctrl()) { ret = pinctrl_gpio_direction_output(chip->base + offset); if (ret) return ret; } spin_lock_irqsave(&gpio_lock, flags); tmp = readl_relaxed(base + GPDR_OFFSET); ... blablabal we set the bit, and write back the register. Cheers. -- Robert