Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp768697rdg; Wed, 11 Oct 2023 05:12:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkYNIQZ+vFgkmqDEvKYsoCv7oHHPeL6jylTE/GYMZjiSFSCdzUofUcoltgFsKPUlg5KB14 X-Received: by 2002:a17:902:ecc8:b0:1c4:4a4d:cda with SMTP id a8-20020a170902ecc800b001c44a4d0cdamr22388274plh.15.1697026375611; Wed, 11 Oct 2023 05:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026375; cv=none; d=google.com; s=arc-20160816; b=aAQNhdMW6nv9Ld7pAZhuajQELPO29U7CFg4Q1UfIMwaOxApnVOtKvnRH5VXvF4OWww f3Aa23A5S6QSOjcv/F+KR5IvFSartz06P/C4eD90uyjluoJNDqSRJISKBTc1iXVvUe/+ Eu+r+iJ0MvyE6xPYwZ5zaKGsfTCS0EBpEXEGBQM1evf2OdMd/3irHfUez+TtE3kdsnLM oolL/Phld8hpwZLHwm28kNLfcV1SLTcnUX5Mh/umhyWQrUsI+veXZVeAuNipEHLR8sDE mrCCGu+w1gGaPzxTNn/U9WpoT5JiXRIetRXfnKCfxgbLBJUQIrllHVh0wkHirxGvptZ6 y2MA== 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 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 kf8-20020a17090305c800b001c62acfa473si13517032plb.62.2023.10.11.05.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:12:55 -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=R7RCAOQm; 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 9AF0C80ABB1A; Wed, 11 Oct 2023 05:12:47 -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 S1346387AbjJKMLe (ORCPT + 99 others); Wed, 11 Oct 2023 08:11:34 -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 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:12:47 -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 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) -- 2.39.2