Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2013331rdb; Tue, 3 Oct 2023 07:53:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFD5pYaCR4e2P77veljEcOef5NbqjpszZ4Bwkx5cT0qyyf1gBPoTAV0cFpXQ9IzNRG5lqRu X-Received: by 2002:a05:6a20:a110:b0:135:38b5:7e58 with SMTP id q16-20020a056a20a11000b0013538b57e58mr14558318pzk.37.1696344818388; Tue, 03 Oct 2023 07:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696344818; cv=none; d=google.com; s=arc-20160816; b=kA2Gm/RftRUPNA0jMXoZGPusYSdUnN2Gune/5+WPA6O0+c5ksE979CGmmqLTb86eW6 sKbiPLBZztE8FhMcu/5VBn5ZOr3blw7ER7SP99jdFNCcUyk8VcDRlot16Poln6ooVO7E XWcvkVDnSOPAjqxDbWdYwlxzFeU7yzTFURw0nVJy6XbromaaiL+m5O/R8Hg7D/wXATde stJQg0qDw1Z2z3H9KXJ6A6z6ofdJKYrxZDFZY2xO2D40bsaILbZBIUjnI+ZspxHnyW5M yT1y9gcHSgo+ehBSpWPXh1hwbX4w08qJ7mjpgwrJhJ9GnNmodrrMsBZB05TUNC817z3s DLog== 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=Ijntmg1NBQ+adP3gjGt2F/CBhwsfnlyjkrlVEXH9faM=; fh=QPx/hkgkr7xHJ31c+1sohGxWgeIbcsI8iVFsxMdsOB0=; b=vrD11ARJePF/f6tZt01g49QB78XmcrdKQ8LnAyIt38O5BxJqXhCGznZKKv0D09aYCD feJ+RMEVVr+v3SHFzMOU11WSonUoztfevgxwKi2zv6xM26RK4/25VcgIFfHoY68lCVlN rECl4VfXuxl5tfmgUFeNdKjlLEM+glnoGRNYvaYz+rRS5CuNh6xNsa6L9AR42xYCVFpG BcR+yhuJecPn0IRxpr7Ktns8o9CxuJpJhHITAVRVl1MMjMAW4Zi/s1q9fFA/rZI6WSnJ ZJgNGJFC60oEnbb5JoBMNbW1m9EeFR5kH0iI3G8PjN/W7Zup3pNVeMHLrKBWN3ciwGqS agAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=D3deot8I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id z18-20020a056a001d9200b0068e3baee27esi1611163pfw.266.2023.10.03.07.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:53:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=D3deot8I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 844C78135BF8; Tue, 3 Oct 2023 07:53:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240325AbjJCOwq (ORCPT + 99 others); Tue, 3 Oct 2023 10:52:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240362AbjJCOwP (ORCPT ); Tue, 3 Oct 2023 10:52:15 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7614CCFB for ; Tue, 3 Oct 2023 07:51:49 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40566f89f6eso10483605e9.3 for ; Tue, 03 Oct 2023 07:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696344706; x=1696949506; 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=Ijntmg1NBQ+adP3gjGt2F/CBhwsfnlyjkrlVEXH9faM=; b=D3deot8IHzF0xI1bp70GXfbz5+XWcG0rVt1V9/apGDrDAHA/86y6c++BT7a1Hyejb7 bq19Z85abbtlcf/wKMdkBk38/dQZqBxB7c6+D5+xu/rjlykQ588rZZdoPXGwSB5Gvvvl doaIOx8BbTK4AjbmcnU6ZBNjVsQM7fgBgGJi+7g58wFveKzljt+kwDVjl/P8B1WZJ/XP UFjqzve/04ejB1wmcQyt/mziNZagc15rsavwdbpzfvm8ndMUUJdfNc+LLpQCX9B37awV HyeO88u14Zf46WN59LuXL6n9TWjo+/D5uJxNkoXQypRl+JQMeLYsS/q+S6qafMLCm2UW zXJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696344706; x=1696949506; 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=Ijntmg1NBQ+adP3gjGt2F/CBhwsfnlyjkrlVEXH9faM=; b=C8cQUm8m6kIlBroXLMsbfoAH8YrMWDcFLCVg01QsuVWISBf83x7/hd2xN6kV0ujwt+ VvXPrR3TCDUhwtDWPzW0q1a9QugYAxMgByOdqi/zK55cCUQ2g9495VXk5XWt5M8uoiNd U4X++OAhC22HBgfLRzV1jDHJvYv5iFTkviLELz+wdrYI4K3g3S6XMCTiAb7IywzJOzU2 7E1tE8TuDO1dgjd6vv2IaRZzQrXgRl34s1G+98jmOzjdfl7TatMFxq+I2OZD3AZvaQPZ p9mH8PuLaPrX4mS1MTgiXd7meYs5VUD0TmQPHYbb0LQ05ctgqAefwBv3Pf+l4DSOfodR 3QJA== X-Gm-Message-State: AOJu0YxUpoJ8H3lKgrOzLDrmM73bKNPJkGOkbT+/DaNNwlZYGbUNyeI/ zgs18FinYOdzqdixwu/g9NeBgQ== X-Received: by 2002:a05:600c:2205:b0:401:b0f2:88c1 with SMTP id z5-20020a05600c220500b00401b0f288c1mr14200438wml.29.1696344705874; Tue, 03 Oct 2023 07:51:45 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:51:45 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Mika Westerberg Subject: [PATCH 28/36] pinctrl: intel: use new pinctrl GPIO helpers Date: Tue, 3 Oct 2023 16:51:06 +0200 Message-Id: <20231003145114.21637-29-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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:53:19 -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/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 81ee949b946d..56a6b67d8380 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 f49d6e136018..4897c8425391 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -990,14 +990,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 c3732a9f0658..544ea8a607c9 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -545,7 +545,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, @@ -553,7 +553,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