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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A684C43334 for ; Mon, 25 Jul 2022 11:56:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E665B841AB; Mon, 25 Jul 2022 13:56:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="lyTW7pf0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 96369841A9; Mon, 25 Jul 2022 13:56:32 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FB6D841B4 for ; Mon, 25 Jul 2022 13:56:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E0207B80E78; Mon, 25 Jul 2022 11:56:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D9B9C341D6; Mon, 25 Jul 2022 11:56:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658750186; bh=j1ZY4mFxIh0yUFzx+rIrpIqWoTPYn47AZCK10q8FhEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lyTW7pf0Pv6sYcBC/5/zhvxg8JbkHpodttYLdfj8I66oie9BpHCpm/9PFx/IM1Iq4 3Gb5safkX6h2GvpASmjferaZCt0p4I024nYpPN9yeSqENEq+Q4DaKs6rdbkDyAIoWJ YnU2BVQWwiLgPPBOTyPBNlQ/n8VwCD2KQ28J4ueAYC5LZVX9Xw4ZoIsyMTn+NmGJP5 2QjPeyEbww/vuSCv/K1qehLZG6zD5b8RnAHOEBXak77ffgZnjgGtsGhR1e48f1bLSI R264grv2eC98Sb1Ux6LVvL49ajiwQJI4XDvXtYUaWwT8AEe/op55tb/hMTEXaZ9JBM /JjVINRRZuBdQ== Received: by pali.im (Postfix) id 124BD27A3; Mon, 25 Jul 2022 13:56:25 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: Marek Behun , Simon Glass , u-boot@lists.denx.de Subject: [PATCH 5/8] gpio: mvebu_gpio: Add .request and .rfree methods for Armada 38x Date: Mon, 25 Jul 2022 13:56:12 +0200 Message-Id: <20220725115615.420-6-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220725115615.420-1-pali@kernel.org> References: <20220725115615.420-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean To use particular pin GPIO, it needs to be first switched to GPIO by pinctrl. Use pinctrl_gpio_request() and pinctrl_gpio_free() for this purpose. Signed-off-by: Pali Rohár --- drivers/gpio/mvebu_gpio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c index 4c1c68ee19ed..888ccfe4d13e 100644 --- a/drivers/gpio/mvebu_gpio.c +++ b/drivers/gpio/mvebu_gpio.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -99,6 +100,10 @@ static int mvebu_gpio_probe(struct udevice *dev) } static const struct dm_gpio_ops mvebu_gpio_ops = { +#if CONFIG_IS_ENABLED(PINCTRL_ARMADA_38X) + .request = pinctrl_gpio_request, + .rfree = pinctrl_gpio_free, +#endif .direction_input = mvebu_gpio_direction_input, .direction_output = mvebu_gpio_direction_output, .get_function = mvebu_gpio_get_function, -- 2.20.1