Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2483974rdb; Wed, 4 Oct 2023 02:37:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEY2i/Mde55GHBTHvhCNBDvqgiuZB0wTh3S7CDDerc6GAXEZurdj8mTABisFVl0ueHtC4d5 X-Received: by 2002:a05:6a20:8402:b0:161:22c0:541 with SMTP id c2-20020a056a20840200b0016122c00541mr2215640pzd.25.1696412242665; Wed, 04 Oct 2023 02:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696412242; cv=none; d=google.com; s=arc-20160816; b=vLBKASyUKGVoICzUmED45RcRDqWuUdrui7bxfGNOTiU2148+FzZEPBVGYm/eu8sPQf nut4a+AmZNRVAIYNcGbf317arALBZW7k5tUoW3A2TE3AtvqqGOlXHvvDbudQ/ajsbX7G QDjjnZwVcZXVzzrQnlMs/F5znMdDjHRmJFqHDGh+IzAFt/6ihp6fbx2v6imoR1yObLj9 xg4EhH7sSeqOtZcRjM6bCxJzSHEWRWgS9zhm0/sBLt//CNwjocXVmuNdEOZUezQDinEI GqcSO3wkEMDCQ53rA4qHO5W7i4dFZCQJfzxIYWRFNhIw9YZ8dXeRRvkUHHjbD8IRch1h qVWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:mime-version :references:in-reply-to:from:dkim-signature; bh=UlzyPWI8qWZBcNbmieOr3BVk1gktgoZ26fzf7WupCLs=; fh=UbcL3yoA870oCZFJvFtDWtUFuASUf6inYd0G0UEVXbs=; b=wENSv4e6vUJOtFuKiC/LtQUibc5FBJodstDyGTzs7MuycIsu/OtLgKGdcL1bmp4TlX vmC4TSBh2rQV6E5hiqSu93Wy4DSTRDnu3W3HTfW0q7hh6UTJu/thI9/DIrZmKvSjmAUw w0SgM4PMwr/Zj6DVVyCQix7rK3LeMS+8kW/9f6YzBIiaI9e8p22gITqxIHFvMZImDlLb 9LJcte/0yjIYFrkBHhbx03q0KllepGSimuU4nnTphg7dIlcatAs+L7zvg1d2AVf8OcLG rGES4anZlP8yAyYFY6FC+8ElDV3RPtmBD2L02DZunQTZXJZJSeXe93uPGullg5j/Vt+h toRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Hb8GJ5ba; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x7-20020a170902a38700b001b9be39eaa8si3195533pla.348.2023.10.04.02.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 02:37:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Hb8GJ5ba; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 943BD8206D60; Wed, 4 Oct 2023 02:37:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242059AbjJDJhT (ORCPT + 99 others); Wed, 4 Oct 2023 05:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjJDJhP (ORCPT ); Wed, 4 Oct 2023 05:37:15 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02911B4 for ; Wed, 4 Oct 2023 02:37:10 -0700 (PDT) Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id EA8593F197 for ; Wed, 4 Oct 2023 09:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1696412227; bh=UlzyPWI8qWZBcNbmieOr3BVk1gktgoZ26fzf7WupCLs=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=Hb8GJ5bapUJ+1oSrsDDiP/doJGXC2OH/n+FE4X/s9jGGYeiS9YYeUGHI7BJhmNp8I YhPDRENkvO6j5XXuHy7obeRMNlKevJ0uG5/wGPeLcQu+C1/K/Oqo2cHFcugvihAXhl CUgCprKFCMwswH6Bm4kcNE1ITOp/rOcCfUZZWlMEivvbCcIvEb+zwH8mnudWujEGWq nSgR+x0bBxXH0UXO/uSy57xEY6kxM/NytTdINtYVNidfg9TsWX1DgmhwzRwEs5+TUL wxt1bR7d1+iR3eRyW37fPI81+OO3KdD7HuGvPyY1uvMpzyLC6F1vaGGAMX+6j5RFCr mrxXKippYLcrQ== Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6557c921df1so19025746d6.2 for ; Wed, 04 Oct 2023 02:37:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696412227; x=1697017027; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UlzyPWI8qWZBcNbmieOr3BVk1gktgoZ26fzf7WupCLs=; b=QQXzRPs39AgZ6tmM8p2HyZ36J3pkIlhQQmm8+gxwfAjvcrhMXULmWu7AtAodpQamb4 +TdbsOJ3R5bKCeMAxaNdVDM7PCK5ye++mIb21ydA3IqNZViOBJRTwavKvKTemp5dk6vn g7OS0cjJwd8b4g4jxxlZZtk3kBCJ0uGnPybNYcECZfGTeYzyu2a2laBGN3Gs4nx2pfaI Nw9d+9ZICOx2BYHpZPLzoCcx8oIT0iB2ksFShYHM864mp5cJ5o5YDXC+HpnvavqmaUYJ N6ii/zL87O2pD2d/POzZ93PNbn6UuuVTHs83alCxJGp7VZ66tuAJ61NusXW9vyA1lwXU pqKQ== X-Gm-Message-State: AOJu0YxuO0kMF+MOBqIMfGEt5VF1UUlXWBr43PAl40ExG2kdeQHOy/Cb Iet9wpNXebuP/eSf+OqeI1DJ+g+SQCd8szu79Mq/VV0Ixu05/fXcHWeHw9uv5AAGSalNwLKdzgG /mYYra6LDr+tDSI9sw7stkJdKIbG0IUoUCP5hvOfFRW9v+8Tk14t2omftKQ== X-Received: by 2002:a05:622a:105:b0:418:14ee:ac55 with SMTP id u5-20020a05622a010500b0041814eeac55mr1536955qtw.25.1696412226874; Wed, 04 Oct 2023 02:37:06 -0700 (PDT) X-Received: by 2002:a05:622a:105:b0:418:14ee:ac55 with SMTP id u5-20020a05622a010500b0041814eeac55mr1536947qtw.25.1696412226601; Wed, 04 Oct 2023 02:37:06 -0700 (PDT) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Wed, 4 Oct 2023 02:37:06 -0700 From: Emil Renner Berthing In-Reply-To: <20231003145114.21637-19-brgl@bgdev.pl> References: <20231003145114.21637-1-brgl@bgdev.pl> <20231003145114.21637-19-brgl@bgdev.pl> Mime-Version: 1.0 Date: Wed, 4 Oct 2023 02:37:06 -0700 Message-ID: Subject: Re: [PATCH 18/36] pinctrl: starfive: use new pinctrl GPIO helpers To: Bartosz Golaszewski , Linus Walleij , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Emil Renner Berthing , Jianlong Huang , Hal Feng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 02:37:21 -0700 (PDT) Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Replace the pinctrl helpers taking the global GPIO number as argument > with the improved variants that instead take a pointer to the GPIO chip > and the controller-relative offset. > > Signed-off-by: Bartosz Golaszewski > --- > drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++-- > drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c > index 530fe340a9a1..22a2db8fa315 100644 > --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c > +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c > @@ -918,12 +918,12 @@ static struct pinctrl_desc starfive_desc = { > > static int starfive_gpio_request(struct gpio_chip *gc, unsigned int gpio) > { > - return pinctrl_gpio_request(gc->base + gpio); > + return pinctrl_gpio_request_new(gc, gpio); > } > > static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) > { > - pinctrl_gpio_free(gc->base + gpio); > + pinctrl_gpio_free_new(gc, gpio); Hi Bartosz, Thank you for the patch. These new pinctrl_gpio_*_new() functions now seem to have the same signature as the starfive_gpio_*() functions. Is there a reason they can't be used as callbacks directly so we could just delete the starfive_gpio_*() wrapppers? Also it'd be great to be to be CC'd on at least the first generic patches where the new functions are introduced to have some context without having to look it up on lore. /Emil > } > > static int starfive_gpio_get_direction(struct gpio_chip *gc, unsigned int gpio) > diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c > index 640f827a9b2c..5557ef3fbeb2 100644 > --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c > +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c > @@ -547,12 +547,12 @@ static const struct pinconf_ops jh7110_pinconf_ops = { > > static int jh7110_gpio_request(struct gpio_chip *gc, unsigned int gpio) > { > - return pinctrl_gpio_request(gc->base + gpio); > + return pinctrl_gpio_request_new(gc, gpio); > } > > static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) > { > - pinctrl_gpio_free(gc->base + gpio); > + pinctrl_gpio_free_new(gc, gpio); > } > > static int jh7110_gpio_get_direction(struct gpio_chip *gc, > -- > 2.39.2