Message ID | 20231003145114.21637-26-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2139832vqb; Tue, 3 Oct 2023 07:53:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNxW+cugdz0J+NEZtyo8q4M0UznhJ+KHQQ/iM3NbHhKYtJa75baY3Q06hX3f6VABtmkTG7 X-Received: by 2002:a17:90a:d916:b0:274:638d:da9a with SMTP id c22-20020a17090ad91600b00274638dda9amr14411115pjv.34.1696344799528; Tue, 03 Oct 2023 07:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696344799; cv=none; d=google.com; s=arc-20160816; b=g2M3NiGmQuzSzp7IwY3r/XLyWqBt1sfvy3wjlcluH+gCf/+s/1eFO3x/fyZFns9Zvm rCfyDTGLkq2WX9GAeZM4Idw2ZE16CkEds8WK23ASpITUGKSQvBdViR0YLd/dPE9/nKyl LdBOdKqm2ui7QtP7SCZFxmpvw9PfmX0iWsSeE/LAkibWsO6iX4SjnJtx4QEhtfiPxbeL n4XblsVJaNg04fEPlHZ/+85ZruVRv0wGYmvWLyT1pU6+jJa+Clb4xCGLmsbKT7ty+Eqa d5coB8RQM8Ukd6QKokiHvC0v7Bhc8QnELF7UuOhU1/WXt5YGK1X3UhVZBVrmRLmzmQM2 VZsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dCaaX+GBykmnpaZwjrwxwJTXEqzANHLF7xpPc5hlhz4=; fh=SoX2HbZWU7cBWy8Z33k1YB0/6NCSM/orOqFy4ZwxHWU=; b=YlMx545nGVG+I1ziLAmUR1Lsb3uids30EJUDhss0TlHU6MX/TZkc5P82OlOcKZwlgc FpkrBU/1HJ6kd+wlSgaWPrSui9/4CkTdWLsp3k63vniccDEbbF6VFMNPlzi5/klLymR6 SySd+CUtCVErfVnCT5XDGcZGrBi2nUFdbkfFltCMmLQOnw4gEmmNrUoonGWDWheyJvxQ wmYIsZecKWBP7Zc0Amz5V6fj7RH+Z9fVR5K7mjVheWJIeefUTL8yegELJrECJkv0KwgE Ei705RZA/rUuBFeocT+SeIgZeI2NgyytI292JFErdr+clIz7KuQxramkLqIHueYqU1ok TL5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b="wxd/Ecn0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y24-20020a17090aa41800b0027652885184si9717016pjp.91.2023.10.03.07.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:53:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b="wxd/Ecn0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C7CAD815CDA0; Tue, 3 Oct 2023 07:53:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240317AbjJCOwg (ORCPT <rfc822;chrisfriedt@gmail.com> + 17 others); Tue, 3 Oct 2023 10:52:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240335AbjJCOwI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 10:52:08 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4E69CD0 for <linux-kernel@vger.kernel.org>; Tue, 3 Oct 2023 07:51:45 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40572aeb673so10692465e9.0 for <linux-kernel@vger.kernel.org>; Tue, 03 Oct 2023 07:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696344703; x=1696949503; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dCaaX+GBykmnpaZwjrwxwJTXEqzANHLF7xpPc5hlhz4=; b=wxd/Ecn0vq1plLPGtGUk9IDCYFoJKOcuyIX4NDc5eewKHGGx6X80QxwMBDFg49QMe3 NKkDUmBjMoO1hRUwxirY7v3jUxnhXNReAVeI41m/sWC6kOPFInxMHU52aoBZAZO/qqGk EmQEb8R6z8s4erloy8GGwh166U0zzMvZSB92x5p+EfkHu5j7/AJLyJsOQRFawROHDlHc bPGPuBjnBKy76FXE0NksckAdahVCSZsAmEUhbJu5yKm6qcBvII+3O1ZLwdmJluc2Hscm nQ1jnWkvnGMsTd1aX6hNVKjbj3NNIY63XqL22QPdeuHXT+IPZuaF9aIAulkY9kEETJn4 jgXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696344703; x=1696949503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dCaaX+GBykmnpaZwjrwxwJTXEqzANHLF7xpPc5hlhz4=; b=KgLVbzYR4D6n5hGNHneTTg4jHmJY6qTPpPvDGWxuuimtBwApgOJX49NoQu2qXENcma T2SxWd4ELPioLUNF6G/dTmFlQ9TXIdI2BPIaNaP+p+8Y9MSHhj+VDPRAPZ8yxo59roDW CrEsqfgwnk3IoDTpvoifeKZ5QbZeupT7f5HocOIN/BF/fjvkTbCB6Z4x3Ncsaps2Ngj5 8cKNugRiCdEVaKsefZzw6lxqt+EqW529DirJGljYH56qp339mVw7g3cmDql8w0iX2A1D K/v6kTN7dpI5AeAjjbr7XHRyxwroMJDylcBVMxLfrRhHzMKRC+kLF73HRqUj7mzenUfP Ythg== X-Gm-Message-State: AOJu0YxJ+ToLhBjl06hLtrEWGqkvpqL0UPshLVogpe5+hVaXR9OaMdQB 81k+ruJljRZfe2eT3nKPQuquUA== X-Received: by 2002:a05:600c:c9:b0:406:3fda:962c with SMTP id u9-20020a05600c00c900b004063fda962cmr12271371wmm.31.1696344703371; Tue, 03 Oct 2023 07:51:43 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:1f2d:3479:a5de:fa35]) by smtp.gmail.com with ESMTPSA id c15-20020a05600c0acf00b003fe29f6b61bsm1462773wmr.46.2023.10.03.07.51.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:51:42 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Linus Walleij <linus.walleij@linaro.org>, Andy Shevchenko <andy@kernel.org> Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Patrick Rudolph <patrick.rudolph@9elements.com> Subject: [PATCH 25/36] pinctrl: cy8c95x0: use new pinctrl GPIO helpers Date: Tue, 3 Oct 2023 16:51:03 +0200 Message-Id: <20231003145114.21637-26-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003145114.21637-1-brgl@bgdev.pl> References: <20231003145114.21637-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:53:09 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778746444275446250 X-GMAIL-MSGID: 1778746444275446250 |
Series |
pinctrl: don't use GPIOLIB global numberspace in helpers
|
|
Commit Message
Bartosz Golaszewski
Oct. 3, 2023, 2:51 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> 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 <bartosz.golaszewski@linaro.org> --- drivers/pinctrl/pinctrl-cy8c95x0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Tue, Oct 3, 2023 at 5:51 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > 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. With whatever name of the APIs at the end, Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > drivers/pinctrl/pinctrl-cy8c95x0.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c > index fae80b52a6fc..8c6006353515 100644 > --- a/drivers/pinctrl/pinctrl-cy8c95x0.c > +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c > @@ -554,7 +554,7 @@ static int cy8c95x0_read_regs_mask(struct cy8c95x0_pinctrl *chip, int reg, > > static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off) > { > - return pinctrl_gpio_direction_input(gc->base + off); > + return pinctrl_gpio_direction_input_new(gc, off); > } > > static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, > @@ -571,7 +571,7 @@ static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, > if (ret) > return ret; > > - return pinctrl_gpio_direction_output(gc->base + off); > + return pinctrl_gpio_direction_output_new(gc, off); > } > > static int cy8c95x0_gpio_get_value(struct gpio_chip *gc, unsigned int off) > -- > 2.39.2 >
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c index fae80b52a6fc..8c6006353515 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -554,7 +554,7 @@ static int cy8c95x0_read_regs_mask(struct cy8c95x0_pinctrl *chip, int reg, static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off) { - return pinctrl_gpio_direction_input(gc->base + off); + return pinctrl_gpio_direction_input_new(gc, off); } static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, @@ -571,7 +571,7 @@ static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, if (ret) return ret; - return pinctrl_gpio_direction_output(gc->base + off); + return pinctrl_gpio_direction_output_new(gc, off); } static int cy8c95x0_gpio_get_value(struct gpio_chip *gc, unsigned int off)