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 EEA4EC43334 for ; Mon, 25 Jul 2022 11:57:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9114C841E0; Mon, 25 Jul 2022 13:56:47 +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="Nm0dDbfy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BE7F3841B0; Mon, 25 Jul 2022 13:56:39 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::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 6DDE0841B1 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 dfw.source.kernel.org (Postfix) with ESMTPS id 2C8E36101F; Mon, 25 Jul 2022 11:56:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42914C341D8; Mon, 25 Jul 2022 11:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658750187; bh=gnNIrx/1XC8Q8wjNT9LL/ktfBlACfHKu9O9xhnucJpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nm0dDbfygsTCYsU3ctQXD2ptpVuZEFFPk0fur46P3Ez7FObQNR4q/wRoJv4RdU7kC LF18UTffYwKqawIF7h+ujLTHS1eyVx50Q6PEnY3zOwNXnr1jwmEPYYIr2hrMgJvGG2 D4+qAD3Spi/q+jwViVoDrm6pcW6DQbWdW3ke67t1QhLjY5B/S/tMTvb5sfcTBuFx8q JKR6d7QrI9Lh3v0a4CZu2AGifWrj06matxlCeBeE/CYwkC4zyt+7vG28c3Q4inLd80 fWSBGO5KoQFyQG81fqOuw1U1Sl5HamJ+n+Qx1RrqBOqwnfoMyF2fYRhtiQcxK0oM1Z hSPRcl3czbmRA== Received: by pali.im (Postfix) id 9C5371FAB; Mon, 25 Jul 2022 13:56:24 +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 4/8] pinctrl: Add third argument label for pinctrl_gpio_request() function Date: Mon, 25 Jul 2022 13:56:11 +0200 Message-Id: <20220725115615.420-5-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 This change allows to use pinctrl_gpio_request() function as a direct pointer for dm_gpio_ops's .request callback. Signed-off-by: Pali Rohár --- drivers/pinctrl/pinctrl-uclass.c | 3 ++- include/dm/pinctrl.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 38ce2b5e0ad9..ce2d5ddf6d92 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -222,9 +222,10 @@ pinctrl_gpio_get_pinctrl_and_offset(struct udevice *dev, unsigned offset, * * @dev: GPIO peripheral device * @offset: the GPIO pin offset from the GPIO controller + * @label: the GPIO pin label * @return: 0 on success, or negative error code on failure */ -int pinctrl_gpio_request(struct udevice *dev, unsigned offset) +int pinctrl_gpio_request(struct udevice *dev, unsigned offset, const char *label) { const struct pinctrl_ops *ops; struct udevice *pctldev; diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index 5436dc4a9a71..e3e50afeaff0 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -611,10 +611,11 @@ int pinctrl_get_pin_name(struct udevice *dev, int selector, char *buf, * pinctrl_gpio_request() - Request a single pin to be used as GPIO * @dev: GPIO peripheral device * @offset: GPIO pin offset from the GPIO controller + * @label: GPIO label * * Return: 0 on success, or negative error code on failure */ -int pinctrl_gpio_request(struct udevice *dev, unsigned offset); +int pinctrl_gpio_request(struct udevice *dev, unsigned offset, const char *label); /** * pinctrl_gpio_free() - Free a single pin used as GPIO -- 2.20.1