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 17D5AC04A68 for ; Thu, 28 Jul 2022 15:33:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9436C83FA6; Thu, 28 Jul 2022 17:33:31 +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="j1IP22Nd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 154C584125; Thu, 28 Jul 2022 17:33:30 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 A8BC683FA0 for ; Thu, 28 Jul 2022 17:33:26 +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 6D8AE61B8C; Thu, 28 Jul 2022 15:33:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A349C433C1; Thu, 28 Jul 2022 15:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659022404; bh=AL8JoXpcDLbHIY9UjIDuNgkMLBsss6uXoFXH6r3qMAI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j1IP22NdDkvTymRin2JkU4gCbkzRhvto4S15nh55hcBXhhiBttW+i6xbUO4FOwG4N fANFw5U5YXo17nfnKCwrumjFDhQISH851s0bSDNOwX5WKA3z8XrNsbOLFQIXsqcBg8 JhMdy20JUadIQQ1Dt1njnPwOJgbLXWD8H9G+UU3nHp6379JQLwYJS7zhSkvfUJy3VD eRrFSKev/arQ89PdfCO288NcaFvehqZuGb4PGjJ0dUp5+BaHuBumIjkxbP8W5kYpND Vn44pybnzF7EQ7+trelWs1P6ECl6JPRrA2q3DuSbhQ8NoUdii/IoR7LMZ9v0Dq0EYa JCeitaHCviDRw== Received: by pali.im (Postfix) id CE2EB88E; Thu, 28 Jul 2022 17:33:21 +0200 (CEST) Date: Thu, 28 Jul 2022 17:33:21 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Stefan Roese Cc: Marek Behun , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH 4/8] pinctrl: Add third argument label for pinctrl_gpio_request() function Message-ID: <20220728153321.5flq7thv2wginmfl@pali> References: <20220725115615.420-1-pali@kernel.org> <20220725115615.420-5-pali@kernel.org> <436a8ee9-65d8-a5a6-d6ae-7ee01d018dfd@denx.de> <20220728131525.f4zglejyfzetn7ob@pali> <3608318c-050a-d1c7-f66a-c9c593f4fc2e@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3608318c-050a-d1c7-f66a-c9c593f4fc2e@denx.de> User-Agent: NeoMutt/20180716 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 On Thursday 28 July 2022 15:18:46 Stefan Roese wrote: > On 28.07.22 15:15, Pali Rohár wrote: > > On Thursday 28 July 2022 15:07:51 Stefan Roese wrote: > > > Hi Pali. > > > > > > On 25.07.22 13:56, Pali Rohár wrote: > > > > 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 > > > > > > Running a CI build on Azure, I see these errors at least for this > > > target: > > > > > > rzg2_beacon > > > > > > drivers/gpio/gpio-rcar.c: In function 'rcar_gpio_request': > > > drivers/gpio/gpio-rcar.c:136:16: error: too few arguments to function > > > 'pinctrl_gpio_request' > > > 136 | return pinctrl_gpio_request(dev, offset); > > > | ^~~~~~~~~~~~~~~~~~~~ > > > In file included from drivers/gpio/gpio-rcar.c:12: > > > include/dm/pinctrl.h:618:5: note: declared here > > > 618 | int pinctrl_gpio_request(struct udevice *dev, unsigned offset, const > > > char *label); > > > | ^~~~~~~~~~~~~~~~~~~~ > > > drivers/gpio/gpio-rcar.c:137:1: warning: control reaches end of non-void > > > function [-Wreturn-type] > > > 137 | } > > > | ^ > > > > Ou... I think that this fixup should fix this error: > > > > diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c > > index 76f47027a3ea..138801850d3e 100644 > > --- a/drivers/gpio/gpio-rcar.c > > +++ b/drivers/gpio/gpio-rcar.c > > @@ -133,7 +133,7 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) > > static int rcar_gpio_request(struct udevice *dev, unsigned offset, > > const char *label) > > { > > - return pinctrl_gpio_request(dev, offset); > > + return pinctrl_gpio_request(dev, offset, label); > > } > > static int rcar_gpio_free(struct udevice *dev, unsigned offset) > > > > > Please run this (and if possible all more complex) patchset via some > > > world build / CI. > > > > I opened pull request on github, it should run CI tests: > > https://github.com/u-boot/u-boot/pull/202 > > > > I included there also above fixup. > > Thanks. Let's see, if this now runs fine. Tests passed! > Thanks, > Stefan > > > > Thanks, > > > Stefan > > > > > > > --- > > > > 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 > > > > > > Viele Grüße, > > > Stefan Roese > > > > > > -- > > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > > > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > > > Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de > > Viele Grüße, > Stefan Roese > > -- > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de