Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp767616rdg; Wed, 11 Oct 2023 05:11:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAXAioo9/HD3A9/1SmLoP4qsdNuWExbhN3itO7GWm+PQkulhrntJy9drwB6PO2sRHGuOdr X-Received: by 2002:a17:902:d507:b0:1c8:a68e:7fc with SMTP id b7-20020a170902d50700b001c8a68e07fcmr9155418plg.53.1697026282257; Wed, 11 Oct 2023 05:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026282; cv=none; d=google.com; s=arc-20160816; b=Kd2WmLvE22npn/T889RT6Kc3n4OyEHQY+mS1iS0ca3znSmwV+eqlGY9UzQElEk3YQW fipEVENpmtFvMoUmZstLS3y1MJ6qZTv4M2BsBEAQszpyugp/6WkzjvzTlAnIBh+1ARkP J3QQ4316qOgbkF4Y0QY3Wdw+3tfJtaAWrIjltKwxm48cjAIm4knbVL5LbgyH44KVS/nR sYaLL3tcCN+7GQFjJTbdS6rjqymYC1hf6J/llP+1Z7/ujsjObZrv/3Mb6Kc6K33Qu2OK x29hZYsjGkHmg/V6LTGVHivr5cJnYuGajpYqJkomP5egJhZZUi8RhvDZopLLao2qA7Dv ma5w== 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=dmVbW6+I8jnF328pjYplidk2JE2EhL6lsDGUGDYEtHz/L86Lg6uO1O6KrLgWs3viwK KNanqu59XmjH6weLZEYke53mAihyo1jv9kLHs9NK7KOd8oNLawdSYx96cg0IulWF/4mz ir+p8tkMwzJ0E9S11K59TlSBd96Zee2Y+sSjxnLv2PQXicwd4zoOywEqZQDmvsAb+FYC IfP/kVlCS3Ig1OiCK4L6j2CumNGVLGN7plSOW8BxJsx53SesGCf8kKYnAJuDsYeuA+iv cRimV2WRan1qYRVlmrGZW/T10ykugi2Y+2a5kwz9ONjebXbB/zzlHpqX5IqQzBjKrUvR cTRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=mfKRNXwq; 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 Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n5-20020a170902d2c500b001c5f5153e41si15584214plc.535.2023.10.11.05.11.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:11:22 -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=mfKRNXwq; 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 9C02C807E8B4; Wed, 11 Oct 2023 05:10:10 -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 S1346784AbjJKMJg (ORCPT + 99 others); Wed, 11 Oct 2023 08:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346387AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A942B7 for ; Wed, 11 Oct 2023 05:09:14 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-406618d0992so65240665e9.0 for ; Wed, 11 Oct 2023 05:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026153; x=1697630953; 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=mfKRNXwqSKH+2YHokj16KJld4cVsvnY0UhCgpiBBqXKh0JyD9Fy4hwnGDeVccdoMa2 BbBR9uPxxebavQWK/L46oLyrpdQD98xj3AQ4aN2vKvE7fwFMxqZhTyGmPOwhFu6ir0vS XS8BsRp8vBP/w6EQa9XgTREmZH4coO6ZD5JJ+Kxj2jIV0hK6kU/Dl8e2jtmbA/t9FiWV tS+MDxFGzNsYPo8slzm+eD60eBAQS986yOmeyO08eUwls70MbldDWKjuWMlNDxwSQTZ5 g3P0B3L9fUvxON/Vz9b3OGhRL+k7v8FvQQGanMVqSmqBx4nlA2NmxYT1Z8Pl8iWAQN21 +6Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026153; x=1697630953; 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=b2I9Fa22wuNGLSGkb4bxulmxdXS0FVWW/zHVgPBSI365xMDrqKphe/lr8mM+zofo35 +U6Ge8F5A6HDFhRVcYUGf5o5VlhRT6LpAGLFOieryHnG5xVkMDgfrlGirKScoUSzXItc RfprSigkiypdrUOfoS4i6x2LrzC2izpKweGt92NPBpU3DYbyCNi/Gai8l/rJV9dnUOK2 SJKSaN2MIuGtZ6PvzP23USWk7Uuq9DqCQGOpKMjuZTofp39c9uIKenwWVBZnHKND6AR6 w7XDuS21Ifmc6xq50kCRRkfMqYyWU4OPTNiWhVW+BoPiDt796NO5fjCg+QHCdigfZH6r bsxg== X-Gm-Message-State: AOJu0YzMcjwni8wMF4MOKDS3BC055SSMzZyDZq7ZZwmu4JD8dgw5USeN EuiAKpuFVOF4b1OAgrhmCo7LGg== X-Received: by 2002:a7b:cb89:0:b0:3fe:15f0:dfbc with SMTP id m9-20020a7bcb89000000b003fe15f0dfbcmr18927550wmi.12.1697026152784; Wed, 11 Oct 2023 05:09:12 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:e551:3946:26fc:f94]) by smtp.gmail.com with ESMTPSA id w21-20020a05600c015500b0040652e8ca13sm19012253wmm.43.2023.10.11.05.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:12 -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 v2 06/62] gpio: tegra: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:34 +0200 Message-Id: <20231011120830.49324-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011120830.49324-1-brgl@bgdev.pl> References: <20231011120830.49324-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no 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: 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]); Wed, 11 Oct 2023 05:10:11 -0700 (PDT) X-Spam-Level: ** 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