Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2013268rdb; Tue, 3 Oct 2023 07:53:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQ1JuXz4HdUbc5ELngYFeCCnrZUVOd27a5aFQOAOmfoLtzSZWsqv30jVCJJZzMM4rS+RZV X-Received: by 2002:a17:90a:d246:b0:270:1614:11b9 with SMTP id o6-20020a17090ad24600b00270161411b9mr13572232pjw.36.1696344809956; Tue, 03 Oct 2023 07:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696344809; cv=none; d=google.com; s=arc-20160816; b=NoEpnbyuNzpBr1TF5VdYyM2aMeRdZ+o8sXIuLYcs5CUICyGssohNFPtja8Y53RwVMG kqcHH40EKOFoUYJaZGr/VjxiTzy5ytpXtW+5IT2D/XdTABzTe2JJzZr+So3oQje9Fsj6 4e1bnFclz8rI3AeYZGFqP0QG5OfoalIOq7OIwjP3zK00pwbX7EkFqknXafngsaLMrYAr hBHCNCLvPVQsZvx3bFiuhVqWvsSLOUG/IzYBkUiHtTWbqJGxTKsaeK7JnaDp96qMBDjG W4eFB6D9jc6eNgANH9snXYwEKyR/h1m76fydCLTzWXUgxJzAfVXrgb2uo/TEFqOuK7xj D0PA== 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=PbI1RQ5tA31jmForDpjaNDHFXNvHWaIh5Ez7RFreokA=; fh=6acDfXpu7mYjoyf/gH/7L5Jk3xRF5S/+S/xogwmbBEI=; b=OlRJ4cpqW6Ik4f43UUcadeCxPJghrULBW4xtN8vv7TZ+8E95JsyGqBfDmwFNhgyOUb pwcGRDphRmmSuch+SLVF/DNsIOx3VPrhoTbleVEO9Jrqn18efjybHsiZqLXNZhAH717N UtPncHGGvz6PA+aROlHLsRF57hY1t2X1RPDFJlRYuBwqDFs0O9ZE20zqMMvmPpdbfrRD 0NyoyvuhH6qWFI1iprzG5ueDoLNi+7p4i1CGFunUGbuBuIZ8lsSsEeHxaiciPiWJnH/Z 9tfIpAtVLwJZSxqVRc2gzF5S0Hno2/nTu0WwxbwkDdTiRpaTFugyejEPv26pgdP36IOI G/rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=oqv2IvZ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bb20-20020a17090b009400b0026efcf5357csi1489850pjb.126.2023.10.03.07.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:53:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=oqv2IvZ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 0BE918116B13; Tue, 3 Oct 2023 07:53:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240243AbjJCOwZ (ORCPT + 99 others); Tue, 3 Oct 2023 10:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240209AbjJCOwF (ORCPT ); Tue, 3 Oct 2023 10:52:05 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9430122 for ; Tue, 3 Oct 2023 07:51:41 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40566f8a093so9831055e9.3 for ; Tue, 03 Oct 2023 07:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696344700; x=1696949500; 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=PbI1RQ5tA31jmForDpjaNDHFXNvHWaIh5Ez7RFreokA=; b=oqv2IvZ4CQ9vHBFzSk9S5dW8Oki2hOfCoANXrYJ8TZA5QHBj6AgHwR7bsfZNP+7uE0 aTzPAxASJTt7CiYVTdeJSu5j56KRZOZ7e3u2XqQ3VLO5ZifQt3n2DAPzmEJ5GEZGHsgZ 50Njv2IA/5JqEJ5yJHzVzebnLdA6+JRvTPjjCc+0449sh5c0rrVwZQ9GBIs0hguW58eJ ppEmajG11u/lJiCOZtuzxe/K9P5CsU0OGs6xGtk4X77+drlr7K2xXzH+BQo5eAudGutd dc0Yx7ZNqBg8q2HoOA3t8qiMocDlGHpi00sNTCfbD+NMn24HeqzGTkDCE+C+zCDeCvGt PFiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696344700; x=1696949500; 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=PbI1RQ5tA31jmForDpjaNDHFXNvHWaIh5Ez7RFreokA=; b=S9yf3juDAJQ8X/EEzAp5/ZCoq+T2lxKZZlgha1CLsZxyyHa4VD26DrM9u6zUcTtZ5/ JEyKMkHDUMjXzOX/wNHL6AQfs6cuNoSpzU54bY5SwMJ3onKEIKktEj6tadTw474ozNl3 AUUJ5TV4KSUEZch8JnJrp4b+CS45dDhhdgxZkfTRto0C/M2Gn8gt6e6aYbPAhN6mCf7d /wUkeUGcXqmCyX0uIg694Y1pXo2Hk8pMqCrPK5kGyuSVB9b8V5hspge37gYMyBdNShUk 4i1lc8ckTYiFwRROjhCVeSM306WmwBJ6OYgSh0GAvmDwnmDNE/uuMgZd5DxCHSpQ1pZv nc7w== X-Gm-Message-State: AOJu0YwpT0bEkG2bvdv4zWfTaJMPuQDPzwinO68Cx9HifOTjDwH4my5i dbL3DNmAdoz7C86pNzaQZp4YfQ== X-Received: by 2002:a1c:f709:0:b0:3fe:1cac:37d5 with SMTP id v9-20020a1cf709000000b003fe1cac37d5mr13510551wmh.4.1696344699849; Tue, 03 Oct 2023 07:51:39 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:51:39 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , James Schulman , David Rhodes , Richard Fitzgerald , Charles Keepax , alsa-devel@alsa-project.org, patches@opensource.cirrus.com Subject: [PATCH 21/36] pinctrl: cirrus: use new pinctrl GPIO helpers Date: Tue, 3 Oct 2023 16:50:59 +0200 Message-Id: <20231003145114.21637-22-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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:53:12 -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/pinctrl/cirrus/pinctrl-cs42l43.c | 4 ++-- drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c index c09646318419..097e4dcdda36 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -508,7 +508,7 @@ static void cs42l43_gpio_set(struct gpio_chip *chip, unsigned int offset, int va static int cs42l43_gpio_direction_in(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } static int cs42l43_gpio_direction_out(struct gpio_chip *chip, @@ -516,7 +516,7 @@ static int cs42l43_gpio_direction_out(struct gpio_chip *chip, { cs42l43_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static int cs42l43_gpio_add_pin_ranges(struct gpio_chip *chip) diff --git a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c b/drivers/pinctrl/cirrus/pinctrl-lochnagar.c index 0b78cf611afe..f3c8a8c14e14 100644 --- a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c +++ b/drivers/pinctrl/cirrus/pinctrl-lochnagar.c @@ -1098,7 +1098,7 @@ static int lochnagar_gpio_direction_out(struct gpio_chip *chip, { lochnagar_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static int lochnagar_fill_func_groups(struct lochnagar_pin_priv *priv) -- 2.39.2