From patchwork Wed Oct 11 12:07:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 151359 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp491353vqb; Wed, 11 Oct 2023 05:11:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHw/Pup/fljficO1+mlhY7Mbi4A679GysgrXHhbbX+3Wcvb+dbmHBZV1xnbJGpTEa++zgkt X-Received: by 2002:a17:902:ea0c:b0:1c2:c60:8388 with SMTP id s12-20020a170902ea0c00b001c20c608388mr22811430plg.6.1697026312892; Wed, 11 Oct 2023 05:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026312; cv=none; d=google.com; s=arc-20160816; b=AdG8ETTPcVyTlIMMSYnMQm8sENQMqoMjJzyBvMSzHNlJKoYhNNPPzDaWhFTosvuVvN BWTGxAYVXeDWmBOru4c/jwnBN2thaYfUoQmXcaIe5PUqPWq/uLbH5S40ykQLu7dOgn3u W19IGmpNXjjtNkFiO7CbmDiZ4SVM8f9H2kCWCbGb+Y229nq3XarqqOp+AZJScTlLyHwF FnVL5psAtbRCmYnstCz1yq6NxCtpVEdaJaqqBo5I2q38X54w9yfxPeuZI757p/Q+i4nA GhD/p1JZk5+KFeaca7YHTcWZs3/fbAAtamjJdFIuVTfEaLsRrykRM+IwL2r1SOpE77Io UkKw== 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=9sX7KISk194rgY041xTg7tvrdqgP+qimN3AJxbjYr+Y=; fh=76dPTPnVOrVbkdsEoOFtXl1v557UiSAB0BTIjC2Z5V0=; b=xkGZ4R+WSGY7U3OhEYshV3C6eDIxJlbrrHtPjnis9yvs9RdLGtk7nTZuUh+95ERzWL CE6GjGY8hhja5adGQbHjBwTCPXzFKQcUHJtYQw3C1eQqSXcsp3soiwcswTWFFAhUNXdM COTJwNIFZpHLjqmZ9yaB56sV5WHukD3O2TkS62wt5+3hbT6U/d7ZsUUmgPwBfUXcyeXm xNT8Mm8Yfwkr3ndaqatVyGnVAV8r1V/lAD6cv2WXLhvx1fRgPl/P72xitUaCeeclc7iS A6+yvlJqQtp3a3CBFQATYGA41HkDDNyZs7Kc7EMUhVyIdARUm8L17hAwLBoS3gS1qFA1 lg/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=R7RCAOQm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id l4-20020a170903244400b001bbd639dff9si11366361pls.467.2023.10.11.05.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:11:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=R7RCAOQm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 4C628813550F; Wed, 11 Oct 2023 05:11:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346744AbjJKMLf (ORCPT + 18 others); Wed, 11 Oct 2023 08:11:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346827AbjJKMK2 (ORCPT ); Wed, 11 Oct 2023 08:10:28 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 097BBD67 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-405524e6769so5546095e9.1 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026173; x=1697630973; 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=9sX7KISk194rgY041xTg7tvrdqgP+qimN3AJxbjYr+Y=; b=R7RCAOQmtVhB6eSRP1JFyRN2tOUV6/2+VekJ4obE/IWuBa/P3BnqZxQuqN1nmhP3Sz DDxB7V0fp7K6ojNFl4t6uOm0pK6fZYZQAYhSmNLHWVavTvtBRZfgeyXny4aa0quch43K ckC6o/86dnnsmm+aEkrHHdT74/WAqwx00fb8fz/ZJ/XZ59zlsn0GopxrJdWOjAyz2ng0 njmGTbDyYxjc5LhfxggtpQQinK2AE9p/1YGVccSXC+FZUvVqURSt7/xgirs3lnYBJuLR cbliwtPq6fj+TP16jIaRCyULKIvzEnzpQuEBYljQfYzpU83kBE9xEJJGs4QijcxlMVk7 tYJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026173; x=1697630973; 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=9sX7KISk194rgY041xTg7tvrdqgP+qimN3AJxbjYr+Y=; b=qW7EaoqGPI7ICz9iuDNqiOyqds5Ov6wUyFcRa+EVNVkOeQm5PZ+BbhejKq1wSrAzZp jPjb1Q1hWkNov2XUXoqxvM3EfT2DW/xr987pdVHbbOQzCEW3jZIVEX3620t+3qZpkjU2 FzjRxVt7roBgqfiY6XGEeOxf6Z/mEWhhVxj5mjFaTEmwupmGJLlW71ryZ7eQ+F85Ss0W SL3ayZ9txO0BJXg8tQbwZlM0ILs8xOIJjEMbmDcq8c4uvNpAjbprymUJsND+/wJiJ6Uq NvVRkmHnwbyey8eONIseOjoyULAPXE/qHgCMgvm0EaACkQDrBO9cjHNYI48iWWYL3VkK 0GXQ== X-Gm-Message-State: AOJu0Yw/PTxGYs+h46Ka63QmbU8hrHkOG2tRNikd2i+dPHnzm2NgUJ8H GnFe3J8a4fGSJoM41EI35L+ZaQ== X-Received: by 2002:a05:600c:4f02:b0:401:609f:7f9a with SMTP id l2-20020a05600c4f0200b00401609f7f9amr15767689wmq.8.1697026172774; Wed, 11 Oct 2023 05:09:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:32 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Andy Shevchenko , Mika Westerberg Subject: [PATCH v2 28/62] pinctrl: intel: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:56 +0200 Message-Id: <20231011120830.49324-29-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 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:11:49 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779461063325934509 X-GMAIL-MSGID: 1779461063325934509 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 Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg --- drivers/pinctrl/intel/pinctrl-cherryview.c | 4 ++-- drivers/pinctrl/intel/pinctrl-intel.c | 4 ++-- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c index b8ad73c6b53d..02202cac8fec 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1172,14 +1172,14 @@ static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) static int chv_gpio_direction_input(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 chv_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, int value) { chv_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static const struct gpio_chip chv_gpio_chip = { diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index f9155d94a830..271aa60dbe9e 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -991,14 +991,14 @@ static int intel_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) static int intel_gpio_direction_input(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 intel_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, int value) { intel_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static const struct gpio_chip intel_gpio_chip = { diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c index d7bc9ef29fcc..91d228fead45 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -541,7 +541,7 @@ static void lp_gpio_set(struct gpio_chip *chip, unsigned int offset, int value) static int lp_gpio_direction_input(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 lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, @@ -549,7 +549,7 @@ static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, { lp_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static int lp_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)