Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3107128rdg; Tue, 17 Oct 2023 05:05:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpIVNKASaHAqsQhvA2e52vSIIQ2FdE5S+x2YQKwD/D2qAzkh8dgARkV8WowNSgH3VtnrBx X-Received: by 2002:a05:6a00:15d3:b0:6bd:b7c5:f777 with SMTP id o19-20020a056a0015d300b006bdb7c5f777mr1970235pfu.16.1697544326361; Tue, 17 Oct 2023 05:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697544326; cv=none; d=google.com; s=arc-20160816; b=lJxfrFbJFOZjAVzndgkxX3SUrrfhKs2pQ7bypvKNq9kgw8cB/rUHIUh38DDrU7g+wk F4sgMY/24m6e3+wIoAa8c2mte2su6hlTG9L2FBU+33bMsCEFt4J4d1yucPM+xCerPJwU C/XpIN5mgwbsNIA96/lMreT7M8sFrC0d94OnM8m2vRcOzHntA8372T9I8KU+roe7hnso 0w2OL/ufo2tbaIUHfrs50xmGfEtNCG8TYNS5C3C1SB6kda+54I7HWOOJlUJmoMd7bjQa QGlU71xr8I+M5qlKB6ZDJW6ihpBimzGv6P/RHaC29EkbSJmh3vTcZNqzcZVZXhYXfnD0 YlUA== 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=PJlcPxZYJ+2xOtgJ5lT3aANbc/q/A7LyEHQjQgc784Q=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=SMGv4l3Ad+A33QqHdTOFKGT23sKIBBJHiSzHIpJ/O0PR60LgVhaOlMRoaAyXP/BzPH ftl+MeCLyTxlhS+hXgr5rckHO+cCQ3UbUIIrGLiw1w3PpQ+xLwZzDeZhyR9vKvF7HqzR UmjLnvP8f3ZwNFC9NNP02sRSqRU79QDohm0ZkgS+nlbFtGjkR/N4+E04rGy62fTOktF0 hqb7KOVzel2dqsRIoRMTHxnQBUf6wDLfwb/dm+s/YxcZoouVucgHUYmgf93ZujtjpBng AVHxTsn2xc9X5miuy9GzbyGn2C3TQiUKDgKEDwhRS3/n/7UVCIpRWU0pq+9xLho6nHvm Mb2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=fJfvs3Cn; 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 Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e16-20020aa79810000000b006be1f19e5f5si1420637pfl.196.2023.10.17.05.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:05:26 -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=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=fJfvs3Cn; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DF61F801CBD1; Tue, 17 Oct 2023 05:05:13 -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 S234917AbjJQMFH (ORCPT + 99 others); Tue, 17 Oct 2023 08:05:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234760AbjJQME6 (ORCPT ); Tue, 17 Oct 2023 08:04:58 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383EFFF for ; Tue, 17 Oct 2023 05:04:56 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c5087d19a6so52210981fa.0 for ; Tue, 17 Oct 2023 05:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697544294; x=1698149094; 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=PJlcPxZYJ+2xOtgJ5lT3aANbc/q/A7LyEHQjQgc784Q=; b=fJfvs3CnP2qp5WbXgHrOpeYrdgkw15gut4Sa2lJmawhADnds+CBtLRhddGne0nJKze luRwQ+KLcciyw2wjmPtqTWd2nbXdSxV+TAAuVNGQHl++PwaIJF7xHZGnF4LO7m3ln/Ph LlFj0vjjciZiO4owfbToqgT+IHYdYeGNYKce/t/y2RoPrEdyttG9OSp3+f97gsYTO3uk WdDp8LZeMLCC3KW+m47/HvJBCKLO+c9IDvcpsQx/XJ2gK/e1ELmWwxYyGLzWGObnFyOF MxnZGXC1qsj/EROSJBkOmUzjJ1ASy7w0Alo81k57ZFmmeIS8+x4nOi4j0kPFjIR1WOGs 0UZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697544294; x=1698149094; 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=PJlcPxZYJ+2xOtgJ5lT3aANbc/q/A7LyEHQjQgc784Q=; b=pXJWjD7wWeBSCKeizlKMUZHM8fQDr/JJq+VTVeVZOP6CTnC0Admv95eGvR+g/mMJhy sJXlo2DOkJSw9as0SoWClNYmM9GKgpqCj+4HXuOhFEII5M4uExY7c01T6RR0ZEemt8Fx 8wM2lQmPgMG5KuRiwd1/M+kTlKftf85Tfl6yKFZSEdYr8HAyECA9ZcgMVr8XaYKc3iac bSPwZerGh7pixO6WcpUUuSKYEw4mq3/6I6W9V7cbiSqmfYq37dfJwXpMhqQnalkFCSUv rYUHqa2VVToCAIuHlvBZ4E/U5vkopHQGd4/7d+s/xbKQaiLalWSM297LV4qMD9Ak9caH Q0ww== X-Gm-Message-State: AOJu0YxYxiHp2oJC/4LUAlRx8m+mVPRS7VR1smO+lFK9DeIV+m/AqviC Rn9u/HioAyDlAfA928HWg7Aiig== X-Received: by 2002:a2e:9604:0:b0:2c5:1603:9c48 with SMTP id v4-20020a2e9604000000b002c516039c48mr1638646ljh.20.1697544294507; Tue, 17 Oct 2023 05:04:54 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:f1ee:b000:ce90:ed14]) by smtp.gmail.com with ESMTPSA id a2-20020a05600c224200b00405442edc69sm1353859wmm.14.2023.10.17.05.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:04:54 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 06/73] gpio: tegra: use new pinctrl GPIO helpers Date: Tue, 17 Oct 2023 14:03:24 +0200 Message-Id: <20231017120431.68847-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017120431.68847-1-brgl@bgdev.pl> References: <20231017120431.68847-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham 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]); Tue, 17 Oct 2023 05:05:14 -0700 (PDT) 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/gpio/gpio-tegra.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index ea715582bcf3..08951ddcd294 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -139,14 +139,14 @@ static void tegra_gpio_disable(struct tegra_gpio_info *tgi, unsigned int gpio) static int tegra_gpio_request(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset) { struct tegra_gpio_info *tgi = gpiochip_get_data(chip); - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); tegra_gpio_disable(tgi, offset); } @@ -179,7 +179,7 @@ static int tegra_gpio_direction_input(struct gpio_chip *chip, tegra_gpio_mask_write(tgi, GPIO_MSK_OE(tgi, offset), offset, 0); tegra_gpio_enable(tgi, offset); - ret = pinctrl_gpio_direction_input(chip->base + offset); + ret = pinctrl_gpio_direction_input_new(chip, offset); if (ret < 0) dev_err(tgi->dev, "Failed to set pinctrl input direction of GPIO %d: %d", @@ -199,7 +199,7 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, tegra_gpio_mask_write(tgi, GPIO_MSK_OE(tgi, offset), offset, 1); tegra_gpio_enable(tgi, offset); - ret = pinctrl_gpio_direction_output(chip->base + offset); + ret = pinctrl_gpio_direction_output_new(chip, offset); if (ret < 0) dev_err(tgi->dev, "Failed to set pinctrl output direction of GPIO %d: %d", -- 2.39.2