Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp767693rdg; Wed, 11 Oct 2023 05:11:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOuUcqr1+6H8rixeh9bUFaZwM5YQHTLhIX1JSO5coKqXwIvy9+iPT7+P/VDSCpecjJpGrE X-Received: by 2002:a05:6358:7e07:b0:134:e301:2c21 with SMTP id o7-20020a0563587e0700b00134e3012c21mr22426346rwm.15.1697026288001; Wed, 11 Oct 2023 05:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026287; cv=none; d=google.com; s=arc-20160816; b=HK/Ex2Hw1Hfu7uj4ULN2xLKutqqyImbtZzbvKTfUeFc1tWUJLZbdh0Wyn0n6yxQbUe vEGcucLkOHNWnEHNyw9R3v2JSXTyAjZRPc15y282MGbvD5dxe74Iu5npEIErPKcDNsmh 9rpGYZT0Qr7sZOv50igSnoaVFohK3fZ7MI165U+Jfwd6aPP25lJxK4eA0+YVgV4+mQZZ TsmuHirv/M5xjp0wGNpDkolUwCaerLaohpys4pY6cZadoDRSj6r43BDGJRf+m0oFfFyP VkXVU9m7PkMQYgR/SnzFOtROzQ6EcEVYssPmLAs/qZEJAPmKkanVg2yspxQYZGIZxasQ maHA== 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=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=wwznwUo71UW7qtUhHhCBdkVr1ikkhvVE5ok+Sz/cxKvUCLltWfQ3QGjcMhJRQE6jKe VJu9ZWuG75OTD391BE7HUuqvkZ0xm9fBvQh0d4uLv60/yjAGkHOxAawKxmYlsJrBPlVR 27KlElKrMHguPSl0+QoFQN7smpmwZWqUiAc5yeQIAm1ScVqWyCuW/AO9hY6qGyyxouIB xTZaW3BfpCrD0LPNUAaDgFNAH/rtL5guyAQ4GsrjCtMGAOuIiKHHT0QacpDn47BZv7q4 NdU7S8Lb9Ahp+RR662It6RrSO7iPWhq4ovH4RuV1Lbu6ji2MJOvXcT0XDZZm3Hark/Ei GPtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=dzR5nyuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f29-20020a63555d000000b0057404ce2fc8si13853527pgm.529.2023.10.11.05.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:11:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=dzR5nyuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 912E480B183B; Wed, 11 Oct 2023 05:10:34 -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 S1346860AbjJKMKD (ORCPT + 99 others); Wed, 11 Oct 2023 08:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346649AbjJKMJY (ORCPT ); Wed, 11 Oct 2023 08:09:24 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E6EA91 for ; Wed, 11 Oct 2023 05:09:20 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-405524e6768so65065845e9.2 for ; Wed, 11 Oct 2023 05:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026159; x=1697630959; 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=dzR5nyuY+jQz+C1n+mkdc+f+cUiIeUmqz82UagoVHzlPGx8TaHvndDGPqoLsc1M1k8 kMPym9S2uOc9L0GbHoTiP5JwBU8ZrUCNB9bXdX61dEUvLcEgiB3MoeWn/8FNXsAc6EA+ 5vZjXVzaxeDQLTwwKs8vQ6HqcgqOnJ2fDGVotKjk77Q30zfSYjZUhnHOVMXry+AiMUcx 4hoOAkFzCcjV4Mcx9WC/GlIo93FSaCfLDRVcDAeYoSyu11tIei1XP+JBOILpCvPF5doD MS8NfFKLHKvgmorRmB+ot+gYx1blCqonSzAAl8Hnom/cmShgIfP09lqg/m72DYnB43w/ vkBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026159; x=1697630959; 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=PV7je7zV6WXbNSz+g0s2FMRgLFOOJwDyussErN6o2hIQoKgSiT5WfSVDacsSturgKh +IPLFFPyEZmfZcgYIiV2s12Qh2IeHLk5f68OSClaPrEEm5KQBo8pjQ2MALemhna2NobW Fi6jXhQfmm2X0xSYApwGH0taraPPWhjGiPGbxZvemSLXBSKvoa60aEaKiCsJAFa91Gif q2BAm5Ie0meUUqpUvMoIEZnpQl6gJHxgPAlQWosDWV0vccFyeapqXivGl+Q2Q8KN3/Gy LtlDgHr3ZzW57JNqGpNtLM/qTip7eH/D85BBmsfHgzvsd1w7+mdLUbGm6A9nLDr+BMfS EyOw== X-Gm-Message-State: AOJu0YzN4rjye40dex6QQtk1XTrknalpVCubC2Y3ldTcrRZL86qpS8Dv FqfqoWyjtAQUO05blr6iPPqkuA== X-Received: by 2002:a05:600c:24c:b0:406:44d2:8431 with SMTP id 12-20020a05600c024c00b0040644d28431mr17812077wmj.6.1697026158980; Wed, 11 Oct 2023 05:09:18 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:18 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 13/62] pinctrl: nuvoton: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:41 +0200 Message-Id: <20231011120830.49324-14-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:10:34 -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 --- 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