Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3107720rdg; Tue, 17 Oct 2023 05:06:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+h++Nt6gNlEjotZgYGO6hsttZqea1BxRX3kr578TYmwclgOwQ/KbmYNZKEgFh22b4OHu7 X-Received: by 2002:a05:6a20:7d97:b0:17a:de38:7418 with SMTP id v23-20020a056a207d9700b0017ade387418mr2458667pzj.7.1697544375119; Tue, 17 Oct 2023 05:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697544375; cv=none; d=google.com; s=arc-20160816; b=nlCZtr5WVplkQoXkupYhs9IHWhpbixadg47sHlGey61Uz91hHXHBELsqomo2rtS9f4 k0G4YapGU0XArieOYmSOSLKoHEmcNbncNoHcvgONz4+a37ZHMPbArvwoq9mGPlRei9Y6 7tt9b8Lv8Qk0QKfqAC6NOu4VGQ2qPGJI+KLlaRUCzpQ0CIafgQQHhZuDmRo/vuXlsTet 71XXQmz8HxwV1SkTcGngHXHZULUowxZhSnYNQ+QKxPxDfc1PpPnkm+g1aCfryBksXnax 7Id7Gn/eS81zOAoqzdIWfLrFVv5Aou2pLsxz27WSpWP2fOtOBavMw6oZQ5Ziwuj0pZ9t 7M9A== 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=tHI6d381lpIvDTYFHvoZ0PRRcyIxnTmGZ3C+R5KwSLA=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=jdNhsqlVSROn5h3k/UYQthirWK80l8r6ODmkOanOXlPqDW5JgnvpeLVEJtIl3U8nGx 38aVVgWTkMkMlkNKxBj1ksIW3QGcOfgaHBd/TG8LGdRd0KbCmqGwQd4kTXZ9tVLdbYPl 5ubxoeAvxoRceaSMKbFzR7uMqE78zf/RvsFIH5wvhjLWDg0wPgruYgI17avrTgg99lL4 F2GclbpoYT5jsXByF7zrRTCrZma4WCVFkfzm/9bYsgZc7dh9GRgvgDvH9XEGh8Pjx9sI WeD9mQ+wQLvBqgyxIXoZwraX6uYL2gAnWd4Z3xtv5dAQmvenlmKe44TI6rUP6U2uW/iH e7NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=xpGnHqrZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id j73-20020a638b4c000000b00578f7063adasi1624447pge.33.2023.10.17.05.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:06:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=xpGnHqrZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 44053801D67B; Tue, 17 Oct 2023 05:05:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234941AbjJQMFj (ORCPT + 99 others); Tue, 17 Oct 2023 08:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234875AbjJQMFU (ORCPT ); Tue, 17 Oct 2023 08:05:20 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE0CC12F for ; Tue, 17 Oct 2023 05:05:04 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-405361bb94eso62866485e9.0 for ; Tue, 17 Oct 2023 05:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697544302; x=1698149102; 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=tHI6d381lpIvDTYFHvoZ0PRRcyIxnTmGZ3C+R5KwSLA=; b=xpGnHqrZuoCz6+EV12Afs8+S1U5sJTTraQOcG4CxG5k5r234LOCcZsW+Ub34LyYR4A m2y/Zyu7Ed7KxqnBtrXHNsK4LKrff36ZjSbZGzU/kkTrbzqWFvZT9P+fp8Y5RfAjps3j Ec2y6N51A7yprRuAoLof+Q+abltqPWl42bQaAE8FS16EckYbxTNQSCWyPL0iRzdIdEuc qoxa8mrMGxPeYWacg4/m0UqtQL/JXGy1eFPypeZSeN6d5L5qF3iJNSKWH+OCrq7sIg4m t2pOg8vqY2sIBz0hC1QL5/7mvY7diwN6WefDda1qANwgbnCp4fUdWpmVoe7TXmbtvlOX 6zfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697544302; x=1698149102; 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=tHI6d381lpIvDTYFHvoZ0PRRcyIxnTmGZ3C+R5KwSLA=; b=c9HAANhdojgbdzDLLIn227eoowbvpG+KjgAaNI1yKaa8CacceO/RZaM9Zo3ouEVpeM 7090lchvbG/+Awhm5YbLmd8jvxGwnc4iqS6uOf7SzU+SFaU27FnYa5lWEKluJNIiG6tJ A405GaiJcDWidJ85ifFOGXOkdrAnG5VE41+VYt60PeW9J/J1waHyxcskeczIdZyj38Ze JX2Wb3Vdj5S1OzSc4Y5E/XCB2sEslSySHgANw1OFeQvlHSenzyTkGElm+rcgHxBHnfI7 vbYcF2RPURI+ZeZTMyVRP7ZIJgaf1/DcrJqqcatSu6OzGyRCbmKMBdyMHkOzrufWMNxY onfg== X-Gm-Message-State: AOJu0Yy/nup/ZxOmBJrX0PPWJZ8HrkzXnttS7sfMCWrcQ+9P88WcvnUa 9YvV7WWp8AymO3o1TvxAIr/MJQ== X-Received: by 2002:a05:600c:3b13:b0:3fb:feb0:6f40 with SMTP id m19-20020a05600c3b1300b003fbfeb06f40mr1702876wms.11.1697544301931; Tue, 17 Oct 2023 05:05:01 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:f1ee:b000:ce90:ed14]) by smtp.gmail.com with ESMTPSA id a2-20020a05600c224200b00405442edc69sm1353859wmm.14.2023.10.17.05.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:05:01 -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 v3 13/73] pinctrl: nuvoton: npcm7xx: use new pinctrl GPIO helpers Date: Tue, 17 Oct 2023 14:03:31 +0200 Message-Id: <20231017120431.68847-14-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017120431.68847-1-brgl@bgdev.pl> References: <20231017120431.68847-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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 05:05:57 -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 ++++---- 1 file changed, 4 insertions(+), 4 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) -- 2.39.2