Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp767475rdg; Wed, 11 Oct 2023 05:11:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSrWar8ZhI8AkHdm2RpAh1ScyYYyRdmapphgeLz6iUfMHdyY3RMD5fV/xD4sHzJvTSd8ca X-Received: by 2002:a92:c262:0:b0:34c:cf1f:2a4a with SMTP id h2-20020a92c262000000b0034ccf1f2a4amr25834419ild.4.1697026270956; Wed, 11 Oct 2023 05:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026270; cv=none; d=google.com; s=arc-20160816; b=Tz0+uteSQ8amWjucMwNfF1DTu2SF9EYm7hiX2ZPqt8YEPYDMtvAowubMZVywa49Rfp JOhRDhbqoeweIncxNTFVUqaOQHbjtw8W+li6xHBcdyllUnPSIgUfghE9WncJH+V4LQhh icVwTT0u1S5wiF6+rw+nPYx8dzsJLcnHtQsObht2feK1sMIDh3PUtHW3YTJhUMKlzZNk Bhw7nEovlPYiwJ16iCHZo92UFbLp7ZRgPTfOPS2TFqnRbDddxOq4i5UxcsMpCnuhX0qa Y+gL1W+ZUvA1UIKIKCmHVHj0KoFZcauQpzXX4CoN756rdd4vb2gxoSEZ3o2+HAfXxAIn zgkw== 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=wPwuEwfRZF39P0qe4RqCU1p549Ra/xLyaMOsvkr04jY=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=ho31qXrTrVG5SuROC7T0i3R4n3m8hHd1Q12s7V6ms4nxnvDowD/tc6IocicQtP7XS+ PFbrK2OQrDOcPshaCAcfH3xanKHrF1xIutkMn7aPQ4azvXaWxbqAKUzzFNd+zXe3d/Jk YqBXekZcykt63rCg0R2A/WCEGmH0e9XRmypRTv0nmdS3XkUIIanB7H/PjRx/p+74A5Yk tQsiiSDbN1F+7nV00k8J6NJZ9tCo+oWivhXBx0F38PuV8qfxOmOOmgXHKJACy/xnpEc2 +Au04uEJdVqGPq6QxsbRGXBqrTJH/Yy6+YjvitrSS6GePb3mpXA2p1OSeHXTy+jLTK1T BgAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=owH5wbJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id h70-20020a638349000000b005a073e0cca1si911698pge.512.2023.10.11.05.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=owH5wbJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 2E722813549D; Wed, 11 Oct 2023 05:11:08 -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 S1346643AbjJKMKa (ORCPT + 99 others); Wed, 11 Oct 2023 08:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346767AbjJKMJc (ORCPT ); Wed, 11 Oct 2023 08:09:32 -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 5A1C3103 for ; Wed, 11 Oct 2023 05:09:25 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-405361bba99so62444135e9.2 for ; Wed, 11 Oct 2023 05:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026162; x=1697630962; 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=wPwuEwfRZF39P0qe4RqCU1p549Ra/xLyaMOsvkr04jY=; b=owH5wbJfOoKtbUidOVVhY2l9zWRohRHWAksuFjsBRJrMUVCoAgS4neCQr8sIc9/Mfm +5vgsxKeYx09lZHa1kYewbOmsW+yEcuKNthRB1SGXyzh77ER4YNgmj8rTTYfUqVqXm9O Vhx+yAZlYt5j1vpMdIVOb0i7bKwlf8TwwBlZbCLdiy8+LS/zQTpxpZ5OF2Sqmc8/3QQ5 FifuaSMi4o/O2Vd6TUBBusat9D+22YvvDMFj1/ZkVqZNMH5yd8O1S5Zq353iWtg8O+VI K1+fRldn2TuMNlggfz9N4I65ulkTQhG3ox78PS6cvB1ODivFpXcULFs5xIxu1dnIrugf 2f8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026162; x=1697630962; 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=wPwuEwfRZF39P0qe4RqCU1p549Ra/xLyaMOsvkr04jY=; b=VW3yRjYzJaDwEZefX15pIbw37p6/sFdiTaVaVMRDW2otgywqgpM00bD3kwtLf8bXZ2 LcU6UjxhWnuItOPvqcnMFk6+0SIriG98Wlfr4x4XnQvWGXzABuRMoimVxOM/6ofwRUJm +I5AizxVE2Rrah5S5616nEGGlhSCYg80ZvQoPD6wYKEEkFFYmtZNqrsPooDCfhwOx4j+ RRSZoLi6vSnhw4r4LViGbgybB3ZdVCigXsS0GS56QwRDWhlG4dMcTK4vIp/xex6xDQYQ UuXNiPw6/Nb0+meA0zrQzN7QF4Q9y5Wfl6CsuhKoO7lkrT/6b/f+smJHsCJ0LIhT/2J0 afFQ== X-Gm-Message-State: AOJu0YzqUuh2ogRykZD+oLKCmDqrvvVgEnZpOf5y0HTWn0Pt9H7n1UwP flY95Y7xF1jJ6rRqFi7N4gVZ1g== X-Received: by 2002:a7b:c419:0:b0:3fe:d630:f568 with SMTP id k25-20020a7bc419000000b003fed630f568mr18238326wmi.39.1697026161771; Wed, 11 Oct 2023 05:09:21 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:21 -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 16/62] pinctrl: stm32: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:44 +0200 Message-Id: <20231011120830.49324-17-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 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]); Wed, 11 Oct 2023 05:11:08 -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/stm32/pinctrl-stm32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index a73385a431de..11d9f07934bd 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -217,12 +217,12 @@ static int stm32_gpio_request(struct gpio_chip *chip, unsigned offset) return -EINVAL; } - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); } static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset) @@ -241,7 +241,7 @@ static void stm32_gpio_set(struct gpio_chip *chip, unsigned offset, int value) static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } static int stm32_gpio_direction_output(struct gpio_chip *chip, @@ -250,7 +250,7 @@ static int stm32_gpio_direction_output(struct gpio_chip *chip, struct stm32_gpio_bank *bank = gpiochip_get_data(chip); __stm32_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output(chip->base + offset); + pinctrl_gpio_direction_output_new(chip, offset); return 0; } -- 2.39.2