Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2012859rdb; Tue, 3 Oct 2023 07:52:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8DdwHckJPLklmikW02LH3UajL6os+Y2A0fPQw/ETVGLe1VzlyaFgWWlahHuvAZD1cOKUE X-Received: by 2002:a17:902:c40a:b0:1c7:47ca:f07f with SMTP id k10-20020a170902c40a00b001c747caf07fmr11554481plk.21.1696344768099; Tue, 03 Oct 2023 07:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696344768; cv=none; d=google.com; s=arc-20160816; b=AyP23s/hWB/iBWZE3+J04MGRcckN0h0ejohtGVJN/tHoL6SvMiH9LGuw1o1FTzSkfx rSesKf9TIJKFlSn0ocRRfJQeCo4eO3fynpBPLf4IbZ6KaFwEWnXJJvOwvN8kgcZDFL7X V+9xrgGGMjwSsIvVEGnhoOhJfbBQkwcEpcnHqSnBGHFDuFTFrATOIGeYdk9YgEyrTMEX krgSCc2U1TRN3H0BJk/Z6IHLqiR9jb4foTfh9qUO8QXfhCRIhuaiy8pbXnZBT8Sdkdih 7vPYw2JHbqMnleIyRMUfIal47RWjJDlTaMlVsA0/2U69PHMhRifL21Y6INcHQSlTaNT9 DOZg== 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=R6f2Ek6wUAMXrQ0iQTwEIlp72Yx/GmOv3RdXzeN7wCE=; fh=drsXJwg3u8I7VCd9MWrRAzXPeSq/nqQsJrVqG+FmGr8=; b=Rx86dtEXS7xRqGk2DzanurQMG5UaWwkOj4HJ2nIP1XNtFqBnLh+ytG19EpRkfD8q/H 9JPvwUW6cFvj7uMjPmwbT5QQEbzV0LmHpZvtTB2iG6A90UILIKArOEoz2FiDOHy0wHvo ldLRog0U6NecqdxPOfvvod7yUNlCTR1rHYOImk+/krc5QlfH6p/kJe3oaniV02Crxb7/ W67F3+fFPBwwVLxc2G4ToL4hzejgfH5q/eMJNOzXNGMSXPyTNsgwO+LticzNCQQUUM2S zHXlKsuek3zTMI+ao0eNgShvzd74oxm09pqbjThux1SpFCfwTQf7Bw21Rrsqy5NWlgta jigA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b="VsljBR/L"; 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 Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id n1-20020a170902e54100b001b9c992945fsi1723930plf.555.2023.10.03.07.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:52:48 -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="VsljBR/L"; 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 F11E78135CF0; Tue, 3 Oct 2023 07:52:37 -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 S240282AbjJCOwA (ORCPT + 99 others); Tue, 3 Oct 2023 10:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240224AbjJCOvj (ORCPT ); Tue, 3 Oct 2023 10:51:39 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B97DFE5 for ; Tue, 3 Oct 2023 07:51:34 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40572aeb6d0so9992685e9.1 for ; Tue, 03 Oct 2023 07:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696344693; x=1696949493; 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=R6f2Ek6wUAMXrQ0iQTwEIlp72Yx/GmOv3RdXzeN7wCE=; b=VsljBR/L4p91DUJCiMBygW13RIDBc/oKl2Vh8llIXH3rz92aHYFX/C3Sa/QeeOmf1E m07hfTQuDS7d0YhyU7Z7NwKwh/jfYcqbbihJxmjMZ+29euOn1CJTA3wm1PrSIp4xRds9 UMSTyhQ9W8yaeHdpbEZOBNjAIGv3h3OqTz8xOfrW/0oeLsrzm2wK0yJ4swV0y4+gkst7 w8GfOzMYvknSAIO6g9axC3YZCITqP8p6xkvENq+hYOjAKEvHulU8s9WfcqeVcZ/YbxU3 pMzoEQVrAy+ixwosu5SfeHrS1bLF2Yo4RcK57EidHQVCDy2mrl/fLyteLFHMc3e/1JgN K0kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696344693; x=1696949493; 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=R6f2Ek6wUAMXrQ0iQTwEIlp72Yx/GmOv3RdXzeN7wCE=; b=NtxmKqKfFb+GvYW1JJbjbue+xgoknKBLEr6AB6jrxYPo75/XBHkZoNAt9a+UesHXyh 0Z5ggh+iGT6l0qrCWM1c/ia/DfXtZU+boCtg3IkoRZSIRD8i84hlgwb5tBEzvoJtkG+B czU3EC3ZMNWog1gvr6AZ8pfhtZ6kaHP6qbrUp8k+KiWmlO8tFg4lmGFaJQ+TXJO90Nfd oAOLclwl4bvmVz3+hpP+jo1hj3DRdlhpO9VjadqTgcH8G14lgsw6ZcB5vrjUMM2YZV/m e6uViwSfVwHKs2bOn3kfMN9GnxlmeBk5RAJDN9TfxR6QIBmJZ/fiipxXgJPd/MYVi4l+ CoyQ== X-Gm-Message-State: AOJu0Yxk0bnnNgUlB0lvzfu00K+R/JzcVXuXfzgqAnjwbix+TVfn2LF3 +KhidYJQw71WSVJFTlDnEnZf2Q== X-Received: by 2002:a05:600c:b56:b0:401:be70:53b6 with SMTP id k22-20020a05600c0b5600b00401be7053b6mr12193455wmr.15.1696344693054; Tue, 03 Oct 2023 07:51:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:51:32 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Avi Fishman , Tomer Maimon , Patrick Venture , Tali Perry , Nancy Yuen , Benjamin Fair Subject: [PATCH 13/36] pinctrl: nuvoton: use new pinctrl GPIO helpers Date: Tue, 3 Oct 2023 16:50:51 +0200 Message-Id: <20231003145114.21637-14-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 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]); Tue, 03 Oct 2023 07:52:38 -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/nuvoton/pinctrl-npcm7xx.c | 8 ++++---- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c index 8bdd0124e2eb..62134a7f0b4e 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -171,7 +171,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset) struct npcm7xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_input(offset + chip->base); + ret = pinctrl_gpio_direction_input_new(chip, offset); if (ret) return ret; @@ -188,7 +188,7 @@ static int npcmgpio_direction_output(struct gpio_chip *chip, dev_dbg(chip->parent, "gpio_direction_output: offset%d = %x\n", offset, value); - ret = pinctrl_gpio_direction_output(offset + chip->base); + ret = pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; @@ -201,7 +201,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) int ret; dev_dbg(chip->parent, "gpio_request: offset%d\n", offset); - ret = pinctrl_gpio_request(offset + chip->base); + ret = pinctrl_gpio_request_new(chip, offset); if (ret) return ret; @@ -211,7 +211,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) { dev_dbg(chip->parent, "gpio_free: offset%d\n", offset); - pinctrl_gpio_free(offset + chip->base); + pinctrl_gpio_free_new(chip, offset); } static void npcmgpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c index da21f6a45888..0b6d6964087e 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -173,7 +173,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset) struct npcm8xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_input(offset + chip->base); + ret = pinctrl_gpio_direction_input_new(chip, offset); if (ret) return ret; @@ -186,7 +186,7 @@ static int npcmgpio_direction_output(struct gpio_chip *chip, struct npcm8xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_output(offset + chip->base); + ret = pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; @@ -198,7 +198,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) struct npcm8xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_request(offset + chip->base); + ret = pinctrl_gpio_request_new(chip, offset); if (ret) return ret; @@ -207,7 +207,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free(offset + chip->base); + pinctrl_gpio_free_new(chip, offset); } static void npcmgpio_irq_handler(struct irq_desc *desc) -- 2.39.2