From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2EECCD6E62 for ; Wed, 11 Oct 2023 12:09:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346390AbjJKMJO (ORCPT ); Wed, 11 Oct 2023 08:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346246AbjJKMJK (ORCPT ); Wed, 11 Oct 2023 08:09:10 -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 51CFCA4 for ; Wed, 11 Oct 2023 05:09:07 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-406609df1a6so64977665e9.3 for ; Wed, 11 Oct 2023 05:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026146; x=1697630946; 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=JV89mjd+2xCaNvtlIxB557w1lQgJK6QeusQPNsiKVbM=; b=f+1ftpCKWvEGw1eQXYxvhgTinG5HkrUIqR1HBU+8kWHis2oaAlW55v6UPb6gtEPiSK BbPthDU2OIxReIfNljmajPCoXlyVv/L2eElJJtBBSaWoX2WCwcaxnL674Cy+wBYr4tsY herbUAtV97ByFoMzJjD5EkkXJaNZSrwNtwMJpWoqmKMpLUHUHnwPt++bzBfQSvvUN88y ZHP7PJhKMXqUxBI8kmje08CUrPh3uEaPoL1Qab98ZUEt8P8gChirscRfeZStSse/89RP qDjYaMjybBwf6DEBL4EaG/MZkrNILj18UV3Dllw3BU2Nb4/ZgnmZcknCQdmpv3A1vXxK EOlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026146; x=1697630946; 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=JV89mjd+2xCaNvtlIxB557w1lQgJK6QeusQPNsiKVbM=; b=AIbonoEZTnLOZEUEh5u2XY4kb8NQbFZhoL/bRZmCl/d5pGpVXQrb8Y76iW9LPkWU0j /N9TD8Xqrk4QKucT5nxHuFXaWCRiB43krz/uPNaKPy9zO2xXmkRFSZoYMXDQkTzl+hs6 mTUY8EOMhlkL9OWLlWsn0slVX37RunZ31+KtMggVrlYwwPrDwYdYCQtsIdpOy85botYv aR3+VYuijgmwGf8aenLkeP6yCBaf66MP1zaeEW0grxxibUe8AnO5UKCidnSgsgK099DW sqEiiLrhuJ6qtks1+EizSRdzBH5mDESvLCo0GNC8aEpZ5+PnPJK6jnAMKMsUkxNYehZ3 iYKw== X-Gm-Message-State: AOJu0YzYn4IzCN4r+nP9n7zSqpvcUGi1so4dmjRP0NPBI069oj2tDDgO 3KB5LrKvCfcrXbyoOlFF2W0e1X35V7gq3kbZb8U= X-Google-Smtp-Source: AGHT+IHQE+KY+f3/Lkd1mCf3FW8G05LBSM3hjSTxs8brJpped3ZXC1ExcdkjwHWVKyKG5dpDSYM9wA== X-Received: by 2002:a1c:4b1a:0:b0:403:cc79:44f3 with SMTP id y26-20020a1c4b1a000000b00403cc7944f3mr17642504wma.19.1697026145681; Wed, 11 Oct 2023 05:09:05 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:04 -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 01/62] pinctrl: remove unneeded extern specifiers from consumer.h Date: Wed, 11 Oct 2023 14:07:29 +0200 Message-Id: <20231011120830.49324-2-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski The 'extern' specifiers are not needed for function declarations. Remove all of them from the pinctrl/consumer.h header. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko --- include/linux/pinctrl/consumer.h | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 4729d54e8995..22eef0a513ce 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -25,27 +25,27 @@ struct pinctrl_state; #ifdef CONFIG_PINCTRL =20 /* External interface to pin control */ -extern bool pinctrl_gpio_can_use_line(unsigned gpio); -extern int pinctrl_gpio_request(unsigned gpio); -extern void pinctrl_gpio_free(unsigned gpio); -extern int pinctrl_gpio_direction_input(unsigned gpio); -extern int pinctrl_gpio_direction_output(unsigned gpio); -extern int pinctrl_gpio_set_config(unsigned gpio, unsigned long config); +bool pinctrl_gpio_can_use_line(unsigned gpio); +int pinctrl_gpio_request(unsigned gpio); +void pinctrl_gpio_free(unsigned gpio); +int pinctrl_gpio_direction_input(unsigned gpio); +int pinctrl_gpio_direction_output(unsigned gpio); +int pinctrl_gpio_set_config(unsigned gpio, unsigned long config); =20 -extern struct pinctrl * __must_check pinctrl_get(struct device *dev); -extern void pinctrl_put(struct pinctrl *p); -extern struct pinctrl_state * __must_check pinctrl_lookup_state(struct pin= ctrl *p, - const char *name); -extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s= ); +struct pinctrl * __must_check pinctrl_get(struct device *dev); +void pinctrl_put(struct pinctrl *p); +struct pinctrl_state * __must_check pinctrl_lookup_state(struct pinctrl *p, + const char *name); +int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s); =20 -extern struct pinctrl * __must_check devm_pinctrl_get(struct device *dev); -extern void devm_pinctrl_put(struct pinctrl *p); -extern int pinctrl_select_default_state(struct device *dev); +struct pinctrl * __must_check devm_pinctrl_get(struct device *dev); +void devm_pinctrl_put(struct pinctrl *p); +int pinctrl_select_default_state(struct device *dev); =20 #ifdef CONFIG_PM -extern int pinctrl_pm_select_default_state(struct device *dev); -extern int pinctrl_pm_select_sleep_state(struct device *dev); -extern int pinctrl_pm_select_idle_state(struct device *dev); +int pinctrl_pm_select_default_state(struct device *dev); +int pinctrl_pm_select_sleep_state(struct device *dev); +int pinctrl_pm_select_idle_state(struct device *dev); #else static inline int pinctrl_pm_select_default_state(struct device *dev) { --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 133B2CD6E62 for ; Wed, 11 Oct 2023 12:09:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346474AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234821AbjJKMJL (ORCPT ); Wed, 11 Oct 2023 08:09:11 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0DE3AF for ; Wed, 11 Oct 2023 05:09:08 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-406618d080eso64747075e9.2 for ; Wed, 11 Oct 2023 05:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026147; x=1697630947; 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=iLxWzsIb/h+CtHtFpC9R9DLEmU6wwVMInqduuyQJkso=; b=dLelOsK9m7X8sHfydnMZFLizhjXbUITC8K3t0pjBvoceFlwNHjEqWuTYYF+HZR5WaL 5OLQoP6/8O2G2Eto4dwDXTfiWjoqbo9flmcaorgGB4ybgXpzn6Bfsg7QPxthBCSN0x3e +tmcmPFMq6xDBipMTv7VWEB9K7aa1mFhrHh8b5B4oHODW/5G6LKCeLcHmvRt5w7HzRNs 1C7gu+DdEnTGcVGSMmOmG6QcduWqUpv2bD47vSZ68/DuCckD/wV/8qAvN5HXydwnNvq9 bQXJOVSwQ430EuekXcKP009Sf8eDP0SgIgMHFr+cI1iub2VdF4A3HeZAc0GB9XYlKFBZ JaNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026147; x=1697630947; 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=iLxWzsIb/h+CtHtFpC9R9DLEmU6wwVMInqduuyQJkso=; b=bKISHMQ4iI1ePTNMH7fbKtX6dyx9j+4yoKw5q8enbSEwRD8lKokj/6oVG3rqNy976e bf31VYjb0mKulo/Wqzm4SKaSGizovOVitzISbewSUpqL4SmazJO5RVse4vsZQBNmfU4V HSmtydNCwBqQmXiZpQbDx6c6/nEegazRTmJGKIvhnM/dl4qkg5V9uwLVjHXgzbFTzwkB 5dbH39yUrzcqJG037orDDTU6xsdTpqmJ3vrNWuNEgdlGH2nF/gDY3v4hPGPoeyz/Wn2Y 9DT9dmmH1Pq4joW9zGS/Z7yrt4t5gKzrE7kdgLkXplrozF3hlGgYryar4epobKvWp1qn prpQ== X-Gm-Message-State: AOJu0YzCHS/2km47h0mkj1HCQPmntrzYyUWemHQtk9zzo993Rkka4tIE k0cxCvKynv3i7PrlN9YamlIBjw== X-Google-Smtp-Source: AGHT+IEtAJtjs9TScDr6HPr7E5inr7CeT1vgsubwLxPnFk6lkyDnL+1vHi/sCFYaaT9ek5+PLRmoxQ== X-Received: by 2002:a7b:c4cb:0:b0:401:cb45:3fb8 with SMTP id g11-20020a7bc4cb000000b00401cb453fb8mr18579499wmk.38.1697026146967; Wed, 11 Oct 2023 05:09:06 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:06 -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 02/62] pinctrl: provide new GPIO-to-pinctrl glue helpers Date: Wed, 11 Oct 2023 14:07:30 +0200 Message-Id: <20231011120830.49324-3-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Currently the pinctrl GPIO helpers all take a number from the global GPIO numberspace - of which we're trying to get rid of as argument. These helpers are almost universally called from GPIOLIB driver callbacks which take a pointer to the backing gpio_chip and the controller-relative offset as arguments. Let's provide improved variants of these functions that match the GPIOLIB signatures as the first step in removing the older flavor. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 108 ++++++++++++++++++++++--------- include/linux/pinctrl/consumer.h | 46 +++++++++++++ 2 files changed, 125 insertions(+), 29 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 2bf95d8f30cc..13a6fa85c462 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -23,6 +23,8 @@ #include #include =20 +#include + #include #include #include @@ -781,14 +783,13 @@ bool pinctrl_gpio_can_use_line(unsigned gpio) } EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); =20 -/** - * pinctrl_gpio_request() - request a single pin to be used as GPIO - * @gpio: the GPIO pin number from the GPIO subsystem number space - * - * This function should *ONLY* be used from gpiolib-based GPIO drivers, - * as part of their gpio_request() semantics, platforms and individual dri= vers - * shall *NOT* request GPIO pins to be muxed in. - */ +bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et) +{ + return pinctrl_gpio_can_use_line(gc->base + offset); +} +EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line_new); + +/* This function is deprecated and will be removed. Don't use. */ int pinctrl_gpio_request(unsigned gpio) { struct pinctrl_dev *pctldev; @@ -817,13 +818,21 @@ int pinctrl_gpio_request(unsigned gpio) EXPORT_SYMBOL_GPL(pinctrl_gpio_request); =20 /** - * pinctrl_gpio_free() - free control on a single pin, currently used as G= PIO - * @gpio: the GPIO pin number from the GPIO subsystem number space + * pinctrl_gpio_request_new() - request a single pin to be used as GPIO + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller * * This function should *ONLY* be used from gpiolib-based GPIO drivers, - * as part of their gpio_free() semantics, platforms and individual drivers - * shall *NOT* request GPIO pins to be muxed out. + * as part of their gpio_request() semantics, platforms and individual dri= vers + * shall *NOT* request GPIO pins to be muxed in. */ +int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset) +{ + return pinctrl_gpio_request(gc->base + offset); +} +EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new); + +/* This function is deprecated and will be removed. Don't use. */ void pinctrl_gpio_free(unsigned gpio) { struct pinctrl_dev *pctldev; @@ -846,6 +855,21 @@ void pinctrl_gpio_free(unsigned gpio) } EXPORT_SYMBOL_GPL(pinctrl_gpio_free); =20 +/** + * pinctrl_gpio_free_new() - free control on a single pin, currently used = as GPIO + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller + * + * This function should *ONLY* be used from gpiolib-based GPIO drivers, + * as part of their gpio_request() semantics, platforms and individual dri= vers + * shall *NOT* request GPIO pins to be muxed in. + */ +void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset) +{ + return pinctrl_gpio_free(gc->base + offset); +} +EXPORT_SYMBOL_GPL(pinctrl_gpio_free_new); + static int pinctrl_gpio_direction(unsigned gpio, bool input) { struct pinctrl_dev *pctldev; @@ -869,14 +893,7 @@ static int pinctrl_gpio_direction(unsigned gpio, bool = input) return ret; } =20 -/** - * pinctrl_gpio_direction_input() - request a GPIO pin to go into input mo= de - * @gpio: the GPIO pin number from the GPIO subsystem number space - * - * This function should *ONLY* be used from gpiolib-based GPIO drivers, - * as part of their gpio_direction_input() semantics, platforms and indivi= dual - * drivers shall *NOT* touch pin control GPIO calls. - */ +/* This function is deprecated and will be removed. Don't use. */ int pinctrl_gpio_direction_input(unsigned gpio) { return pinctrl_gpio_direction(gpio, true); @@ -884,13 +901,21 @@ int pinctrl_gpio_direction_input(unsigned gpio) EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); =20 /** - * pinctrl_gpio_direction_output() - request a GPIO pin to go into output = mode - * @gpio: the GPIO pin number from the GPIO subsystem number space + * pinctrl_gpio_direction_input_new() - request a GPIO pin to go into inpu= t mode + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller * * This function should *ONLY* be used from gpiolib-based GPIO drivers, - * as part of their gpio_direction_output() semantics, platforms and indiv= idual + * as part of their gpio_direction_input() semantics, platforms and indivi= dual * drivers shall *NOT* touch pin control GPIO calls. */ +int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int of= fset) +{ + return pinctrl_gpio_direction_input(gc->base + offset); +} +EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input_new); + +/* This function is deprecated and will be removed. Don't use. */ int pinctrl_gpio_direction_output(unsigned gpio) { return pinctrl_gpio_direction(gpio, false); @@ -898,14 +923,22 @@ int pinctrl_gpio_direction_output(unsigned gpio) EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); =20 /** - * pinctrl_gpio_set_config() - Apply config to given GPIO pin - * @gpio: the GPIO pin number from the GPIO subsystem number space - * @config: the configuration to apply to the GPIO + * pinctrl_gpio_direction_output_new() - request a GPIO pin to go into out= put + * mode + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller * - * This function should *ONLY* be used from gpiolib-based GPIO drivers, if - * they need to call the underlying pin controller to change GPIO config - * (for example set debounce time). + * This function should *ONLY* be used from gpiolib-based GPIO drivers, + * as part of their gpio_direction_output() semantics, platforms and indiv= idual + * drivers shall *NOT* touch pin control GPIO calls. */ +int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int o= ffset) +{ + return pinctrl_gpio_direction_output(gc->base + offset); +} +EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output_new); + +/* This function is deprecated and will be removed. Don't use. */ int pinctrl_gpio_set_config(unsigned gpio, unsigned long config) { unsigned long configs[] =3D { config }; @@ -926,6 +959,23 @@ int pinctrl_gpio_set_config(unsigned gpio, unsigned lo= ng config) } EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config); =20 +/** + * pinctrl_gpio_set_config_new() - Apply config to given GPIO pin + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller + * @config: the configuration to apply to the GPIO + * + * This function should *ONLY* be used from gpiolib-based GPIO drivers, if + * they need to call the underlying pin controller to change GPIO config + * (for example set debounce time). + */ +int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, + unsigned long config) +{ + return pinctrl_gpio_set_config(gc->base + offset, config); +} +EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config_new); + static struct pinctrl_state *find_state(struct pinctrl *p, const char *name) { diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 22eef0a513ce..c95c13983376 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -17,6 +17,7 @@ #include =20 struct device; +struct gpio_chip; =20 /* This struct is private to the core and should be regarded as a cookie */ struct pinctrl; @@ -26,11 +27,20 @@ struct pinctrl_state; =20 /* External interface to pin control */ bool pinctrl_gpio_can_use_line(unsigned gpio); +bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et); int pinctrl_gpio_request(unsigned gpio); +int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); void pinctrl_gpio_free(unsigned gpio); +void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input(unsigned gpio); +int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, + unsigned int offset); int pinctrl_gpio_direction_output(unsigned gpio); +int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, + unsigned int offset); int pinctrl_gpio_set_config(unsigned gpio, unsigned long config); +int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, + unsigned long config); =20 struct pinctrl * __must_check pinctrl_get(struct device *dev); void pinctrl_put(struct pinctrl *p); @@ -68,30 +78,66 @@ static inline bool pinctrl_gpio_can_use_line(unsigned g= pio) return true; } =20 +static inline bool +pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset) +{ + return true; +} + static inline int pinctrl_gpio_request(unsigned gpio) { return 0; } =20 +static inline int +pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset) +{ + return 0; +} + static inline void pinctrl_gpio_free(unsigned gpio) { } =20 +static inline void +pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset) +{ +} + static inline int pinctrl_gpio_direction_input(unsigned gpio) { return 0; } =20 +static inline int +pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset) +{ + return 0; +} + static inline int pinctrl_gpio_direction_output(unsigned gpio) { return 0; } =20 +static inline int +pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offse= t) +{ + return 0; +} + static inline int pinctrl_gpio_set_config(unsigned gpio, unsigned long con= fig) { return 0; } =20 +static inline int +pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, + unsigned long config) +{ + return 0; +} + static inline struct pinctrl * __must_check pinctrl_get(struct device *dev) { return NULL; --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D688CD6E66 for ; Wed, 11 Oct 2023 12:09:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346729AbjJKMJW (ORCPT ); Wed, 11 Oct 2023 08:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346262AbjJKMJL (ORCPT ); Wed, 11 Oct 2023 08:09:11 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 712BB91 for ; Wed, 11 Oct 2023 05:09:10 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4075c58ac39so11613135e9.3 for ; Wed, 11 Oct 2023 05:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026149; x=1697630949; 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=icYrwF7jxGyZfxdkLAJd0y1aF4G3t/6nxjmVee2aWOo=; b=QCj+p0BXTT+x13Z5eQxTkd3UX2kN20ZRoTbj2ZaRx0Zn0s/UCiuQv9p5X/d/z7xjvf gq/3QrvYIdsuKDKB0VIuQIAYVRwFZszmmHP5hUmUfgtN3WOjfywAuMf9/6B/wgvQMLFB 1xUsEcOmk8ObqZ62wfkU2JAGjLwkdTUFQqxIOZp8BvXL5SnpNLiN4Bc/5JXUy68rZaiR IclxDZmc1qqNbLAUrraU7yH5dCCf5N97fuxaEfOMzGt0sKp3TVnZFXnbGWGTwNxq9k8G atWADmjeEWBldhb2bZAojm5G9Thqx9ZYRjHUiDY5vNHYap4YMOY46Uwt/mWXwjoKzit/ lAJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026149; x=1697630949; 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=icYrwF7jxGyZfxdkLAJd0y1aF4G3t/6nxjmVee2aWOo=; b=lpsjHiJErGNM/aZoeofE68SbnWApz4H7ZlJHlLn69y+W8HwUiu+HuPZYgl2xz48ta3 lBv11Ac3XGTXvinVKBWUye0CPCtF1Bay7Ikw9D1MpctDPd0w7/jPmYJtqYI0Yj4N/mnT g5gaASeqWI0COhi7xgqSmckeI0yAFrzDWKfxBR0hej3D9TGbWh/qhv8nbOWuj5kk8xPC ogznyuedBcPEg/3K8OxyxTC76Pg9ZMqyEnySeeBd6CvQSMHPUiOWuyVidbQK7+87geKd WpFugjbiwiTts2isKHXK4dlBelpWzJAfafcbwkpvz5iQAHvmoFg+AWq57+R4TgeOfHWu Yaqw== X-Gm-Message-State: AOJu0Yx9ycK/grghGdsEIXKb1tT8CJuEP5weDqMWlk543OSqd1b49sQS JFQJZpyzarGu881urH8JvqCgEw== X-Google-Smtp-Source: AGHT+IFlsXoqQLzoIPmN8CXaySIOAdUw53OnJt0grCR6gw56NYPwZUvj99/8z2/5Pd5y8iRqi/4amQ== X-Received: by 2002:a05:600c:4686:b0:405:95ae:4a94 with SMTP id p6-20020a05600c468600b0040595ae4a94mr17712597wmo.5.1697026148848; Wed, 11 Oct 2023 05:09:08 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:07 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Andy Shevchenko Subject: [PATCH v2 03/62] gpiolib: generic: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:31 +0200 Message-Id: <20231011120830.49324-4-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko --- drivers/gpio/gpiolib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 191f9c87b4d0..cec816b46679 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1965,7 +1965,7 @@ int gpiochip_generic_request(struct gpio_chip *gc, un= signed int offset) return 0; #endif =20 - return pinctrl_gpio_request(gc->gpiodev->base + offset); + return pinctrl_gpio_request_new(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_request); =20 @@ -1981,7 +1981,7 @@ void gpiochip_generic_free(struct gpio_chip *gc, unsi= gned int offset) return; #endif =20 - pinctrl_gpio_free(gc->gpiodev->base + offset); + pinctrl_gpio_free_new(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_free); =20 @@ -1994,7 +1994,7 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_free); int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset, unsigned long config) { - return pinctrl_gpio_set_config(gc->gpiodev->base + offset, config); + return pinctrl_gpio_set_config_new(gc, offset, config); } EXPORT_SYMBOL_GPL(gpiochip_generic_config); =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75851CD6E5D for ; Wed, 11 Oct 2023 12:09:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346733AbjJKMJ0 (ORCPT ); Wed, 11 Oct 2023 08:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346388AbjJKMJO (ORCPT ); Wed, 11 Oct 2023 08:09:14 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68605B9 for ; Wed, 11 Oct 2023 05:09:12 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50325ce89e9so8954634e87.0 for ; Wed, 11 Oct 2023 05:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026150; x=1697630950; 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=YhFi4LGhC2Y5nFrUut/uRJGJvyUMlfTO1AC2VY89hk8=; b=PTwW8Mm60bUz0lSdpHfx/ETkUHRkk6phf/AoBK71eH8GEtZTPihox/Gihy4VS1Ktfz M+gCKn/FR1CAQ4vOdBlirgve8PazA0KsjeLbkbaJccxt/INtOCSxmbsXMCFl4Wrnuix+ DxqVsSn8cTJ0HdlqaO/XbP0Yl24F2fEqeqvkJRNp54EFThVohCPcBgNDOU0baOCR4pKQ WrPzCNnzd5Z67G9Z1TGj7R8v/pfGdVfdpTxtRlAB+8IXXJnapwHX5CEjVnevfFt/acpE /6CaLDkqvqS+Z0RVy/ZvU2o+mAlyRItMSamEJDeRFgSa7IfyKt15NRZ/FjI2H7hu1e/z Q6mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026150; x=1697630950; 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=YhFi4LGhC2Y5nFrUut/uRJGJvyUMlfTO1AC2VY89hk8=; b=cFEXY3hLg0z7fbJGhF7I0BNmzBhadu5YnwIeCGBgKK3kBP/+n0tHNhWeV8E4TS4X2y YuRgIcUmWXW8N2ojx6qZapv9Woy23VFBGj2xNhsU1HBKTbUpYV2wBoNuHM92OjYpR7KQ L1AHJeF/XkRmQwkiSojQsijRrlbFHWk3A4vPi2Rshwh1ojmiu4YGINxe9yYvIrRsVtfE FBX7GGPLZfulcJ1lF9vYAoNNlT76NcaIQEm60RQwYZsIW1tPM+eqLD20YI0hO43u6M1u WcrPsbzT1U5s7WGQ8HdWdyc2izS9uOCN7Ks5gRhH9sXVQOfdZ1k735XnQz1rpSGQl/NC 8aGw== X-Gm-Message-State: AOJu0Ywf8/utfZFgVoEla69NF/K59Sc+ZrN/iSMEjcwntI9mFB/KDH/3 BzxP1AwEz+7Z87TwW15/i6TzAQ== X-Google-Smtp-Source: AGHT+IF3GfioFYS4wMF3LgWfKnAbfvrqUIRw86S7ZSZdwNNMjEgKLHTlQiBeUgJx+Vg4DbeSBVoTwQ== X-Received: by 2002:ac2:5e33:0:b0:502:9c4e:d46a with SMTP id o19-20020ac25e33000000b005029c4ed46amr12870722lfg.32.1697026150722; Wed, 11 Oct 2023 05:09:10 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:09 -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 04/62] gpio: cdev: use pinctrl_gpio_can_use_line_new() Date: Wed, 11 Oct 2023 14:07:32 +0200 Message-Id: <20231011120830.49324-5-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Use the improved variant of pinctrl_gpio_can_use_line() which takes a pointer to the gpio_chip and a controller-relative offset. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpiolib-cdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 31fc71a612c2..54ee075410db 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2287,8 +2287,7 @@ static void gpio_desc_to_lineinfo(struct gpio_desc *d= esc, * FIXME: find a non-racy way to retrieve this information. Maybe a * lock common to both frameworks? */ - ok_for_pinctrl =3D - pinctrl_gpio_can_use_line(gc->base + info->offset); + ok_for_pinctrl =3D pinctrl_gpio_can_use_line_new(gc, info->offset); =20 spin_lock_irqsave(&gpio_lock, flags); =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE532CD6E5D for ; Wed, 11 Oct 2023 12:09:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346759AbjJKMJb (ORCPT ); Wed, 11 Oct 2023 08:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346435AbjJKMJR (ORCPT ); Wed, 11 Oct 2023 08:09:17 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72FB4C4 for ; Wed, 11 Oct 2023 05:09:13 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-406650da82bso62485455e9.3 for ; Wed, 11 Oct 2023 05:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026152; x=1697630952; 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=Vai4SzqfuocTRSn5ctHCW9VKMc1EsxJBBmmicKiWbek=; b=TpHzBOHTymNcvYqnbCWsDabg+07Xf6uwN5F3O3XB7B632nBO3kCBwO0YsxCz4aEH7M HoVsx1UcQMEMhWkK7egemT8MADylGDTgDZax0TNd9hSCkN+Jkakeiym66NSnhGsQqLTN ZePibBVwzhSk0VqgWAxqqVI+SHbyTUHH9lkV9ttziUHGT822PA0eyIWTyvOjoySgFwU9 2DZrHWGJg9KV3KPw0rcj1Pjz3bsLQ6TOoD/sSze8KoHi8FP3xy0q6tacbVUevPFdPvUw GZQJN0AJoZcG9fwSvn6ptzDDt0Og5LRL46Djl9ffz1r6HqSEmBsNnSk7DQnnY2VvPQBt hNCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026152; x=1697630952; 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=Vai4SzqfuocTRSn5ctHCW9VKMc1EsxJBBmmicKiWbek=; b=SKlVK12V7mZnU5wrW8/mjUqvhn++qVlujc0ea/2qURzmun1ff1rPWbutX7i/8YdKom ya86Pn4bnoRzWXiWtQLwNtuttyDWwPrWPKSS7EBhBHsvLC5F0Qcwzm9eAEcvtDdUyyPq GKeRvbjAXvdS1vbFK/utXrmso3RM1n0Zd/Vch0cqNp9wxHLI3xhnw7VdpBfyUwulCZMU WPm0MN/6cv8n9Aa3M0x5Nhr4tC6PK7WM0z393tsL5ZMicS8qGRZ3ijko34tx3Xm8Z9ej icuw6gZxvSYKVe+a6wv+ESuHYiQciifaYAuPbIlVHERxNlHqzLrvQRZPng1egP3VY5mt ZqkQ== X-Gm-Message-State: AOJu0YxuI++Bk0/52UnW73MXO9+6acUNHHUnFErALUq00XOyx3tkOgPM jcUfrf/5YWv6N/G236sonFUAJQ== X-Google-Smtp-Source: AGHT+IG4secTPx2RYuqCpSfRRv6WpUeZcDQ8N8dt7eCfNidfkxiCHWBBwl0E2KRzdhm2tsIk7gaerQ== X-Received: by 2002:a1c:ed02:0:b0:401:38dc:891c with SMTP id l2-20020a1ced02000000b0040138dc891cmr17830274wmh.5.1697026151804; Wed, 11 Oct 2023 05:09:11 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:11 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Geert Uytterhoeven Subject: [PATCH v2 05/62] gpio: rcar: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:33 +0200 Message-Id: <20231011120830.49324-6-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index d8b1baae6357..47121e1a6d4e 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -275,7 +275,7 @@ static int gpio_rcar_request(struct gpio_chip *chip, un= signed offset) return error; } =20 - error =3D pinctrl_gpio_request(chip->base + offset); + error =3D pinctrl_gpio_request_new(chip, offset); if (error) pm_runtime_put(p->dev); =20 @@ -286,7 +286,7 @@ static void gpio_rcar_free(struct gpio_chip *chip, unsi= gned offset) { struct gpio_rcar_priv *p =3D gpiochip_get_data(chip); =20 - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); =20 /* * Set the GPIO as an input to ensure that the next GPIO request won't --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3E4FCD6E5D for ; Wed, 11 Oct 2023 12:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346786AbjJKMJj (ORCPT ); Wed, 11 Oct 2023 08:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346387AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A942B7 for ; Wed, 11 Oct 2023 05:09:14 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-406618d0992so65240665e9.0 for ; Wed, 11 Oct 2023 05:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026153; x=1697630953; 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=PJlcPxZYJ+2xOtgJ5lT3aANbc/q/A7LyEHQjQgc784Q=; b=mfKRNXwqSKH+2YHokj16KJld4cVsvnY0UhCgpiBBqXKh0JyD9Fy4hwnGDeVccdoMa2 BbBR9uPxxebavQWK/L46oLyrpdQD98xj3AQ4aN2vKvE7fwFMxqZhTyGmPOwhFu6ir0vS XS8BsRp8vBP/w6EQa9XgTREmZH4coO6ZD5JJ+Kxj2jIV0hK6kU/Dl8e2jtmbA/t9FiWV tS+MDxFGzNsYPo8slzm+eD60eBAQS986yOmeyO08eUwls70MbldDWKjuWMlNDxwSQTZ5 g3P0B3L9fUvxON/Vz9b3OGhRL+k7v8FvQQGanMVqSmqBx4nlA2NmxYT1Z8Pl8iWAQN21 +6Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026153; x=1697630953; 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=PJlcPxZYJ+2xOtgJ5lT3aANbc/q/A7LyEHQjQgc784Q=; b=b2I9Fa22wuNGLSGkb4bxulmxdXS0FVWW/zHVgPBSI365xMDrqKphe/lr8mM+zofo35 +U6Ge8F5A6HDFhRVcYUGf5o5VlhRT6LpAGLFOieryHnG5xVkMDgfrlGirKScoUSzXItc RfprSigkiypdrUOfoS4i6x2LrzC2izpKweGt92NPBpU3DYbyCNi/Gai8l/rJV9dnUOK2 SJKSaN2MIuGtZ6PvzP23USWk7Uuq9DqCQGOpKMjuZTofp39c9uIKenwWVBZnHKND6AR6 w7XDuS21Ifmc6xq50kCRRkfMqYyWU4OPTNiWhVW+BoPiDt796NO5fjCg+QHCdigfZH6r bsxg== X-Gm-Message-State: AOJu0YzMcjwni8wMF4MOKDS3BC055SSMzZyDZq7ZZwmu4JD8dgw5USeN EuiAKpuFVOF4b1OAgrhmCo7LGg== X-Google-Smtp-Source: AGHT+IGd8u3EUxeSQhN/iBNTJNso3uP64x7DOIOqfn+png+3prvah4wSyH4OmjcFAz6zQK5rRN5WBw== X-Received: by 2002:a7b:cb89:0:b0:3fe:15f0:dfbc with SMTP id m9-20020a7bcb89000000b003fe15f0dfbcmr18927550wmi.12.1697026152784; Wed, 11 Oct 2023 05:09:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:12 -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 06/62] gpio: tegra: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:34 +0200 Message-Id: <20231011120830.49324-7-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-tegra.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index ea715582bcf3..08951ddcd294 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -139,14 +139,14 @@ static void tegra_gpio_disable(struct tegra_gpio_info= *tgi, unsigned int gpio) =20 static int tegra_gpio_request(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } =20 static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset) { struct tegra_gpio_info *tgi =3D gpiochip_get_data(chip); =20 - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); tegra_gpio_disable(tgi, offset); } =20 @@ -179,7 +179,7 @@ static int tegra_gpio_direction_input(struct gpio_chip = *chip, tegra_gpio_mask_write(tgi, GPIO_MSK_OE(tgi, offset), offset, 0); tegra_gpio_enable(tgi, offset); =20 - ret =3D pinctrl_gpio_direction_input(chip->base + offset); + ret =3D pinctrl_gpio_direction_input_new(chip, offset); if (ret < 0) dev_err(tgi->dev, "Failed to set pinctrl input direction of GPIO %d: %d", @@ -199,7 +199,7 @@ static int tegra_gpio_direction_output(struct gpio_chip= *chip, tegra_gpio_mask_write(tgi, GPIO_MSK_OE(tgi, offset), offset, 1); tegra_gpio_enable(tgi, offset); =20 - ret =3D pinctrl_gpio_direction_output(chip->base + offset); + ret =3D pinctrl_gpio_direction_output_new(chip, offset); if (ret < 0) dev_err(tgi->dev, "Failed to set pinctrl output direction of GPIO %d: %d", --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1E3ACD6E5D for ; Wed, 11 Oct 2023 12:09:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346321AbjJKMJn (ORCPT ); Wed, 11 Oct 2023 08:09:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346586AbjJKMJT (ORCPT ); Wed, 11 Oct 2023 08:09:19 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4EECCC for ; Wed, 11 Oct 2023 05:09:15 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-406619b53caso63173265e9.1 for ; Wed, 11 Oct 2023 05:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026154; x=1697630954; 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=H58FBovONkBFAtGhn37zN4A9drmVE/E2kcDVb0X5d1o=; b=0U3hJGxiWhuLvCZY3jznpY1Nwgyz6y4Tpefj/Ktb6OJHAfkQvsLIz+rr2+IW6MljkM d0qaUqXstYoozHHjGo7CAf+jFPvDw2ezPcWqSdj8YYjz1TzRy/JmxBUza2BW9rafC1v7 R75qM9FttYdrea9BbQiR2QILksqinhf0ROLEd5L2/UYcUU5e1Rsn3tP04ux4d8bsPYW1 OQfrNdbkZ+bMdvP9Vee00o4Fqc36K0EMOQN6NLStgTcSAX2j6PH/8Is9HEnZmUFhmstK MtwAo3v4Ebhz+QTH5Xezd5eiRibi+I9RkK1JqAGmMxswth9L8cGNKgyCFTB3Iq+k6H25 eo3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026154; x=1697630954; 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=H58FBovONkBFAtGhn37zN4A9drmVE/E2kcDVb0X5d1o=; b=RRjhPS2ssQ4XnPordS+sC/cSnk5y4ZbYr1j9/EN/LpGGJpwvmW/pt9oh8ewS8POR48 qzle4H8SYwMecZP9n/jSpXcpv3bGJAHqZh8cWa0aoVVxlDmpLeFqBUQUmxjOjgk0Pyao IdMzLMqvUdJMczuwijV7jvjCpq8reBVMOjblipxwSbmIf/FB399pGyG5BQCtGdhjybVF n/pwIxhMo2Q/4kTfjuAXCzz8b/veoIb8JBVbt1eTtrzyidrEnLv2774zn3dedk5KfqKD tQmJO4qO/Tc8SGAU5jf+hCwTsb3uLCI2UvIZlsGnNVt/VUsy50yXzdVD97JaHw4ubqlw EEcw== X-Gm-Message-State: AOJu0YyjcwSNEqV1q6RUP9MGRT3vioI/OJr2sLNj+h1qiEfP6i4MacEz pme1B22OO+HnB5eCdLRriMiWcg== X-Google-Smtp-Source: AGHT+IGdU+vkiUUKNqQCdOc2K8eQn7rHIkiGKf5eZXPc2b7Nj7v9h8wdWNI/uJnMxS3QrR6ZI6xjpQ== X-Received: by 2002:a7b:cb8b:0:b0:3fb:e189:3532 with SMTP id m11-20020a7bcb8b000000b003fbe1893532mr18369038wmi.20.1697026153724; Wed, 11 Oct 2023 05:09:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:13 -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 07/62] gpio: em: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:35 +0200 Message-Id: <20231011120830.49324-8-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 858e6ebbb584..35c65ff43f71 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -229,12 +229,12 @@ static int em_gio_to_irq(struct gpio_chip *chip, unsi= gned offset) =20 static int em_gio_request(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } =20 static void em_gio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); =20 /* Set the GPIO as an input to ensure that the next GPIO request won't * drive the GPIO pin as an output. --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88991CD6E5D for ; Wed, 11 Oct 2023 12:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346778AbjJKMJe (ORCPT ); Wed, 11 Oct 2023 08:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346581AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 562F1AF for ; Wed, 11 Oct 2023 05:09:16 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2bffc55af02so80541821fa.2 for ; Wed, 11 Oct 2023 05:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026154; x=1697630954; 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=XfWYSE8ThvfQSJQ9/Fq2M/H6j3nV1pBrLUi6/wp2wmg=; b=tzFX/is9VS1PymKIzrZiv/FgNTtMCukISseTFFjMgX8/+RkW+p0J3HA13/hO7WHGAm NRbhIzKa+KqaEzinW1fJKO8J2iwIrl0JtY9KVqksELDFS+lhWbo/rM+C0iIPmBfrvGJ/ DuigJLpqvoqEbH0qqubQkY9EF8xLydZKRuPa4TRDyDr9RRUJgRero0FlvBYTYA0QlNKe LR7kJ1uUKSJpqP0UZMn3b4t4cnoBJg9vW1ggJhRPMZkOyDZWpn4K78Mr4BBzCW43sXjK 91IgFD4j40zwO5xyQDkIriT4vEZt3rtiZgh6GYOREfDaHgmAZlxusmijgD6+GRmdQW5t nlfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026154; x=1697630954; 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=XfWYSE8ThvfQSJQ9/Fq2M/H6j3nV1pBrLUi6/wp2wmg=; b=DnGRVuPEsinLrTkhu9pkXySdr5HRHR7OStr7wS4nRihXvT3Oj2fnd9ujRIW8VW8wzb mjeKWsF379vkSS8vEhO172WuDr1yfJUqDyxrT0ROUATmt+2u0v2lmbnbHuTU+8A6DobH nt/kJzo/1IQUTmMIbtTiPCwanW9Mgj1Ws4j2PYk7ww06q2dRsCbDICA/VCMWveLAOdnO W2z6L98Wpwr5alMLY2mlMzMvIeYTljp7JBjOolvU19mkVQ5Kkep/tAYY289zQDRrksF9 kktgXdxvgIUrKagP7tJU3ovFdRENz2IPUx7rDTPdc+yFodPyG3tOzhwHRF3cnfj7ViJJ 5zDw== X-Gm-Message-State: AOJu0YwurziCtrCHMRFamXbdKMg0BPL/j9/5dUw6i32zYkd3nwXeYIJ1 jY9tRDBVVpGUNCXkL0RdBnYPYA== X-Google-Smtp-Source: AGHT+IEZWqkFOSiHfQttc06r8Pg7H6JvB/CJxt/WCg1zCQDClW6HVyW+fiMET9eKmPPIs1YIG4NNAg== X-Received: by 2002:a2e:9f07:0:b0:2bc:fdec:a3f6 with SMTP id u7-20020a2e9f07000000b002bcfdeca3f6mr17612215ljk.48.1697026154618; Wed, 11 Oct 2023 05:09:14 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:14 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Andrew Jeffery , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v2 08/62] gpio: aspeed: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:36 +0200 Message-Id: <20231011120830.49324-9-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Andrew Jeffery Acked-by: Uwe Kleine-K=C3=B6nig Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-aspeed.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index 58f107194fda..d3aa1cfd4ace 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -750,12 +750,12 @@ static int aspeed_gpio_request(struct gpio_chip *chip= , unsigned int offset) if (!have_gpio(gpiochip_get_data(chip), offset)) return -ENODEV; =20 - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } =20 static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); } =20 static int usecs_to_cycles(struct aspeed_gpio *gpio, unsigned long usecs, @@ -973,7 +973,7 @@ static int aspeed_gpio_set_config(struct gpio_chip *chi= p, unsigned int offset, else if (param =3D=3D PIN_CONFIG_BIAS_DISABLE || param =3D=3D PIN_CONFIG_BIAS_PULL_DOWN || param =3D=3D PIN_CONFIG_DRIVE_STRENGTH) - return pinctrl_gpio_set_config(chip->base + offset, config); + return pinctrl_gpio_set_config_new(chip, offset, config); else if (param =3D=3D PIN_CONFIG_DRIVE_OPEN_DRAIN || param =3D=3D PIN_CONFIG_DRIVE_OPEN_SOURCE) /* Return -ENOTSUPP to trigger emulation, as per datasheet */ --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C03ACD6E5D for ; Wed, 11 Oct 2023 12:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346740AbjJKMJv (ORCPT ); Wed, 11 Oct 2023 08:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346626AbjJKMJT (ORCPT ); Wed, 11 Oct 2023 08:09:19 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22C5F91 for ; Wed, 11 Oct 2023 05:09:17 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-405417465aaso64888165e9.1 for ; Wed, 11 Oct 2023 05:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026155; x=1697630955; 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=HHYUxdKvRRrRVIPNu6faP+9JX1VoSOdz9zilghn0NZE=; b=VTgj27QwHi0NqaYQ400IzTTHqwpk+jo8AkG59RHLJVrES/qn+5nO0VR9rOOPtcw3gp V+XpmO/Jep5HGvUXT0qnEGQChSVXJiKYOC7kW9+YTWjoYk8ascqOEIUAwpWLK/EZfvtn Zo3VxIpNJqq5VOGk5WNd1q6On1fFjrF/fybjgfvieQyJ17SS4xyfq0LOTom0TR9x3ABk uzFt0k12tdly9chetE66YGdvH+KJAYCoEv8ygKFKkEWa7cfk4xPQa9dhNh0q8chIMVaX bA2StM7PA8m8+uMNj6f3BQeVo/Ed1IZoCM4VRsEDeChwAfk+EcM5Lf+9kBxDPfjy4EgQ KE+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026155; x=1697630955; 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=HHYUxdKvRRrRVIPNu6faP+9JX1VoSOdz9zilghn0NZE=; b=Cwr5+DqworxjObACnfLytWAOUCLB7aQs8IaNIvA8EuZmJMcMh+OBGv6mSe57/T58Ua ToXwLZk5a+Mapr25Y5tbNzAvTYs4KOQDat96qha9GAVBArirbvZTRX/7OuLraYHWoUhs xa8vCz9mDqR9EcnLm5UQZpGRoD4JLZVQOfpu6GZgxcdFtxGy2Wp+/h8pK1JNi7nrVCYe 5B1j50bEEoOfo2zXL+eRPkK8GHr7fnzjKM4Wy135bck44WSMbOQsZ8VF4pz9OhU0/RPe +u2TAjuARd8fTE2yiw/ofJKcGVSJw1vpBGKFlOfU8s9b8lH+PuffR7QcEzoEt2qxJn66 aNZQ== X-Gm-Message-State: AOJu0YwBPSrWpVVIQyCqoMWh/33RwGntAcmTHrhQBDbR2JMN948XjQao /58rTjlrTOspnTUpbdYvlnNziQ== X-Google-Smtp-Source: AGHT+IEEnuCLIHwoNV8TUUhx7VIfUqzxzC9qENpIxGm4GdINwA/xpTWHqV+OXqtUhkBp66PCIkgrTw== X-Received: by 2002:a05:600c:207:b0:405:1c19:476d with SMTP id 7-20020a05600c020700b004051c19476dmr17931892wmi.39.1697026155503; Wed, 11 Oct 2023 05:09:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:15 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v2 09/62] gpio: mvebu: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:37 +0200 Message-Id: <20231011120830.49324-10-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Uwe Kleine-K=C3=B6nig Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-mvebu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 8f80ca8ec1ed..d7eae6f0430d 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -346,7 +346,7 @@ static int mvebu_gpio_direction_input(struct gpio_chip = *chip, unsigned int pin) * Check with the pinctrl driver whether this pin is usable as * an input GPIO */ - ret =3D pinctrl_gpio_direction_input(chip->base + pin); + ret =3D pinctrl_gpio_direction_input_new(chip, pin); if (ret) return ret; =20 @@ -366,7 +366,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip= *chip, unsigned int pin, * Check with the pinctrl driver whether this pin is usable as * an output GPIO */ - ret =3D pinctrl_gpio_direction_output(chip->base + pin); + ret =3D pinctrl_gpio_direction_output_new(chip, pin); if (ret) return ret; =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4A0ACD6E60 for ; Wed, 11 Oct 2023 12:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346807AbjJKMJs (ORCPT ); Wed, 11 Oct 2023 08:09:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346472AbjJKMJU (ORCPT ); Wed, 11 Oct 2023 08:09: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 CD0049E for ; Wed, 11 Oct 2023 05:09:17 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4064876e8b8so66731965e9.0 for ; Wed, 11 Oct 2023 05:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026156; x=1697630956; 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=n2xq1c7gkK7UBvFiiWYtPT4/dVB/RGOfCXDnH3L0uQ8=; b=Rn8Y2RgtcJbL2C2I9uXAMDRjbwn4rxH3cudydrpFBWpho07nFQ+P1pylpd4gc4so/f 1e9SULpX+ttcw4qR1pv/9imewdtyRX5Es+cdsYotoCo/6GDXL3Kft0N0juMoVGpLOVmJ ZSF1qjpFhNB/UmRh40a4A4W1NdZzg3+6tm/sMcyWtYfIbzbEGyuUC+GLo5N2I6St9d63 nH/o57BJ7EziL6hJCYyDiyXCwgggUO7QaucKpUDdc5E6602T6amQcrUNyTtW1OMFV7pI oiSO2oWkQ0U5OCICejnIu6IR8ND6jrM4vUpYWxNv90YcaGaPO3DmU0bdH6rF4r6w9qu+ iX9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026156; x=1697630956; 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=n2xq1c7gkK7UBvFiiWYtPT4/dVB/RGOfCXDnH3L0uQ8=; b=tueTDpapC2+kQr16D5WekFHI/PkzulClYvLUubRNsPT5/9/nX9w2Vjdrmsm4IMKXTO B7fVEHqYr3hT+DA3WnC70ZETk743UWB+q7SjH4q3ZPWzgNDt5p7iKfga92lhtrfkz+/C 12sZvmsv3bJAub0crD+dC77eGnJarS/W7ovnwu7lSNAtFzBfi0I7qhJdw9bileJVdOxJ aMRlLDzfXjLT+ebLv5diP5xhdD5SV6w6GYA9PLsJIARofBIV19f/4tquIj2jLVA5vNpS gbZnW/qlU6acogcCAqYJfiNdQFBshe65HXtoZWwTrqYEWLM/mh6DKd6hxMoOjHGXw5nl aKJg== X-Gm-Message-State: AOJu0YwRSXcOtDjoC3mEbMe1lP1hIt/o6fRa4VoDlvwibUXaMKlvtClQ eSyuiTA+ebikHs7RaMVJkOXKJYZMizA7JEI13Nc= X-Google-Smtp-Source: AGHT+IEUv7780Bb/M1E5t39GEOcJn9PrfZyeunC1d2U0v9ISn/OQc0ss3KsB9U4S55tZwAPSeDXpLw== X-Received: by 2002:a1c:7909:0:b0:405:36d7:4579 with SMTP id l9-20020a1c7909000000b0040536d74579mr17252432wme.28.1697026156295; Wed, 11 Oct 2023 05:09:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:15 -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 10/62] gpio: pxa: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:38 +0200 Message-Id: <20231011120830.49324-11-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-pxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index cae9661862fe..2fd797b91270 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -260,7 +260,7 @@ static int pxa_gpio_direction_input(struct gpio_chip *c= hip, unsigned offset) int ret; =20 if (pxa_gpio_has_pinctrl()) { - ret =3D pinctrl_gpio_direction_input(chip->base + offset); + ret =3D pinctrl_gpio_direction_input_new(chip, offset); if (ret) return ret; } @@ -289,7 +289,7 @@ static int pxa_gpio_direction_output(struct gpio_chip *= chip, writel_relaxed(mask, base + (value ? GPSR_OFFSET : GPCR_OFFSET)); =20 if (pxa_gpio_has_pinctrl()) { - ret =3D pinctrl_gpio_direction_output(chip->base + offset); + ret =3D pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; } --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FE35CD6E5D for ; Wed, 11 Oct 2023 12:10:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346712AbjJKMKB (ORCPT ); Wed, 11 Oct 2023 08:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346722AbjJKMJV (ORCPT ); Wed, 11 Oct 2023 08:09:21 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33BE3E3 for ; Wed, 11 Oct 2023 05:09:18 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40566f89f6eso68955165e9.3 for ; Wed, 11 Oct 2023 05:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026157; x=1697630957; 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=Rjj2L8rLah6r0INEUdpiOGWMpBQyEZBDFUolDbEZ0p0=; b=IfFJ4QcCycmvpK6hYeK4jU5y/G4/whwCWX0MOMywer2z+WOd6L1VBIuDhqgQjx5yDd 5mflkF8cs1ql1ovCAbOwTs4cb/SWEB2+hFM2ceS4c6pi+8MWdi14WRAl8F1i39SNXrHe xDBYQ8Qu8EjWg4FOfjNp5oVGAwyZRm6u2JDgUqQ6Ku9WVob7DHyBIhVVeev1/pHaKY+7 BF4RLQGv3wvE4dVYue2qqpN62mxmGMYP06L4Z1RBmoPkixTj839Ny+QKmCICnnaLxz81 HKVU9iS6O1RO1o/ePvkPWwctS1aF951VRmAjs6+cEYPiRbw7V49lUp09Pb4u8Ha7ij4k UUIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026157; x=1697630957; 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=Rjj2L8rLah6r0INEUdpiOGWMpBQyEZBDFUolDbEZ0p0=; b=W36FZwuEWr+c9bnI04QdLIoNu8+fImZNhwevNtFsRwbTymnamp6epI/xdG1qjFPzNU J/S/P5yvdPeFwK5S9CFI41kUSMfOGa3hqNFf3le49U750qQfJLWMsC9empfYWzWjV4e8 /AelTLpch9AJQlVZQ10cmprDLRcFwkAKzLEGogNdKjy5CpNqApHAzYb4clUJWiRUGCkG 9Z6xrCZvZYSAJPk4mGkdS6mGnlFzH4BjDaBFXGf5k544j801lhSG4m9BYC+pgRUx5auq JqcZEtE9t1lInMuoB+++VNCOxllMgDuswKq9RCIUZOKCsgANI50jygGwck8njbBAL039 owyg== X-Gm-Message-State: AOJu0YxqChMX6PEcTfyKa/8xFUS6BgK0bVVdJHNfgHaZX+/rY6ntbVKg r28XVxoc6KflM1N5Wrmn9hW9Dg== X-Google-Smtp-Source: AGHT+IFtN5q9/Ut2tEc5WlhMBZUZWAnpAhcXhtOqB4VVSE/NA7KEd93NNfT9rKiDuCKdtmgesKepiQ== X-Received: by 2002:a1c:6a18:0:b0:405:4a78:a892 with SMTP id f24-20020a1c6a18000000b004054a78a892mr17742588wmc.9.1697026157253; Wed, 11 Oct 2023 05:09:17 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:16 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Heiko Stuebner Subject: [PATCH v2 11/62] gpio: rockchip: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:39 +0200 Message-Id: <20231011120830.49324-12-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Heiko Stuebner Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 23040a8cea34..3576793f0bd9 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -159,9 +159,9 @@ static int rockchip_gpio_set_direction(struct gpio_chip= *chip, =20 =20 if (input) - pinctrl_gpio_direction_input(bank->pin_base + offset); + pinctrl_gpio_direction_input_new(chip, offset); else - pinctrl_gpio_direction_output(bank->pin_base + offset); + pinctrl_gpio_direction_output_new(chip, offset); =20 raw_spin_lock_irqsave(&bank->slock, flags); rockchip_gpio_writel_bit(bank, offset, data, bank->gpio_regs->port_ddr); --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D8B0CD6E61 for ; Wed, 11 Oct 2023 12:10:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346850AbjJKMKC (ORCPT ); Wed, 11 Oct 2023 08:10:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346262AbjJKMJX (ORCPT ); Wed, 11 Oct 2023 08:09:23 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EB3EC4 for ; Wed, 11 Oct 2023 05:09:19 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4054496bde3so62403535e9.1 for ; Wed, 11 Oct 2023 05:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026158; x=1697630958; 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=NRDXdsqovOpFqQlW6NMXq89oYY2ugyvGcK/dIwIm0sQ=; b=UPnXTD/7c9tOO31qKINhHLOWX5Prpy71smepplCKhsUzHNziM0U/kPl1BrvJFPUG/L A0wnAA80ZUQ6T0hYH8SuyAHh7UFhtJO7WG6gnUM8zezHvOsCvckOXFLwPm40EaCZAVg+ odv9dAAkBN5tauuBBXdHboLFhdLoglt12VpfCDF0ow01flW7irLbCTAdXG/7fseg5Q/p EWDC0pDryQBJRd4odXNqvk1BFzR3qGopPdlu3S5DKZGW6y39bFspXVs734g1dBp8kbLs dJm3nwPYKgZuMU/jZy9HAXw0QuAOkW9XiCiB6b9ooAKXrgbrIu3PHoQvlA2Fb7PHpfdh hxlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026158; x=1697630958; 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=NRDXdsqovOpFqQlW6NMXq89oYY2ugyvGcK/dIwIm0sQ=; b=WxC8PFxVCJoq3c+RGKqCWXiRp5a8fkvpz/e1EPVolFw7n2QAQQWkpQ1mHPnoQVZYwJ +xSLQlzUopBEUA9azJQeGUjOLX7CXEjjD7P+Ez5GYxC3jsNCFnvkgDk3uoX6uc/yZtPc RBm7nkj5ywJYfdhUoupCgC2phZSIZGX/cp6jkCAKDBbe0D6hnEBI/bD3vhEdaex0IglE G1xmN9tlB0ydLVMhKtSGftX3UhmNzqMWtXarqRNv1nPRQ+1hivp02aOprE7v7ZrSZMJ1 QZFyMSs0Z6Cq21iJxd2rzr8vFwCRss5Eu93YkKxjcuFiVJ4K8YQotkpVQV/4PAMhqxBv U0kg== X-Gm-Message-State: AOJu0Yz2U3rNbvXHXI3aE1rXONzUm6KwyhCPo4LW5hYXrqKjG9mP42cg Wkm8LcFgP59URGCtX4WKOZE3bDdwGlXHx8OG8m4= X-Google-Smtp-Source: AGHT+IFZ3d0u7bOJtYq5KPYt8ncSU+QNWHTg5cFjwoYBWBJzOT55bA3xsHFpiGSd4RURay4BlBm/LA== X-Received: by 2002:a7b:c451:0:b0:401:aa8f:7562 with SMTP id l17-20020a7bc451000000b00401aa8f7562mr19291200wmi.11.1697026158099; 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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:17 -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 12/62] gpio: vf610: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:40 +0200 Message-Id: <20231011120830.49324-13-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-vf610.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index a89ae84a1fa0..2c22a31ffbdc 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -130,7 +130,7 @@ static int vf610_gpio_direction_input(struct gpio_chip = *chip, unsigned gpio) vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR); } =20 - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } =20 static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gp= io, @@ -148,7 +148,7 @@ static int vf610_gpio_direction_output(struct gpio_chip= *chip, unsigned gpio, =20 vf610_gpio_set(chip, gpio, value); =20 - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } =20 static void vf610_gpio_irq_handler(struct irq_desc *desc) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FCDCCD6E60 for ; Wed, 11 Oct 2023 12:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234925AbjJKMKF (ORCPT ); Wed, 11 Oct 2023 08:10:05 -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-Google-Smtp-Source: AGHT+IFPwvD7l0Q28mPezig2fI7XmnEslb/COLkFqUN9cMZV99oxKddRGq+vSalkycgSAEACAmVjaw== 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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- 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/nu= voton/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 *c= hip, unsigned int offset) struct npcm7xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_direction_input(offset + chip->base); + ret =3D pinctrl_gpio_direction_input_new(chip, offset); if (ret) return ret; =20 @@ -188,7 +188,7 @@ static int npcmgpio_direction_output(struct gpio_chip *= chip, dev_dbg(chip->parent, "gpio_direction_output: offset%d =3D %x\n", offset, value); =20 - ret =3D pinctrl_gpio_direction_output(offset + chip->base); + ret =3D pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; =20 @@ -201,7 +201,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip= , unsigned int offset) int ret; =20 dev_dbg(chip->parent, "gpio_request: offset%d\n", offset); - ret =3D pinctrl_gpio_request(offset + chip->base); + ret =3D pinctrl_gpio_request_new(chip, offset); if (ret) return ret; =20 @@ -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); } =20 static void npcmgpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nu= voton/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 *c= hip, unsigned int offset) struct npcm8xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_direction_input(offset + chip->base); + ret =3D pinctrl_gpio_direction_input_new(chip, offset); if (ret) return ret; =20 @@ -186,7 +186,7 @@ static int npcmgpio_direction_output(struct gpio_chip *= chip, struct npcm8xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_direction_output(offset + chip->base); + ret =3D pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; =20 @@ -198,7 +198,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip= , unsigned int offset) struct npcm8xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_request(offset + chip->base); + ret =3D pinctrl_gpio_request_new(chip, offset); if (ret) return ret; =20 @@ -207,7 +207,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip= , unsigned int offset) =20 static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free(offset + chip->base); + pinctrl_gpio_free_new(chip, offset); } =20 static void npcmgpio_irq_handler(struct irq_desc *desc) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBF7ECD6E5D for ; Wed, 11 Oct 2023 12:10:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346763AbjJKMKK (ORCPT ); Wed, 11 Oct 2023 08:10:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346744AbjJKMJ1 (ORCPT ); Wed, 11 Oct 2023 08:09:27 -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 E5995CC for ; Wed, 11 Oct 2023 05:09:21 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4056ce55e7eso63198185e9.2 for ; Wed, 11 Oct 2023 05:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026160; x=1697630960; 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=ta+JXTCEvoYCkfYdZVmNUE+yvh6PoUsZ4OUodo3JS+4=; b=BH/7WiHvr7wrBRUUCxrIAZHfT+/Lej5zcolC9NWcnu+RH9X2FJWXfeeykdBSWG0wce ERcSJ0L3YSdblc9GftMXcPvzeemgVC+P4vzwR431x90RZj77pPcOWHKG9/i0qoyWM5k9 pJzPqSPur26HyPPzGHx5gMc2pQBx/Oz+iHrDtToVpGZfa5gZVxWbL2IlxBVw/eBBV9jz 9kfHZDU8qmME+cnRYcjOTzj14wiUe8tACwMoBS3lTw4yZZE1KUzmxDy/jdkQIIZ0eVLG fvaPpkH04okIPHwK5/szFZTTGUtNcdCvL7XIIfqeNCPFmfzoFquMlSCnJt1rs7t2AKlj 6Hmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026160; x=1697630960; 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=ta+JXTCEvoYCkfYdZVmNUE+yvh6PoUsZ4OUodo3JS+4=; b=LRQhTRnyk+eQFaxLJVVlsrD/wW0dEKjySHoiO0AayFajXXhKNVVbeo/yD31EAX6ODJ AqXMdvG/yW+rsBAEdP2+UHbvcqb75KtPRIQDZS3sCwkonYoPPb/CCLwo+3/ZpLmt/U45 tYzqiO08qRfIK/OAXqBIl2RGrEjNHB3DF80X9k/m2rP+srQDguaxNBa7UrvxmaR6TdWD xz72ZuTqHBehYG+wNjLuPcmt4tisToo0sZaEZvahac80w7yPDWEk4uCZV+hFSIC0P0pP dwXM5xd1em1qqPQ4rtgiyuKF4DmSSsg7w+6B7afB7GqWKLuWWlI4fimVg/WIxV14qPtK Cq2w== X-Gm-Message-State: AOJu0YymD0u7RS82r3qnoGczyNVV/fiXK6jTxwIXzESEc0DVrYneHVjP k8q+IumiYGFQDwHASQ3tce9YTnXLxBKOtwM3OwY= X-Google-Smtp-Source: AGHT+IH2VfH8mrOCd4iVmyA45doYq87E2cK7mxYdHS7WFSih7sVE1Sq2vd+FwaRD40miDa3UMTipZA== X-Received: by 2002:a05:600c:2298:b0:3fe:1af6:6542 with SMTP id 24-20020a05600c229800b003fe1af66542mr18550360wmf.33.1697026159960; Wed, 11 Oct 2023 05:09:19 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:19 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Geert Uytterhoeven Subject: [PATCH v2 14/62] pinctrl: renesas: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:42 +0200 Message-Id: <20231011120830.49324-15-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko --- drivers/pinctrl/renesas/gpio.c | 8 ++++---- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 4 ++-- drivers/pinctrl/renesas/pinctrl-rzv2m.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/renesas/gpio.c b/drivers/pinctrl/renesas/gpio.c index 5758daf94fe2..e7771a57e6d1 100644 --- a/drivers/pinctrl/renesas/gpio.c +++ b/drivers/pinctrl/renesas/gpio.c @@ -135,12 +135,12 @@ static int gpio_pin_request(struct gpio_chip *gc, uns= igned offset) if (idx < 0 || pfc->info->pins[idx].enum_id =3D=3D 0) return -EINVAL; =20 - return pinctrl_gpio_request(gc->base + offset); + return pinctrl_gpio_request_new(gc, offset); } =20 static void gpio_pin_free(struct gpio_chip *gc, unsigned offset) { - return pinctrl_gpio_free(gc->base + offset); + return pinctrl_gpio_free_new(gc, offset); } =20 static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset, @@ -164,7 +164,7 @@ static void gpio_pin_set_value(struct sh_pfc_chip *chip= , unsigned offset, =20 static int gpio_pin_direction_input(struct gpio_chip *gc, unsigned offset) { - return pinctrl_gpio_direction_input(gc->base + offset); + return pinctrl_gpio_direction_input_new(gc, offset); } =20 static int gpio_pin_direction_output(struct gpio_chip *gc, unsigned offset, @@ -172,7 +172,7 @@ static int gpio_pin_direction_output(struct gpio_chip *= gc, unsigned offset, { gpio_pin_set_value(gpiochip_get_data(gc), offset, value); =20 - return pinctrl_gpio_direction_output(gc->base + offset); + return pinctrl_gpio_direction_output_new(gc, offset); } =20 static int gpio_pin_get(struct gpio_chip *gc, unsigned offset) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/rene= sas/pinctrl-rzg2l.c index c7c6d912a975..22d4ab7d228c 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -1056,7 +1056,7 @@ static int rzg2l_gpio_request(struct gpio_chip *chip,= unsigned int offset) if (ret) return ret; =20 - ret =3D pinctrl_gpio_request(chip->base + offset); + ret =3D pinctrl_gpio_request_new(chip, offset); if (ret) return ret; =20 @@ -1181,7 +1181,7 @@ static void rzg2l_gpio_free(struct gpio_chip *chip, u= nsigned int offset) { unsigned int virq; =20 - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); =20 virq =3D irq_find_mapping(chip->irq.domain, offset); if (virq) diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/rene= sas/pinctrl-rzv2m.c index 52aeafaba4b6..3d29c77a5aad 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzv2m.c +++ b/drivers/pinctrl/renesas/pinctrl-rzv2m.c @@ -754,7 +754,7 @@ static int rzv2m_gpio_request(struct gpio_chip *chip, u= nsigned int offset) u8 bit =3D RZV2M_PIN_ID_TO_PIN(offset); int ret; =20 - ret =3D pinctrl_gpio_request(chip->base + offset); + ret =3D pinctrl_gpio_request_new(chip, offset); if (ret) return ret; =20 @@ -832,7 +832,7 @@ static int rzv2m_gpio_get(struct gpio_chip *chip, unsig= ned int offset) =20 static void rzv2m_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); =20 /* * Set the GPIO as an input to ensure that the next GPIO request won't --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF415CD6E60 for ; Wed, 11 Oct 2023 12:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346695AbjJKMKP (ORCPT ); Wed, 11 Oct 2023 08:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346757AbjJKMJb (ORCPT ); Wed, 11 Oct 2023 08:09:31 -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 3793AF7 for ; Wed, 11 Oct 2023 05:09:23 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40572aeb73cso63107955e9.3 for ; Wed, 11 Oct 2023 05:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026161; x=1697630961; 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=6CbdpxA2yoiqOdTkvvgzFYeQ0S/2apw7f0m7nJ4Vrkk=; b=HZ8Z3wujgrEl3JcSkK/MPH57vSOVXQy9CBPQOJs4cV/ZT9wZD1FyzuxUMl+S7cMnni cplCIA4HTgi4+9P4OtX+oyq9/qVTXYdKazNEQ6MeL/Oi9paKB9aH8yesUTs9yTTEGO6s b1syYfjj91R604gfTWUz1hcPiMr95NHb8/ZTnm5lD+6SeKg3GKSy2cHb06+E4kiMjMnl 1banjHDyTDtpBZaf/alm7/FAOxKl+zM2mjx89qiD33XzQ58IVEr2bYYK7OXXQ6zR8XIY 7zyFfyMjKEDaTxCzuVrMCCw0t0Ogc2gaWK7hpgLPb2RlZ0cpDh3K5A/CHOX5Vk1awFhc A6SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026161; x=1697630961; 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=6CbdpxA2yoiqOdTkvvgzFYeQ0S/2apw7f0m7nJ4Vrkk=; b=Lj+l67h4R2qKDP265Ou+CFCiSWQnzFl9xJ0qFRc3H5u0zGjYbETjKf2yJ5UWacaiRI q/U9TU9WW1KoEeyV9bF0BeATCh2fMPb1fR6uBPS5n8RUC715jtn2w3P+v+9jeSMBGkfc B1y/h7Cc/U6FL17dRIfZn2ObW77LJsIFs8RjvTnC0gZmiE6FSujHm+8wzZudLzR9DMqg t0bEYq3c6GFZsc1+ZVwiBa/aekyaktnoaH/uX/F+SavQ11CSvmPT1kn0ry888szJON35 aKa1EONSvOuNDtGfbtFr5BjIFgNUzARdMUJzRvFBSFHY7Npf4Ec75G//C8KUnNGW2/s6 /D4Q== X-Gm-Message-State: AOJu0Yx33yA1PLeGjimaCwPJ5OEXT/Wni2tvQMCv8i5ys8LOf2nloqIk QC9GoX00NKftnTduSiU+XWjWpw== X-Google-Smtp-Source: AGHT+IGPszQMlGOhUEshB1OYzNIjZG0mo+cw3ASMyoyfmyTuDwtxPnM6tHzkZ5s/2xnXiC02gOnQJg== X-Received: by 2002:a05:600c:3ba1:b0:406:872d:7725 with SMTP id n33-20020a05600c3ba100b00406872d7725mr17789005wms.1.1697026160925; Wed, 11 Oct 2023 05:09:20 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:20 -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 15/62] pinctrl: bcm: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:43 +0200 Message-Id: <20231011120830.49324-16-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm= /pinctrl-iproc-gpio.c index bc7bb9876e57..fb98c3e14743 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -330,24 +330,22 @@ static const struct irq_chip iproc_gpio_irq_chip =3D { static int iproc_gpio_request(struct gpio_chip *gc, unsigned offset) { struct iproc_gpio *chip =3D gpiochip_get_data(gc); - unsigned gpio =3D gc->base + offset; =20 /* not all Iproc GPIO pins can be muxed individually */ if (!chip->pinmux_is_supported) return 0; =20 - return pinctrl_gpio_request(gpio); + return pinctrl_gpio_request_new(gc, offset); } =20 static void iproc_gpio_free(struct gpio_chip *gc, unsigned offset) { struct iproc_gpio *chip =3D gpiochip_get_data(gc); - unsigned gpio =3D gc->base + offset; =20 if (!chip->pinmux_is_supported) return; =20 - pinctrl_gpio_free(gpio); + pinctrl_gpio_free_new(gc, offset); } =20 static int iproc_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FC58CD6E61 for ; Wed, 11 Oct 2023 12:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346718AbjJKMKc (ORCPT ); Wed, 11 Oct 2023 08:10:32 -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-Google-Smtp-Source: AGHT+IHG58kszOlx+/jzRbb/vUE3ysT4ruamZvPBJkCiYBz6pRrqIIBWYOANrs0621MZOnLfPD77xw== 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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- 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; } =20 - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } =20 static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); } =20 static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset) @@ -241,7 +241,7 @@ static void stm32_gpio_set(struct gpio_chip *chip, unsi= gned offset, int value) =20 static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned off= set) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } =20 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 =3D gpiochip_get_data(chip); =20 __stm32_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output(chip->base + offset); + pinctrl_gpio_direction_output_new(chip, offset); =20 return 0; } --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9627DCD6E5D for ; Wed, 11 Oct 2023 12:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346825AbjJKMKT (ORCPT ); Wed, 11 Oct 2023 08:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346717AbjJKMJe (ORCPT ); Wed, 11 Oct 2023 08:09:34 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C77AD10A for ; Wed, 11 Oct 2023 05:09:25 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4054496bde3so62404325e9.1 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=1697026163; x=1697630963; 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=dPRzIFIU2I284yl/ON43iSE6foshfftHmva92Etqe/c=; b=GgK3oqbdlBZcC1z8a40Zu2Cc6YgH9UC1Kf/M3npSmRJWgj2mnxWR7iFeRvtzcaZwJI OWwDWghfANbcISt20RhPDZoQOxyjHK1lSF3zjRTW03/XUJG8BDQSaGrQ9O9dRun/c66b yv0YAnEvvpYZCqaPD80Q9aFruK2+GcC4tNwuiN1iXqry2oV3vMkMTPNhrRjEh5fObNk7 V2bLTjDkh/H/6iNB1rp3iZpW7ySCssJ+q3SZtiPIG8rFKbrQS1GjYa25ZC271G5sUyoE 7lK22ZI9cVmXd37xXeQSph7M9dbuLZ6QFvRlY/5uKqFEfZTZehczRc7yGtudla3R57zd /8gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026163; x=1697630963; 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=dPRzIFIU2I284yl/ON43iSE6foshfftHmva92Etqe/c=; b=Ia7moSWwqkbmvbX+QjYhtHWjp0fDgvJIQ4Ksa5ZX7nNdBBJvQabtlNJu+3USYRCIkE JrwczrJ46C9DCRUQj0FTkmGp1iLKxYkr4SWG2DukhLYjaeNMBmrGbftj+jY78XffZthe rOMvZuE+U4X/nuAaR4yV8F9O+wpTVqMElg9UegYDkeXIwNh5/lo+Dp4GymML9pwkuZwB hJ6jyo2u2cWTmmf3otNaVLbZNlyP/DJ/D9fs83gMnG/Slnd77amX+3MJ0xrKLMFgDaP7 t8xHYvWCryv0HZh3FkT++TXQMCyRRuPd7ubYwFcXIB4IAKcanlyMRXeHTNhysfaUKi9p aabA== X-Gm-Message-State: AOJu0Yzv+UE+CT6VPFm5tQDjH5Tcicg9RFw6jALUMl7RynWnKhAckKQ1 3sK8BVU+A5rouynWsUULzKmRUQ== X-Google-Smtp-Source: AGHT+IEaSIIbvKhgV5gHxYWEYnfgCLYCY1HHJ9DSqRepIYLW0M9ek/Lk6IyRaz0mHxUuATwPd1ChZg== X-Received: by 2002:a05:600c:2197:b0:405:514d:eb0e with SMTP id e23-20020a05600c219700b00405514deb0emr18330423wme.19.1697026162724; Wed, 11 Oct 2023 05:09:22 -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:22 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Viresh Kumar Subject: [PATCH v2 17/62] pinctrl: spear: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:45 +0200 Message-Id: <20231011120830.49324-18-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Viresh Kumar Reviewed-by: Andy Shevchenko --- drivers/pinctrl/spear/pinctrl-plgpio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear= /pinctrl-plgpio.c index 722681e0b89b..7488f6394318 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c @@ -204,14 +204,13 @@ static void plgpio_set_value(struct gpio_chip *chip, = unsigned offset, int value) static int plgpio_request(struct gpio_chip *chip, unsigned offset) { struct plgpio *plgpio =3D gpiochip_get_data(chip); - int gpio =3D chip->base + offset; unsigned long flags; int ret =3D 0; =20 if (offset >=3D chip->ngpio) return -EINVAL; =20 - ret =3D pinctrl_gpio_request(gpio); + ret =3D pinctrl_gpio_request_new(chip, offset); if (ret) return ret; =20 @@ -249,14 +248,13 @@ static int plgpio_request(struct gpio_chip *chip, uns= igned offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); err0: - pinctrl_gpio_free(gpio); + pinctrl_gpio_free_new(chip, offset); return ret; } =20 static void plgpio_free(struct gpio_chip *chip, unsigned offset) { struct plgpio *plgpio =3D gpiochip_get_data(chip); - int gpio =3D chip->base + offset; unsigned long flags; =20 if (offset >=3D chip->ngpio) @@ -280,7 +278,7 @@ static void plgpio_free(struct gpio_chip *chip, unsigne= d offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); =20 - pinctrl_gpio_free(gpio); + pinctrl_gpio_free_new(chip, offset); } =20 /* PLGPIO IRQ */ --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D6D4CD6E60 for ; Wed, 11 Oct 2023 12:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346356AbjJKMKX (ORCPT ); Wed, 11 Oct 2023 08:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346779AbjJKMJf (ORCPT ); Wed, 11 Oct 2023 08:09:35 -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 26F21111 for ; Wed, 11 Oct 2023 05:09:27 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4064867903cso68964775e9.2 for ; Wed, 11 Oct 2023 05:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026163; x=1697630963; 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=FGIsRy8XjuOZvKHt9t36YQP6zzvIBqko3/T4/ujae7w=; b=ogF4wQxOzbxNLYMKl2QlYia8LNhS3PDHvYVQtIGsi9yAFbf2qr2O99dX4vnc2BckDv MdgFrSoQaKWNrAIrkk79Juj4sbh1FIkww0L11GST9dAplcr9PZgs/lGPpovK7dC4J1oN LVnEpEzKlJwpP9+iY9dgKo4Jqynsg8MFj+Rr5SltbRSl0Wo6Y4iopD80UIW2wj9Rn+Wv xZtW33yvIbhbAhxYXJKP7KJssSC3Ai3Wt37jdP5zBkXWaQZvHeXX8uEzI9IA9Ls+nY8P q8UpPlpL4S4uYleliQ1Otddj4KeSrakRgnz1t3o7ZmUWGC9WiBjVF6tqiBqG0MPEXO/T z8pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026163; x=1697630963; 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=FGIsRy8XjuOZvKHt9t36YQP6zzvIBqko3/T4/ujae7w=; b=X/6iBxtEL1e8qxBpbephNjB0s0lFjObkIiSjFfEoFkqRgT1Yl2d0dmJoadA1A6oCF0 /+mx+vzP42GN4XyMfET3/675OzunWyt1hY2DqB8LodDB4YYce8/fsIwicK4XlPNhxuba gBPxxRq6gTTgG4+eNIdNobh/WX7Vh22yVN9DZ/k43JoThUOxAxEgCTT4FPGj/0Tko+Z+ uzCNCutKy5vsLVRgNY3858veFSxHqYtuBuaxHmBg0qvSBdaUmXMj/6AToqQ+NViS6rzt 7qFFbszVeWOdw326vEZZWJgSZ8aKlRWaNz1vflA2j1zn0HX8Su4chY1JzWPIBYeoAUoz Zn8w== X-Gm-Message-State: AOJu0Yxv8gv9tr1tzF7QW/jKc34TEZ0viqX1gl457bs5uKUs1sEJW6zr N+7n3ok1RTI8whMU06LYZ1PYVQ== X-Google-Smtp-Source: AGHT+IGdEhAgTm297jLZLMTuTEEFLfn05De/g59KDtEQqmhzLoWxNwNsUvx1pSF9h0Tw+KieCl6FQw== X-Received: by 2002:a05:600c:294a:b0:3f5:fff8:d4f3 with SMTP id n10-20020a05600c294a00b003f5fff8d4f3mr18972034wmd.7.1697026163661; Wed, 11 Oct 2023 05:09:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:23 -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 18/62] pinctrl: starfive: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:46 +0200 Message-Id: <20231011120830.49324-19-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++-- drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7100.c index 530fe340a9a1..22a2db8fa315 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c @@ -918,12 +918,12 @@ static struct pinctrl_desc starfive_desc =3D { =20 static int starfive_gpio_request(struct gpio_chip *gc, unsigned int gpio) { - return pinctrl_gpio_request(gc->base + gpio); + return pinctrl_gpio_request_new(gc, gpio); } =20 static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free(gc->base + gpio); + pinctrl_gpio_free_new(gc, gpio); } =20 static int starfive_gpio_get_direction(struct gpio_chip *gc, unsigned int = gpio) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7110.c index 640f827a9b2c..5557ef3fbeb2 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -547,12 +547,12 @@ static const struct pinconf_ops jh7110_pinconf_ops = =3D { =20 static int jh7110_gpio_request(struct gpio_chip *gc, unsigned int gpio) { - return pinctrl_gpio_request(gc->base + gpio); + return pinctrl_gpio_request_new(gc, gpio); } =20 static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free(gc->base + gpio); + pinctrl_gpio_free_new(gc, gpio); } =20 static int jh7110_gpio_get_direction(struct gpio_chip *gc, --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A816BCD6E61 for ; Wed, 11 Oct 2023 12:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346841AbjJKMKl (ORCPT ); Wed, 11 Oct 2023 08:10:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346815AbjJKMJu (ORCPT ); Wed, 11 Oct 2023 08:09:50 -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 2CD2FE8 for ; Wed, 11 Oct 2023 05:09:31 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40666aa674fso63475975e9.0 for ; Wed, 11 Oct 2023 05:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026164; x=1697630964; 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=b0sgIJXyiWCMH9BTQoi/ajBzkcQtsuv8BX1pVGl7zGQ=; b=cwTXz9L86Tjxsk73k/nrwBBba9NCjzbrAndkMBd66/8m+xHA7XToAtXdl+vhsLhcs9 v5pTKp3RO3NBhnLDZsKZUQ2oiUPUl/l2qHiO+ZV4tg2phKpfjVpJa72j1azwsauYpDMD FwFaktZvUlMc3JnNssD7qebArN5FomReO7L+XixwbLj3EM1U67X62x2UiNbuf1tO5LRV OjpUwrlgu62+/9pdX+vM8qN7Gm+dHVd2lLl9SGSoHt0FrmpG9eyiO9Qp+flBJQOY1Pox bBa2r8WCIjQs7O7/n35zOPuL6M4cGEd7dzAx4sDK3pZ+h/22av459o34sbMIgSUSTD5h KrlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026164; x=1697630964; 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=b0sgIJXyiWCMH9BTQoi/ajBzkcQtsuv8BX1pVGl7zGQ=; b=kNfiKgup/1JB+Mwyqur6kHEUT0j4ZYMawhm7+dhbRZn9ueP3qc4v5cmz767sg+nVZF EoX/HYqOV60GU5Q7riGJw2fG0IeJ7AnzeZhEWqRuVufJCLfhto27dDwVtY8c63nShofC 0fCNieHN+qaD+IHPDxpqSvTBrB+bDsCXWeDvik9IgLHdiQ1DPb0fhw63MDcbVI5plGMM f+yWOW3PPPNCsgoT5pDHbDwXCyN4EfGZak87RkHuGpir2/BmDAPRNcvNiYLtXyID6gDW B7gWHQkfq+bZGGk8Nxdn1dL9VJuIuRKXEvReZ7MogU7KDYmDqoyM7lJiBd3yWx/57IcF t0ig== X-Gm-Message-State: AOJu0Yzc/GgiARG5QWLT4Regi1q2FUkYcKnP/bHHVu4eLbKYDoHTO1zd bU+cus6ZQGxD0857IsWZ1sbeYg== X-Google-Smtp-Source: AGHT+IEHffnyYrHHG6G2dYUks0sLtBElGJkM+4rW9hsszZDTUzO+8Qzc/7eXPCeccRw+fTkKMRTcdg== X-Received: by 2002:a05:600c:ad0:b0:406:7029:7cc3 with SMTP id c16-20020a05600c0ad000b0040670297cc3mr17586904wmr.28.1697026164559; Wed, 11 Oct 2023 05:09:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:24 -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 19/62] pinctrl: ocelot: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:47 +0200 Message-Id: <20231011120830.49324-20-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-ocelot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-oce= lot.c index f8ae2e974221..a6022d44ad6c 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1779,7 +1779,7 @@ static int ocelot_gpio_get_direction(struct gpio_chip= *chip, static int ocelot_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); } =20 static int ocelot_gpio_direction_output(struct gpio_chip *chip, @@ -1795,7 +1795,7 @@ static int ocelot_gpio_direction_output(struct gpio_c= hip *chip, regmap_write(info->map, REG(OCELOT_GPIO_OUT_CLR, info, offset), pin); =20 - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static const struct gpio_chip ocelot_gpiolib_chip =3D { --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52EA2CD6E60 for ; Wed, 11 Oct 2023 12:10:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345936AbjJKMKz (ORCPT ); Wed, 11 Oct 2023 08:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346775AbjJKMJv (ORCPT ); Wed, 11 Oct 2023 08:09:51 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E893139 for ; Wed, 11 Oct 2023 05:09:35 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-504a7f9204eso8291014e87.3 for ; Wed, 11 Oct 2023 05:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026165; x=1697630965; 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=SgDYd9Rguhjm4qQEjlLUgCLw45ItMDY7i661tMI87TY=; b=NXGqg7APoSGYbHOIRd/00LSae6AR2vx9ywofXAB0/1n79w0jDUWUeH9EkFX7Jam5Om X79sA9rgO1JlZrMLku64Tl92bMzoqBtM5DHUTbLzapDZ3uXnGO7zdj+B3Tji2IbBoYdr k8nxD9I/qM4l2MwAhzS1VHkZzraQQyuomLtUkSw7/XGa6SU2CShoE7vxeKSYTTgwBAJZ 3uZ41alpb/3zjgTiMCkAkNePr49ZsYgSuRd388Lh0t3/ITyXTDTTVMbERxtj08BsfQo1 mp+HF0FBSEDhld3mMy1SlctXGSbNR4hCZmevM1h7O/3IVxJNUI2ZTIQhoW/D/thHLMaV KUTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026165; x=1697630965; 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=SgDYd9Rguhjm4qQEjlLUgCLw45ItMDY7i661tMI87TY=; b=jIGVEYnO5NP5eMpBnT1byID3TEdva6wWxTYkxVcN40rC3pR0iS+zxV/ifjfP0bdsYb lKF3wZKsvwtPq5+Gd4z8fbWi7f3jjS3GfTonxJ+dsTyKRjMj5z4N0V1CXkAwySmXgW+e JVsQCdfSOXXoH3uwKLkRv3XY9ZUBuqL2XAg7IvV5c6Pc7xspyVrWnR/IDZogAL7aXUfB evw0UsLQLKC/7DSG/WyAeDRqJ1Rcrrw8nVJ1wYejRikg4p/cC6K1Lr0Wd/vJlCHjAQIu S3eMD9VncU7D6obM21EOHcx0JeGk1jhKi3EtNz7QZ8ROxJ8omMmyrimoIXycIeB6tVQn biMA== X-Gm-Message-State: AOJu0YzQ0DEUjG0Ai3rLLpFUfaadIJqWs6E+/6LFJhyHxZ6IdpjyfD/T vKs7pV3Sc0TcPVdJ5+EkrnYXfg== X-Google-Smtp-Source: AGHT+IF3ZBeCHQ7UxXAI5x4hDZ/wVHmC4NXEoeGBeKjkPKX50TSAw6cbyyvN919Y1osgvewm9XIvUg== X-Received: by 2002:ac2:5fae:0:b0:503:1998:b48a with SMTP id s14-20020ac25fae000000b005031998b48amr14881273lfe.62.1697026165466; Wed, 11 Oct 2023 05:09:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:24 -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 20/62] pinctrl: rk805: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:48 +0200 Message-Id: <20231011120830.49324-21-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-rk805.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rk805.c b/drivers/pinctrl/pinctrl-rk80= 5.c index 2639a9ee82cd..58e6dd932bc7 100644 --- a/drivers/pinctrl/pinctrl-rk805.c +++ b/drivers/pinctrl/pinctrl-rk805.c @@ -289,14 +289,14 @@ static void rk805_gpio_set(struct gpio_chip *chip, static int rk805_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); } =20 static int rk805_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, int value) { rk805_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static int rk805_gpio_get_direction(struct gpio_chip *chip, unsigned int o= ffset) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2940BCD6E5D for ; Wed, 11 Oct 2023 12:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346947AbjJKMK7 (ORCPT ); Wed, 11 Oct 2023 08:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346798AbjJKMJy (ORCPT ); Wed, 11 Oct 2023 08:09:54 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C845318B for ; Wed, 11 Oct 2023 05:09:36 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3296b49c546so4478271f8f.3 for ; Wed, 11 Oct 2023 05:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026166; x=1697630966; 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=B7mQAW/gcS7bWGdM82oN9G3UwAV92bdGrqJQuitFsrM=; b=UQ79YBteAxmimcxCPja9jhleZqR7Ibf98MeqMYf1vVkXRfDiBi9QDTbkTo8l8fzjV6 gWx8uO/IovLEWzR2MJce1stB7Q0Oi0/0Op9fOzmvauMgKk3UC6yCYD0p5mBz07ocgyS6 dC64C0BQ9l7vKeFcrWuORAQfVC7yGPcSnvBJJHltWeth9TZomcsTT7JVvDC76Iz6Mrdx J7pKhPdpqVzMfUkBZMtrY5exixXkFOmPQ1zGpUxACaAbg8RZXaJpEe1N8Jg8y7+eXXw7 svIdh3J4E3lMES2fdGhYLcoj5yl4FZM+jD00FhW2MhXC+yTFVCTE9w/Q2lEU4+EQWyA9 Mjcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026166; x=1697630966; 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=B7mQAW/gcS7bWGdM82oN9G3UwAV92bdGrqJQuitFsrM=; b=QGnA8op53e2nm8+DWaibgQ4CwwzrEC+GrD43EQ2/NJ7uhH6hjoISOtn2DKCIbtvzUg Mzjr/bNfuY/+l0W5asSLAGssfrKTY3zOVkrCZLySCyVzc75QOleqDsT9gBy+1ysGLFvB PbVlJFRmyGJRO9RDSejBhYF1CwHbyVoaYWKbUbq+NeplvLh01/sSg620zQvWNiXWc8ci sQ6CjylRKhkQ7fSBAQ0E9T9Z9cHkJr0WUjki/wBQcxdsPZH8twoWMRoY6yJBMtUX62sp XTb7/9s6GcvJurlzYt/Uww/6jcHBzHUhZt1t6Tb5WyX4ADoJ83f2QrIf0gNviZgweLK2 DX6A== X-Gm-Message-State: AOJu0YzhbcOrS1aSxfPkkUXK5S/1BLgdKHpBIaEzS7R0c3H5TnHQC6NL BSZTA5R0cEXXZlr21+U+PuenIw== X-Google-Smtp-Source: AGHT+IFgKc46nUE0aKpQQ0TuMyLnkp05FAa6kvD0a50LHPMvjm6A08VFOB7DYiM1ltxi8FSgEIgJcA== X-Received: by 2002:a05:6000:5c6:b0:32d:5870:8b8a with SMTP id bh6-20020a05600005c600b0032d58708b8amr4272879wrb.56.1697026166464; Wed, 11 Oct 2023 05:09:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:25 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Charles Keepax Subject: [PATCH v2 21/62] pinctrl: cirrus: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:49 +0200 Message-Id: <20231011120830.49324-22-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Charles Keepax Reviewed-by: Andy Shevchenko --- drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 4 ++-- drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cir= rus/pinctrl-cs42l43.c index c09646318419..097e4dcdda36 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -508,7 +508,7 @@ static void cs42l43_gpio_set(struct gpio_chip *chip, un= signed int offset, int va =20 static int cs42l43_gpio_direction_in(struct gpio_chip *chip, unsigned int = offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } =20 static int cs42l43_gpio_direction_out(struct gpio_chip *chip, @@ -516,7 +516,7 @@ static int cs42l43_gpio_direction_out(struct gpio_chip = *chip, { cs42l43_gpio_set(chip, offset, value); =20 - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static int cs42l43_gpio_add_pin_ranges(struct gpio_chip *chip) diff --git a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c b/drivers/pinctrl/c= irrus/pinctrl-lochnagar.c index 0b78cf611afe..f3c8a8c14e14 100644 --- a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c +++ b/drivers/pinctrl/cirrus/pinctrl-lochnagar.c @@ -1098,7 +1098,7 @@ static int lochnagar_gpio_direction_out(struct gpio_c= hip *chip, { lochnagar_gpio_set(chip, offset, value); =20 - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static int lochnagar_fill_func_groups(struct lochnagar_pin_priv *priv) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA10ECD6E61 for ; Wed, 11 Oct 2023 12:11:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346757AbjJKMLE (ORCPT ); Wed, 11 Oct 2023 08:11:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346861AbjJKMKE (ORCPT ); Wed, 11 Oct 2023 08:10:04 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B9FD1A1 for ; Wed, 11 Oct 2023 05:09:38 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-406619b53caso63175295e9.1 for ; Wed, 11 Oct 2023 05:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026167; x=1697630967; 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=Ks2t/2sFBUuZyfDpT4cAX7qKrPmH6DMrQUqaUAZXib0=; b=o91Zf7B6sCrisBCXWYTy+Y8B3svAz11INSZBIK56Dt29JevW44M5RBIjoj5osCW7zT TDmuOSyWJvW1MOke3yZ5QmW4HOd030bJnlBcBcYfnmxG+2mGucpC7x9vuox0fC/lz0kB hU6NJjoIs81yyC1zSrkwkrMTzIxjfyMwszjhDoC7VAqmLisvy0dqJDmlp3VVvQ9hC1uS gI4r9YNV7uHgGe3AbyfTf497bQWyfKmL97C/BbU99FN5rTBx9DED9qULPWbyQFoHufoL a/HF8b1EnhzsVyBx3PcUigzNGYwourjxMlQZXrGzNrwixw4WiBIPi9/1Y/XLkJlKBa2i O2qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026167; x=1697630967; 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=Ks2t/2sFBUuZyfDpT4cAX7qKrPmH6DMrQUqaUAZXib0=; b=ngdcrUKMB1ZhQIW2wh0s9TjSlpPEC/cVih6sdm8g9iOHtu5Z6QqXLoD4Rg1ulcXaHd N4Mchk5GJGwp6Pzz4ZBDeuOZFSM5kA7SaJJYx2rR54Hidrw0hBqCPkuspBIsgNC6X25T fEUG3ZviqFwA+BI7oVa4ZhnC0slj8Ap6j1yQydM6PnA2eAqV3H5A9ovzbAWE8Nu71RmW kIGKTdQHis9q7fZcPalEWDXpytR/BiE8UcJ2WM6BOfBwxjbMFeMFSaZk+iKehalGEYmh W6zPBBZ9qOkmPdx0TAiZCMLxnuxgiYckA+cMoJ3+GkAwwiTYb1n8488gCFiTmsUbD9HE X02A== X-Gm-Message-State: AOJu0YwNKTilQuMMWGr/XBifv4qN1K+s6OTdb+9O5NeK8oCxOjZMMm3j zfyRc/gLH1DmRa/nHVmd6jDR3w== X-Google-Smtp-Source: AGHT+IGQ7kZP3ui4mKte3UXb4BLNt8W4dnf/QQsGRm5dUL/HK9k+SRNYUwn5j8g/dvS5QzMHz28epw== X-Received: by 2002:a05:600c:2154:b0:402:ff8d:609b with SMTP id v20-20020a05600c215400b00402ff8d609bmr18248812wml.33.1697026167228; Wed, 11 Oct 2023 05:09:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:26 -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 22/62] pinctrl: mediatek: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:50 +0200 Message-Id: <20231011120830.49324-23-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/mediatek/pinctrl-moore.c | 4 ++-- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 ++-- drivers/pinctrl/mediatek/pinctrl-paris.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/med= iatek/pinctrl-moore.c index 889469c7ac26..dc41ffa31357 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.c +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -512,7 +512,7 @@ static void mtk_gpio_set(struct gpio_chip *chip, unsign= ed int gpio, int value) =20 static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int g= pio) { - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } =20 static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int = gpio, @@ -520,7 +520,7 @@ static int mtk_gpio_direction_output(struct gpio_chip *= chip, unsigned int gpio, { mtk_gpio_set(chip, gpio, value); =20 - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } =20 static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctr= l/mediatek/pinctrl-mtk-common.c index 74b15952b742..fc046415b567 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -811,14 +811,14 @@ static const struct pinmux_ops mtk_pmx_ops =3D { static int mtk_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); } =20 static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { mtk_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/med= iatek/pinctrl-paris.c index b7cb5a1f1060..14b151aec2f9 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -916,7 +916,7 @@ static int mtk_gpio_direction_input(struct gpio_chip *c= hip, unsigned int gpio) if (gpio >=3D hw->soc->npins) return -EINVAL; =20 - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } =20 static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int = gpio, @@ -929,7 +929,7 @@ static int mtk_gpio_direction_output(struct gpio_chip *= chip, unsigned int gpio, =20 mtk_gpio_set(chip, gpio, value); =20 - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } =20 static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3500CD6E5D for ; Wed, 11 Oct 2023 12:11:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346747AbjJKMLY (ORCPT ); Wed, 11 Oct 2023 08:11:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346877AbjJKMKN (ORCPT ); Wed, 11 Oct 2023 08:10:13 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA4171B4 for ; Wed, 11 Oct 2023 05:09:40 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-405361bb9f7so63086395e9.2 for ; Wed, 11 Oct 2023 05:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026168; x=1697630968; 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=L71FhZFxQS/v+Kb2FZmLTi+Zct1vRjkWo7sxYZsb/pk=; b=X4gH66ncnDIZFLD59Zp1OIvwj59nH6kSsjV/ZLsXvg43mSYPBPeRdJkddtIP22Ljuy pTUiUEDacl51zOjIypMXRnZ7cbmsFZIGg6Ff/ScAqZgkCgMBtpr2MXbaocPG+up6DGp3 mw2XOS6w7Fe5wzXKWqyLUAjH337RutZUO+bZ2pWz34po459n5RcePF7Q+pTj+av6XRL5 FISaX5eunpQVnHHpyQI0uf+A71vE41lR3RYomRzQaHdo921+Gf7e/HoVZRcBsl2+oUnG PJlFPfWcGUEd2bpAQz8O+jTutwOyxcVmquKG22gBe/TeJD+Bcfgbs4A8bbZcwI4XvF0s /Dpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026168; x=1697630968; 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=L71FhZFxQS/v+Kb2FZmLTi+Zct1vRjkWo7sxYZsb/pk=; b=oIKcZXcYzvQpwRJcvu0rCtygfVxFfg9nVZkcGg3V170cYsuYN6RFePIuU7a+dN6YXi iQhk07gccbn29bP26xWbvpG9qgow102IeBDSOXdgNQ1p3YysrlEVpWm5d/DalG1mpZX5 9+Fzi2lmh+KXizItfyBIq6iWB4X6Zb6AN+VrTrIp0DR9//JjF/nWT6qzZvw3nzEUE2kk jTqL1/Gcbdq3pZ+Kqs7xm0pBf8O+n7GG4mcyD86hAp3W3xNxtj8DWfIHF+SIBP0VltOI n+EBVwTr65rLZoU5d6SoEegDFzc3uH0U0+v4S7yKAHabOg0WJ9tujCIk1mjoAYnF08wh Iiwg== X-Gm-Message-State: AOJu0YzA92S56+xeXb1AD11gVGN3gEws1Kl21a0jH0uNG7S39L/ePTGv 2MPj2foDlMZ6Mp055CjgVQ2lUCrpaJkDneuG2Dk= X-Google-Smtp-Source: AGHT+IHCbj8hl7N2eRf8+SKDlOmbOHEKrqZL63QNuTkqNmrfXRYWscswXP1skcRvH2+cI17s/6iBfg== X-Received: by 2002:a05:600c:600a:b0:406:eef6:3540 with SMTP id az10-20020a05600c600a00b00406eef63540mr14079374wmb.0.1697026168175; Wed, 11 Oct 2023 05:09:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:27 -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 23/62] pinctrl: axp209: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:51 +0200 Message-Id: <20231011120830.49324-24-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-axp209.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp= 209.c index 9f5b3ab8e184..d7f081f1d1f6 100644 --- a/drivers/pinctrl/pinctrl-axp209.c +++ b/drivers/pinctrl/pinctrl-axp209.c @@ -126,7 +126,7 @@ static int axp20x_gpio_get_reg(unsigned int offset) =20 static int axp20x_gpio_input(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } =20 static int axp20x_gpio_get(struct gpio_chip *chip, unsigned int offset) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8DF6CD6E60 for ; Wed, 11 Oct 2023 12:11:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346894AbjJKMLK (ORCPT ); Wed, 11 Oct 2023 08:11:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346868AbjJKMKN (ORCPT ); Wed, 11 Oct 2023 08:10:13 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A60701BC for ; Wed, 11 Oct 2023 05:09:41 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-405361bba99so62445175e9.2 for ; Wed, 11 Oct 2023 05:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026169; x=1697630969; 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=gdciYkeI9ojIVFf6NUkn/u7//A2Bey8sZm2LXyWrQBM=; b=lbRlGdsddzuxZX0OBbBSiiUDbqJC0QX3Ch30M5gMRYizVpUF9YvXXzXDZ5JnVRZI42 a87tSMk1D6axceX5ultk1tpGeHAKBGuGigC+PQwx5eD2zDDfpjXLqR9qo297GrMRVMzm sPVZTXvpjO+h8z9Rl67bXnaj88KnEQ52BgbCpMNRkpBnblpXIIbclZ+yCJzGPuf6YDlv 2LerYGVpXZhWax9xNWPMFHLJDD2Z5P1rlpjRD2zaMk2z/6C6RMTyLzW55UkaH/70NQXj uOEnzRpPn7TVJ/gnCycXySi22+boakFIXlmbJ3roRA1O+4mMakLHHa92lj6HufzfU4C7 EO/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026169; x=1697630969; 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=gdciYkeI9ojIVFf6NUkn/u7//A2Bey8sZm2LXyWrQBM=; b=h/mv4F2vKLbh1yhm8sAoci1TvFlQ7hJ4W3ansZC7X+Uu9sNKyQHYJnoWGnA4AYHUKE nSzsevQV9vITv4QUmc7XQWEKl/fzmeqlxIqtoDeyLjuM9PC1WzQmIcmlaU+e1EvxOF+n toK5OHt25vIj5FzwDZOJAoS9YIpbuJdwamM0DSgkr/dUyFziAfi1f+qYznCUxsm4TWzr 1jCRrem85nhYTL8LRAMRBNG9S+miuyGdVXtd08FOZ3Or3gA4Pyllbyw7FeRS7+Op0ww6 /qEiS39XD+lt6u7uIBYBwmoSLMYkfbh9YiZg+BxVovxKu3+ObDc2UzFAVAVMF6LGdjWi bv7w== X-Gm-Message-State: AOJu0Yy/b6quKPE6Wl9CjeCGQho9fnPEvrHkJhqRR3+ZB0/JjNQ+Yupl YMsgy1p0hRA9AmwyIr4uOhhHcg== X-Google-Smtp-Source: AGHT+IFvsykFPLsR/DZxmt/oXTkLreB1wB/q0xWf2n0gxG0O+ZL8ee7uCpjNkE15mHaC562G4pWzkw== X-Received: by 2002:a05:600c:1d8f:b0:407:3630:f35 with SMTP id p15-20020a05600c1d8f00b0040736300f35mr13381234wms.9.1697026169023; Wed, 11 Oct 2023 05:09:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:28 -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 24/62] pinctrl: vt8500: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:52 +0200 Message-Id: <20231011120830.49324-25-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/vt8500/pinctrl-wmt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/= pinctrl-wmt.c index 6fac30de1c6a..1a313295611e 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -528,14 +528,14 @@ static void wmt_gpio_set_value(struct gpio_chip *chip= , unsigned offset, =20 static int wmt_gpio_direction_input(struct gpio_chip *chip, unsigned offse= t) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } =20 static int wmt_gpio_direction_output(struct gpio_chip *chip, unsigned offs= et, int value) { wmt_gpio_set_value(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static const struct gpio_chip wmt_gpio_chip =3D { --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62D6ECD6E5D for ; Wed, 11 Oct 2023 12:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234710AbjJKMLS (ORCPT ); Wed, 11 Oct 2023 08:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346878AbjJKMKO (ORCPT ); Wed, 11 Oct 2023 08:10:14 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C5A4D4A for ; Wed, 11 Oct 2023 05:09:42 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40684f53bfcso62661555e9.0 for ; Wed, 11 Oct 2023 05:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026170; x=1697630970; 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=iTV/yldDdNeFa7KR560LkbzuRdncwWStAsZOIrIjz5U=; b=0zPYxIzEMSSvLMcCqTDCjkilDhW45L2bHHXrg2B1P+TFNtfnEO4+qtlJm5qDiD40VG ZY+NoTHziSvFWVgu7/YNK25qQkS5mYOZZDpdjiYo3NPQ/ZOytYGVpEqhtYkz0oq+pPhP DJYNsEyyiGR78qDcgGsE7X2xbGTjOukZ27JyJ6+dX6zAJHEiiqlic0mkIasDriSHCLZz vVvqcsI90dUaNEvaYa49mIqV16zH0+5espkpChRQQVvtigJdBdN74mvsC5sux/71+iZC zDm/KDeCSh+gOqUT5zNOS/5VCX+Nsy5Pnu90+SD4VNRHmkJJnXYmhwL9oVwO1QNFTO5Q VhPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026170; x=1697630970; 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=iTV/yldDdNeFa7KR560LkbzuRdncwWStAsZOIrIjz5U=; b=BPHGDdqM2fAwYbr5+/ZEIL4ck/826orAjA21N/ejGdjrihObWq2Q6RXSBH8oHYhuFJ W3+Q4SW81CdRuTflcIIhB/TkkH3paGRvdNUguA5rqVBeGXv4ZlvFrtrsl4bXLtM8RQ3m fhJ4rKKrDYh8wBE0ZItILA0fwcdmHnFl3PmDZrcRk5NVkC+BmkDPJEQSrnVagGA85oRG 5ES9hfCbJnGkW2GQQ7yHZgkhqAno3w2+THwoLs2QO9RqP7/NCqbkZIlGzsjBXfAoIMAl /0XuS+3R7RyybsXrb76HAiLR2ThrM8l+5iS0GcOCgd9Kl0YjKs0syx4YAnXVGuJ7lu6x oazQ== X-Gm-Message-State: AOJu0Yz8vtw2FfOOM/RUT7gcJK7MJXlA5FLu3O9d7SpAGqq/Xlt8ViSz 5LPWP/U+pvk/T/2lzsx9HkCbRg== X-Google-Smtp-Source: AGHT+IHo6DO6u78jF27w6DxeERZXgTt1CDg6h44dMlpZm0P3XPCpBeUd+S6s5QHxY9SfNa/SFbyX5w== X-Received: by 2002:a1c:7c17:0:b0:3fe:ba7:f200 with SMTP id x23-20020a1c7c17000000b003fe0ba7f200mr18903722wmc.20.1697026169956; Wed, 11 Oct 2023 05:09:29 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:29 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Andy Shevchenko Subject: [PATCH v2 25/62] pinctrl: cy8c95x0: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:53 +0200 Message-Id: <20231011120830.49324-26-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-cy8c95x0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-c= y8c95x0.c index fae80b52a6fc..8c6006353515 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -554,7 +554,7 @@ static int cy8c95x0_read_regs_mask(struct cy8c95x0_pinc= trl *chip, int reg, =20 static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned in= t off) { - return pinctrl_gpio_direction_input(gc->base + off); + return pinctrl_gpio_direction_input_new(gc, off); } =20 static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, @@ -571,7 +571,7 @@ static int cy8c95x0_gpio_direction_output(struct gpio_c= hip *gc, if (ret) return ret; =20 - return pinctrl_gpio_direction_output(gc->base + off); + return pinctrl_gpio_direction_output_new(gc, off); } =20 static int cy8c95x0_gpio_get_value(struct gpio_chip *gc, unsigned int off) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55C3ECD6E60 for ; Wed, 11 Oct 2023 12:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346958AbjJKMLO (ORCPT ); Wed, 11 Oct 2023 08:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346880AbjJKMKO (ORCPT ); Wed, 11 Oct 2023 08:10:14 -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 8F118D42 for ; Wed, 11 Oct 2023 05:09:42 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40651a726acso62579525e9.1 for ; Wed, 11 Oct 2023 05:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026171; x=1697630971; 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=Rt4PWI36LT1R2nI/NQBkxbO8D5dykJYeFhT6i3lm7MU=; b=yX+WZ5YkbR7Yd0Tmxx9CdpWcMFstVJX7wUYthIDjtJiFsFIVtql0qlx9hEdgFY9/WG r4IOLJzuT0BBNzw2MN7xRTRwFx1ji3B0Mh9UbKvm/M2Yv2/xjhGiIs3O/lAE0ceTROxt +DiXzePtRHupRUhF0UXy0AxGiQmPNjKeQyfNEjWc/3RT+lxpliWaU5ng/zu5RvYc/NiS Skuabf2sHiQBGxIz/EZ3cJeG1C3ECLNUQoVzGfo75Cc9eAAepvvS1s4Lfn39yzTI5uul NJvKdlipY/rMQfYpqySj3gOCM5SdShnC/EeJtyP8SVOAQe04qCCgqxnEc2s/VNo75DJA LaKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026171; x=1697630971; 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=Rt4PWI36LT1R2nI/NQBkxbO8D5dykJYeFhT6i3lm7MU=; b=P3m1G6h9GCCWDpjdfqUz87l52ubRj5EtPeN409fDkpTz6Tf9gn27rKeBrwAR6FrjOx x+c3TOGsfQacJ1uMwQVUP+/LWCxyWW8txVU5rnAlubHYFYkTObF426s51bK5zW8hIIxf usxb3JE2M1FcG90BeruMcSqMrpqAnWch16JanOAiBEeJ9JJBhBE7zQyTnq02sAXSjd8Y bgacmNf+4RKrFXlH7KMejcdQ3RB+h0G9l66LaP1lUac9TePB1X6SF6dYmsfI67luVHNB lbH95q9wjMfzdtBBMsQ1aq/fuS/DeiZZ69J/InoH5PsQGa9UoStebJWJydxGtJZvUM+B wo9g== X-Gm-Message-State: AOJu0YwjGPBRgz+tmQFuE+spB8DEqaiIfQDIjrkqfjlYVe+6u0xiup+t /qn8CecvhDjs19c4H/HlnBRn3w== X-Google-Smtp-Source: AGHT+IG/SliNQFfZuZAdmiaIlb8rpLYF/FTdjbJdx1ZGEDYJYzgU59AEdCdQLFHOYUbJXiWvEusZVg== X-Received: by 2002:a05:600c:3790:b0:402:cc9a:31a7 with SMTP id o16-20020a05600c379000b00402cc9a31a7mr18273194wmr.19.1697026170842; Wed, 11 Oct 2023 05:09:30 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:30 -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 26/62] pinctrl: as3722: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:54 +0200 Message-Id: <20231011120830.49324-27-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-as3722.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3= 722.c index f0e5d87ac50b..3d3adf9793fb 100644 --- a/drivers/pinctrl/pinctrl-as3722.c +++ b/drivers/pinctrl/pinctrl-as3722.c @@ -502,14 +502,14 @@ static void as3722_gpio_set(struct gpio_chip *chip, u= nsigned offset, =20 static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned of= fset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } =20 static int as3722_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { as3722_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static int as3722_gpio_to_irq(struct gpio_chip *chip, unsigned offset) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78065CD6E5D for ; Wed, 11 Oct 2023 12:11:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346739AbjJKMLb (ORCPT ); Wed, 11 Oct 2023 08:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346626AbjJKMK1 (ORCPT ); Wed, 11 Oct 2023 08:10:27 -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 2A3F4D69 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-406619b53caso63175915e9.1 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026172; x=1697630972; 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=gwciMDEJmwkjhMDgP1JPMADTRBiS8hEPWAh7DlNBT2c=; b=IeF/GJxIE74+XeiqYusm8Yjqc5X0YS/qq+OF1dKDPsGELgGWsbuLpe5oCEfe3Afm99 1MlGK4mrnqrrZgXKVMp8wUVpdz0uY/Ku50llimMeNFJ/jeJ0dZdtJ0UGQlW/Hum6NksW wMMOh8+ubLplMYlajETIrmcZjTjftbI9BoUUU1ORxbG6NNHzdztzVnt54HB93zlObwLD iYR+e/W1BXGQEif+d4q74+bz8zsHSQggms57TD/LJWT8c8ujcU5QWBECDcsas+sJNhTD N3TPhtjb5FB7wkSoBwAf07FbxJso4hUYtNooNbHFGQCVJsuySvwgo9XamrrD6rFelgNh GA7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026172; x=1697630972; 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=gwciMDEJmwkjhMDgP1JPMADTRBiS8hEPWAh7DlNBT2c=; b=fK0up5MwIsQV7uGvebR96GKKyyDblKGd7mrAuCdROrQrsXq6ys7AwTdwYYIKXNVi9h YRN7Hnko73gU1ZdJlLdfGxYZHP8MA6VD6rmiHkME9OvTWF2Tv9sl4i2sFSEn6ttHEjXF yd+3fZT6ZRj2mj5YUEzLFmv2rSEGdxtQmc2rzU4Nl76/Tyjq0JdjgDx68s+9inVSrnLj GHFKGCDqyqjrwj90jjqgZkRDaFpLSbliJA3s/fie8xRMkf7J9S4NY0x+0Jq0p+YCFMAJ GLe4el5DkO97CtvhJrgo1ynqWfzCyRvrLh2SVgUNmTBkgJROyr5nb6ZGgJH2eeGurhgI xCLA== X-Gm-Message-State: AOJu0Yy13V0x3V6k08r5qqyrRwujePcJAkhJhzVC06PC4cGPNAC2JLwp dUAqOpKuXtG1vt1aXr30k5JPdA== X-Google-Smtp-Source: AGHT+IEjibE7jloLZbXBSZsLbNy7J3ZxHZK1sq8mInwc1VhTHV8P22+FVQSf0pHiB0qB8FSsf/8qPg== X-Received: by 2002:a7b:cc88:0:b0:401:bdf9:c336 with SMTP id p8-20020a7bcc88000000b00401bdf9c336mr19488682wma.27.1697026171852; Wed, 11 Oct 2023 05:09:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:31 -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 27/62] pinctrl: ingenic: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:55 +0200 Message-Id: <20231011120830.49324-28-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-ingenic.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-in= genic.c index 2f220a47b749..5072fb907193 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -133,6 +133,8 @@ struct ingenic_pinctrl { struct pinctrl_pin_desc *pdesc; =20 const struct ingenic_chip_info *info; + + struct gpio_chip *gc; }; =20 struct ingenic_gpio_chip { @@ -3561,14 +3563,14 @@ static int ingenic_gpio_get(struct gpio_chip *gc, u= nsigned int offset) static int ingenic_gpio_direction_input(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_direction_input(gc->base + offset); + return pinctrl_gpio_direction_input_new(gc, offset); } =20 static int ingenic_gpio_direction_output(struct gpio_chip *gc, unsigned int offset, int value) { ingenic_gpio_set(gc, offset, value); - return pinctrl_gpio_direction_output(gc->base + offset); + return pinctrl_gpio_direction_output_new(gc, offset); } =20 static inline void ingenic_config_pin(struct ingenic_pinctrl *jzpc, @@ -4052,7 +4054,8 @@ static int ingenic_pinconf_set(struct pinctrl_dev *pc= tldev, unsigned int pin, break; =20 case PIN_CONFIG_OUTPUT: - ret =3D pinctrl_gpio_direction_output(pin); + ret =3D pinctrl_gpio_direction_output_new(jzpc->gc, + pin - jzpc->gc->base); if (ret) return ret; =20 @@ -4172,6 +4175,8 @@ static int __init ingenic_gpio_probe(struct ingenic_p= inctrl *jzpc, if (!jzgc) return -ENOMEM; =20 + jzpc->gc =3D &jzgc->gc; + jzgc->jzpc =3D jzpc; jzgc->reg_base =3D bank * jzpc->info->reg_offset; =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19403CD6E5D for ; Wed, 11 Oct 2023 12:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346797AbjJKMLg (ORCPT ); Wed, 11 Oct 2023 08:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346827AbjJKMK2 (ORCPT ); Wed, 11 Oct 2023 08:10:28 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 097BBD67 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-405524e6769so5546095e9.1 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026173; x=1697630973; 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=9sX7KISk194rgY041xTg7tvrdqgP+qimN3AJxbjYr+Y=; b=R7RCAOQmtVhB6eSRP1JFyRN2tOUV6/2+VekJ4obE/IWuBa/P3BnqZxQuqN1nmhP3Sz DDxB7V0fp7K6ojNFl4t6uOm0pK6fZYZQAYhSmNLHWVavTvtBRZfgeyXny4aa0quch43K ckC6o/86dnnsmm+aEkrHHdT74/WAqwx00fb8fz/ZJ/XZ59zlsn0GopxrJdWOjAyz2ng0 njmGTbDyYxjc5LhfxggtpQQinK2AE9p/1YGVccSXC+FZUvVqURSt7/xgirs3lnYBJuLR cbliwtPq6fj+TP16jIaRCyULKIvzEnzpQuEBYljQfYzpU83kBE9xEJJGs4QijcxlMVk7 tYJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026173; x=1697630973; 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=9sX7KISk194rgY041xTg7tvrdqgP+qimN3AJxbjYr+Y=; b=qW7EaoqGPI7ICz9iuDNqiOyqds5Ov6wUyFcRa+EVNVkOeQm5PZ+BbhejKq1wSrAzZp jPjb1Q1hWkNov2XUXoqxvM3EfT2DW/xr987pdVHbbOQzCEW3jZIVEX3620t+3qZpkjU2 FzjRxVt7roBgqfiY6XGEeOxf6Z/mEWhhVxj5mjFaTEmwupmGJLlW71ryZ7eQ+F85Ss0W SL3ayZ9txO0BJXg8tQbwZlM0ILs8xOIJjEMbmDcq8c4uvNpAjbprymUJsND+/wJiJ6Uq NvVRkmHnwbyey8eONIseOjoyULAPXE/qHgCMgvm0EaACkQDrBO9cjHNYI48iWWYL3VkK 0GXQ== X-Gm-Message-State: AOJu0Yw/PTxGYs+h46Ka63QmbU8hrHkOG2tRNikd2i+dPHnzm2NgUJ8H GnFe3J8a4fGSJoM41EI35L+ZaQ== X-Google-Smtp-Source: AGHT+IG2icVX5Pt9FWXu0PAluaZqpbmriKah8CaatcXfG7wi5SCT7FjBkZ30kg3Vf2zdp+SBGuFtaQ== X-Received: by 2002:a05:600c:4f02:b0:401:609f:7f9a with SMTP id l2-20020a05600c4f0200b00401609f7f9amr15767689wmq.8.1697026172774; Wed, 11 Oct 2023 05:09:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:32 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Andy Shevchenko , Mika Westerberg Subject: [PATCH v2 28/62] pinctrl: intel: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:56 +0200 Message-Id: <20231011120830.49324-29-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko --- 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/i= ntel/pinctrl-cherryview.c index b8ad73c6b53d..02202cac8fec 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) =20 static int chv_gpio_direction_input(struct gpio_chip *chip, unsigned int o= ffset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } =20 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); } =20 static const struct gpio_chip chv_gpio_chip =3D { diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/= pinctrl-intel.c index f9155d94a830..271aa60dbe9e 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -991,14 +991,14 @@ static int intel_gpio_get_direction(struct gpio_chip = *chip, unsigned int offset) =20 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); } =20 static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned in= t 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); } =20 static const struct gpio_chip intel_gpio_chip =3D { diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/in= tel/pinctrl-lynxpoint.c index d7bc9ef29fcc..91d228fead45 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -541,7 +541,7 @@ static void lp_gpio_set(struct gpio_chip *chip, unsigne= d int offset, int value) =20 static int lp_gpio_direction_input(struct gpio_chip *chip, unsigned int of= fset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } =20 static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int o= ffset, @@ -549,7 +549,7 @@ static int lp_gpio_direction_output(struct gpio_chip *c= hip, unsigned int offset, { lp_gpio_set(chip, offset, value); =20 - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } =20 static int lp_gpio_get_direction(struct gpio_chip *chip, unsigned int offs= et) --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 939F2CD6E61 for ; Wed, 11 Oct 2023 12:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346837AbjJKMLl (ORCPT ); Wed, 11 Oct 2023 08:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346918AbjJKMK3 (ORCPT ); Wed, 11 Oct 2023 08:10:29 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6AC6D7 for ; Wed, 11 Oct 2023 05:09:48 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so86895391fa.3 for ; Wed, 11 Oct 2023 05:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026173; x=1697630973; 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=yEGizAbOxMwHBeRhJGcb8ss//xXj+RtWLOdU8JMZ+S4=; b=O0SrwgqSiDvnthGGpBuFJLP99SV9+Gy2uZ9mMtPy5doY2UIbQ9SiWZkD9jpKviloeQ KTeTWNubXnLIjo8K19mLfyTa/gZ5CwIBRjkLP4HiNlxHO9uGfSd9mLQULS3xE9MxkqpT Eck3GMVEehXYp098aF25SFzvSR7jLDJuvd+u2ICJZriPeFrGteDnoxLn2kVjc/Dyqrtc +J3IZjEf76TJt+RJlpuOIOEJb8KYxD9bnwKIsKwU59kDim5SktiLg8xyYBnQ6KsTQfJu CYj21aVNpYe8PMJb//NQOMJZvr3e23wdsQZ6L3AiWwKVNNsZ+vP4p31Dth6zOGXlRMv9 6ioQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026173; x=1697630973; 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=yEGizAbOxMwHBeRhJGcb8ss//xXj+RtWLOdU8JMZ+S4=; b=m2EimMztUmRNfxaQpIYPWNtyb0+MSmsaeQ0ym6QziNpOdBf7GxyNBd6AGtN9RsiP5F LLoGbLjHvte0wA72GXX0/mLoBttpF5acA1qebNzv1BZamMxYs4ruaIkJYXMCIqJvT1M5 ZeeGQBSiulyzq/trwWTTMcvYTH2XQcsrDs3WhkuaRUCPP2Pdmw98xf3IQjBoQPJUEons CB7b4PkkhL5n3CgHTVbFuCJ/5f+Gu22654CsgX4GGXW3U0Mi057/B2B2e/49mRj/o5fj 9G5/yUp25XilUYadmb8f/KzEVlxxX9yLWKt7WkV9MlCFLF5kcNfrfOBe9/QrGnyjQo7l JuqQ== X-Gm-Message-State: AOJu0Yzl58XE41EIUEJSlhz1DtFYllkwUVhW4GQ7lhqmF+BVH5Mqfswm MrJZqg7F0S5HCOPr9EJjcCFyST8qyNn0vMopacQ= X-Google-Smtp-Source: AGHT+IErTIAuM3WDbfpZrc/qUJWfARo+L35aTewW+TQW3ZXgE3Msaix5FqUd2hQe1zeCbl1mh9M23A== X-Received: by 2002:a05:6512:7c:b0:504:7bd5:a269 with SMTP id i28-20020a056512007c00b005047bd5a269mr16161446lfo.64.1697026173624; Wed, 11 Oct 2023 05:09:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:33 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Patrice Chotard Subject: [PATCH v2 29/62] pinctrl: st: use new pinctrl GPIO helpers Date: Wed, 11 Oct 2023 14:07:57 +0200 Message-Id: <20231011120830.49324-30-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Patrice Chotard Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index c1f36b164ea5..ec763572ab3e 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -719,7 +719,7 @@ static void st_gpio_set(struct gpio_chip *chip, unsigne= d offset, int value) =20 static int st_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_direction_input(chip->base + offset); + pinctrl_gpio_direction_input_new(chip, offset); =20 return 0; } @@ -730,7 +730,7 @@ static int st_gpio_direction_output(struct gpio_chip *c= hip, struct st_gpio_bank *bank =3D gpiochip_get_data(chip); =20 __st_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output(chip->base + offset); + pinctrl_gpio_direction_output_new(chip, offset); =20 return 0; } --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD959CD6E60 for ; Wed, 11 Oct 2023 12:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346877AbjJKMLx (ORCPT ); Wed, 11 Oct 2023 08:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346804AbjJKMKh (ORCPT ); Wed, 11 Oct 2023 08:10:37 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82B6DB9 for ; Wed, 11 Oct 2023 05:09:48 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-31c5cac3ae2so6117549f8f.3 for ; Wed, 11 Oct 2023 05:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026174; x=1697630974; 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=eLr8az2DF4wzR/3h2HT0nDrMk6XnIw1qWiC4OXYx06k=; b=s2bPdBFheeHzXbfVzwIuAlmfSgOD7HjgZbn9JRs9BXNYYrBQfMEO70Ad40viokEoU6 eFg2L3V5UG8EqHZbN/Zah/Yxboe3EI22aWfmyHLRoqAvC6RztBQT5ePC6GTDpqZDHZng CLA50ubS6oc6/Qu8ift9Ip9B3sGZwruyJnftYbokfw+uTZSovg4XnzMbkhKF6oFApYhC Mh9MIBsz0HrFqYp8kF3P7nnOEbv2DM096yzQwEgOsoihgJSjPy7OkE6AfauEdd5zY3pC R6HyOkxLTmGwQAgQU7kfZ9kYktOhFOjxsk9EeG0JVTPv2B7Jh7KzfFyBHS5nzIj+OEoe LVbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026174; x=1697630974; 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=eLr8az2DF4wzR/3h2HT0nDrMk6XnIw1qWiC4OXYx06k=; b=r3S+ylkF41hW9aPFuI9ti27svjIquThxalaBv5YyFm07gfbACMSPG77xx8AoZPR7Gj FJuEw8EjRPIfDgok4RwBvlPEmZBy4JRrs2n4aLMMzlHekgAKbUR6r73p+qkH5lQLoHkh pNmIEwBdFv7zRs2I77BvyJvwjkpCoS14dk9T5DcbJIHlVRycfat6GGdwmg+V/ET1cZUi 8zkR+jyQlYD6OpJmt2FDoFT7iHPaevqY3UkTYR5HUttj44Jrg4ZuT4n249fptb45OHj1 bsoTwLhwl+6j7D6e80PeuCJYRG+SrrzrC/Z8QhVYnHZulqiAlVzFmsuxkyW83h+qbsqo JeJw== X-Gm-Message-State: AOJu0YxXGSw0QUhjSQX9gbSpLRcGrXOI2MKns3vRltLQNQlwAf8lmfQO Cp0xrN+MENzvA++m1zUsLXgK1g== X-Google-Smtp-Source: AGHT+IEZ6rmGbIUuFrjMLFMQuyy/G9fH2uyqDPNfpC7oz+a/6MrX1LMoVNkVrzInMAPjIzAKDkD5jg== X-Received: by 2002:adf:fc4c:0:b0:319:785a:fce0 with SMTP id e12-20020adffc4c000000b00319785afce0mr18642562wrs.26.1697026174482; Wed, 11 Oct 2023 05:09:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:34 -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 30/62] pinctrl: remove pinctrl_gpio_can_use_line() Date: Wed, 11 Oct 2023 14:07:58 +0200 Message-Id: <20231011120830.49324-31-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski There are no more users of pinctrl_gpio_can_use_line() so remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 12 +++--------- include/linux/pinctrl/consumer.h | 1 - 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 13a6fa85c462..024e3825fa98 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -755,7 +755,7 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctl= dev, return -EINVAL; } =20 -bool pinctrl_gpio_can_use_line(unsigned gpio) +bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et) { struct pinctrl_dev *pctldev; struct pinctrl_gpio_range *range; @@ -767,13 +767,13 @@ bool pinctrl_gpio_can_use_line(unsigned gpio) * we're probably dealing with GPIO driver * without a backing pin controller - bail out. */ - if (pinctrl_get_device_gpio_range(gpio, &pctldev, &range)) + if (pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, &range)) return true; =20 mutex_lock(&pctldev->mutex); =20 /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gpio); + pin =3D gpio_to_pin(range, gc->base + offset); =20 result =3D pinmux_can_be_used_for_gpio(pctldev, pin); =20 @@ -781,12 +781,6 @@ bool pinctrl_gpio_can_use_line(unsigned gpio) =20 return result; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); - -bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et) -{ - return pinctrl_gpio_can_use_line(gc->base + offset); -} EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line_new); =20 /* This function is deprecated and will be removed. Don't use. */ diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index c95c13983376..105a4b0c1c14 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -26,7 +26,6 @@ struct pinctrl_state; #ifdef CONFIG_PINCTRL =20 /* External interface to pin control */ -bool pinctrl_gpio_can_use_line(unsigned gpio); bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et); int pinctrl_gpio_request(unsigned gpio); int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); --=20 2.39.2 From nobody Fri Jan 2 12:27:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30A07CD6E5D for ; Wed, 11 Oct 2023 12:12:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346771AbjJKMMu (ORCPT ); Wed, 11 Oct 2023 08:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234951AbjJKMM2 (ORCPT ); Wed, 11 Oct 2023 08:12:28 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62521E5 for ; Wed, 11 Oct 2023 05:09:52 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50325ce89e9so8955339e87.0 for ; Wed, 11 Oct 2023 05:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026175; x=1697630975; 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=uVYKJ7dUlELxmiFW4y8r54186U4zVx3Xhgz6tJx0AYw=; b=MDoA0aGYpynCNnsTb+4lYEHczMp+DN3WyDH/WnFh6qcRCi+mnMx/PG3O66/NkemFUF E3gPA8noJP/b4m6R/9u4H9reYpsXOM5let27S2g5dUqs1YefifDWw89jpFC202682MDh /gv2dRmvi8x+EjgYji3d+viG5SfQ25wb13gt+Qs+mc+6cBlgzlXG/4/tLrXq/1+hn/Xc SApNmfPUartnd5D8e9BYwaW9lc39S/kSSc86efvg1pOpblzzEZB3OCWbd5pREic7HVOM bgvGkaftf+//Ut+qfbDiI948OGBNhRBL9W6ZWI00IhIhN71qcYxkLqJgTZY7T0mIREZI hPyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026175; x=1697630975; 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=uVYKJ7dUlELxmiFW4y8r54186U4zVx3Xhgz6tJx0AYw=; b=beaQm8XEIXgp4UxBmbG+5L6RDneCAckZ5h1+3RvFdrjrOVIkj6n7hXf/+y1nAa3Ky3 B/uB6SVw3sMFQSasL9uqap+1xW7WDHSEq7HIjXjotP/4sI9HTRuiOPVhPZf0WVakQ5ez XRBQgk4ghwgCwcSf0tWeoSDe3EgnRpEI6JF9mAYudZ4zjaVn1Faov4OBcvwx+tipD2KC ePdAhQrtpr1jyjh0Vx68w28CVVwpffCyFwYBYCGIfWa7qFtVM5WF653t7isqS2WbnJKp VVQrnw9xenfYMu1FZ4TOsTKGW+e/G7AvfSdvL6TF/ZfYCfgWqXWj2D9yLTJKllXVxzRu Ky0w== X-Gm-Message-State: AOJu0Yzgflb2ovCAcEReJCVAP7RSRrSanoLQ3m5N4RaBeOs7XDdN4Jik AzJKM8JeZNK02TfvbpscZqOCAw== X-Google-Smtp-Source: AGHT+IFfI2xCs3AIdGr05wUftkpnNBwNE1Wv/Hh1fFtpiEKHUFmLjVVOQuCQ0f3q/KEst+W8KfVWWA== X-Received: by 2002:a05:6512:1307:b0:500:7f71:e46b with SMTP id x7-20020a056512130700b005007f71e46bmr19422619lfu.1.1697026175434; Wed, 11 Oct 2023 05:09:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:34 -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 31/62] pinctrl: remove pinctrl_gpio_request() Date: Wed, 11 Oct 2023 14:07:59 +0200 Message-Id: <20231011120830.49324-32-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski There are no more users of pinctrl_gpio_request() so remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 51 ++++++++++++++------------------ include/linux/pinctrl/consumer.h | 1 - 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 024e3825fa98..837d35b0e5c3 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -783,34 +783,6 @@ bool pinctrl_gpio_can_use_line_new(struct gpio_chip *g= c, unsigned int offset) } EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line_new); =20 -/* This function is deprecated and will be removed. Don't use. */ -int pinctrl_gpio_request(unsigned gpio) -{ - struct pinctrl_dev *pctldev; - struct pinctrl_gpio_range *range; - int ret; - int pin; - - ret =3D pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) { - if (pinctrl_ready_for_gpio_range(gpio)) - ret =3D 0; - return ret; - } - - mutex_lock(&pctldev->mutex); - - /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gpio); - - ret =3D pinmux_request_gpio(pctldev, range, pin, gpio); - - mutex_unlock(&pctldev->mutex); - - return ret; -} -EXPORT_SYMBOL_GPL(pinctrl_gpio_request); - /** * pinctrl_gpio_request_new() - request a single pin to be used as GPIO * @gc: GPIO chip structure from the GPIO subsystem @@ -822,7 +794,28 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_request); */ int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_request(gc->base + offset); + struct pinctrl_gpio_range *range; + struct pinctrl_dev *pctldev; + int ret, pin; + + ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, + &range); + if (ret) { + if (pinctrl_ready_for_gpio_range(gc->base + offset)) + ret =3D 0; + return ret; + } + + mutex_lock(&pctldev->mutex); + + /* Convert to the pin controllers number space */ + pin =3D gpio_to_pin(range, gc->base + offset); + + ret =3D pinmux_request_gpio(pctldev, range, pin, gc->base + offset); + + mutex_unlock(&pctldev->mutex); + + return ret; } EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new); =20 diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 105a4b0c1c14..ffce8d7dd0d3 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -27,7 +27,6 @@ struct pinctrl_state; =20 /* External interface to pin control */ bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et); -int pinctrl_gpio_request(unsigned gpio); int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); void pinctrl_gpio_free(unsigned gpio); void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA55FCD6E5D for ; Wed, 11 Oct 2023 12:12:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234975AbjJKMMo (ORCPT ); Wed, 11 Oct 2023 08:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234938AbjJKMMV (ORCPT ); Wed, 11 Oct 2023 08:12:21 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 858F110C2 for ; Wed, 11 Oct 2023 05:09:53 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-405524e6769so5546535e9.1 for ; Wed, 11 Oct 2023 05:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026176; x=1697630976; 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=63WjOp9UsiT59ywyo99tyOEp/CpCY6vvpVWnONIBEpw=; b=peZ6Fsn4XUud0jFzjDcUHU7bu940Yb+Qq18xQh6tfTox0KEXXlHg0GzaVQBzZ1WrkW 8LC6khX/Mqs5oj0I66uhoMua09XwyvbfO1RjDKdbsw2M+ntfysESyl9teV3K7WUuHivy PJNqjWhVX8sdgY9YGUpHOIiT0ZTigNSTZzLvKtmsO6lTuTZlStqC2LW3B0f7tJrVtUKS les8SHyNm34qh101w2wcR3UkdelzO6WU+P4ExnZp66nu1w6vmFQktbIfcedUFAaX2uHA 1Y0Rcbp9XC85zRbXe9Jny/5cv5O99Wb0ZTT5075oFCkPakSTl9q2R7zDLRIIZFRzSJpU NF5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026176; x=1697630976; 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=63WjOp9UsiT59ywyo99tyOEp/CpCY6vvpVWnONIBEpw=; b=iLqrfq6AMv7zq0/+B76TWxIOYJxctGT8Be1z9YWyVCJ4HPyIqCMoUw6rNnQHLrDD4Q GP5Y13cmfy96+McVT4w6i9ooUZ02QWTNPWfKzYBn3ZU0w0PWf+yUIp9E20R5h8NSvyMg QVmgARtek8LofmNA++nU4cy6ZckvQAJUcyU2HLHv9LPHYTOaq6+1LiCdTEcXKxdS0hoo ipAv6dDOI+ybLZHEYHs1dcfN3+QtIAwgP82GvTXb3eE6+euyYrjPoKQ1bLXh/2pdlZZC euBIktOHm+9p1ne+NpPdr+NaRcSI06uXI4cISKhwy09+Zbu3hDhBm+mkxUXf1tdLKxAN oTXw== X-Gm-Message-State: AOJu0YwPuzva9JTMV8siVKGlZ/+niiDuPOprl8ejUh18p7AEqJd9QM3N pykoyGvsJqfbRTpn1Ukvtybrdw== X-Google-Smtp-Source: AGHT+IEGqgu5V+Pg/7nLvW82pyAyz6O9E0Gf6z4or3apid/QwBxQIkmDYnSVBUM+m6s5v++vocBDJw== X-Received: by 2002:a05:600c:895:b0:405:3be0:c78d with SMTP id l21-20020a05600c089500b004053be0c78dmr13871009wmp.3.1697026176573; Wed, 11 Oct 2023 05:09:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:36 -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 32/62] pinctrl: remove pinctrl_gpio_free() Date: Wed, 11 Oct 2023 14:08:00 +0200 Message-Id: <20231011120830.49324-33-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski There are no more users of pinctrl_gpio_free() so remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 41 +++++++++++++------------------- include/linux/pinctrl/consumer.h | 1 - 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 837d35b0e5c3..6e163841d145 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -819,29 +819,6 @@ int pinctrl_gpio_request_new(struct gpio_chip *gc, uns= igned int offset) } EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new); =20 -/* This function is deprecated and will be removed. Don't use. */ -void pinctrl_gpio_free(unsigned gpio) -{ - struct pinctrl_dev *pctldev; - struct pinctrl_gpio_range *range; - int ret; - int pin; - - ret =3D pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) { - return; - } - mutex_lock(&pctldev->mutex); - - /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gpio); - - pinmux_free_gpio(pctldev, pin, range); - - mutex_unlock(&pctldev->mutex); -} -EXPORT_SYMBOL_GPL(pinctrl_gpio_free); - /** * pinctrl_gpio_free_new() - free control on a single pin, currently used = as GPIO * @gc: GPIO chip structure from the GPIO subsystem @@ -853,7 +830,23 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_free); */ void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_free(gc->base + offset); + struct pinctrl_gpio_range *range; + struct pinctrl_dev *pctldev; + int ret, pin; + + ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, + &range); + if (ret) + return; + + mutex_lock(&pctldev->mutex); + + /* Convert to the pin controllers number space */ + pin =3D gpio_to_pin(range, gc->base + offset); + + pinmux_free_gpio(pctldev, pin, range); + + mutex_unlock(&pctldev->mutex); } EXPORT_SYMBOL_GPL(pinctrl_gpio_free_new); =20 diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index ffce8d7dd0d3..467f02b0aa98 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -28,7 +28,6 @@ struct pinctrl_state; /* External interface to pin control */ bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et); int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); -void pinctrl_gpio_free(unsigned gpio); void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input(unsigned gpio); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9769CD6E60 for ; Wed, 11 Oct 2023 12:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346863AbjJKMVo (ORCPT ); Wed, 11 Oct 2023 08:21:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235086AbjJKMUj (ORCPT ); Wed, 11 Oct 2023 08:20:39 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4579010C7 for ; Wed, 11 Oct 2023 05:09:54 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40535597f01so63262975e9.3 for ; Wed, 11 Oct 2023 05:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026177; x=1697630977; 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=jk+oITkQNupgMAZK1L53SbV604DG6cKlw2d4UZaGR8E=; b=vGB2fWNUfB6rXfZM2uWASPWG3kRfG/RI8WjFzU4q6h471j4kcA3aDX4RZ+NCyH21TO aRHo57nae2LTE7cMAmxRhfBn7rjRsxct2WZrw+UNq6AwRhxk77lBhjuRRa7qYPv+SSzl 5zvKQAaBQfvlxgLiB8VojttNhZrv5nFYLvhNJX0gtNeUPEI+Im1fNlRZNbGnwXvunSyT k0CgR0vyf7eYBvlTN0q/YI5JuTi5WMSaqOGgYT2DyGelPCd6djKWyoqMxXQ4Woh6toqH yDGDXVfb9cTKN2yCf9s3gNGDkubMQfQPEWoDcRl1lfS/TH72BXgk/DbxEVsToYAFfS1L jnbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026177; x=1697630977; 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=jk+oITkQNupgMAZK1L53SbV604DG6cKlw2d4UZaGR8E=; b=Rgi2nRtEly602zSGZxPBnNq4WABDRpp7WBWomjFBlQOChvsPXzNrtFCMr3+NecO0I8 MFjuvTAnYMoh114Zpkc6B3JMTqAYFClXfHaIqipp3pzVDMxY2c9r6SPsrWcMCWcgBvJc bgYa4XokDBiI+Vvih1Ja7gh7l5pvKHwCclGml3X13j7XzFYBSIMqMOsFKFCMt2C9eleq b4nH78/zu7efalQ5gCzXOriMs2gLci2xnD+XtciMn55ZHGMzos6Pc9A8CjZ9nDXHwkX4 sNao0tZjuL9uQQWtP6pqWgQbgXRHBGhFOKZ0uNw0OQaDXl8fG1L/wbSzOdgkjmz6AmBG ubUQ== X-Gm-Message-State: AOJu0Ywu/vTSctCWMVhG3fHKy/jU7ZSmg1ORYACDWMu84VAHU9GIY0zH lcC3AVr7T0BnXvOu1Ulxy89EBhAUDG9Kq5o9d+Q= X-Google-Smtp-Source: AGHT+IEVSqwGOkpON7diwN9rayVk6RMzR4q3otbXEDJhqWGRRMUVbg7tEPOP3xkxloOtkWRa0ft0hw== X-Received: by 2002:a05:600c:2242:b0:401:be70:53b6 with SMTP id a2-20020a05600c224200b00401be7053b6mr18605733wmm.15.1697026177415; Wed, 11 Oct 2023 05:09:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:36 -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 33/62] pinctrl: remove pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:01 +0200 Message-Id: <20231011120830.49324-34-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski There are no more users of pinctrl_gpio_direction_input() so remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 9 +-------- include/linux/pinctrl/consumer.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 6e163841d145..1d3afc7d1656 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -873,13 +873,6 @@ static int pinctrl_gpio_direction(unsigned gpio, bool = input) return ret; } =20 -/* This function is deprecated and will be removed. Don't use. */ -int pinctrl_gpio_direction_input(unsigned gpio) -{ - return pinctrl_gpio_direction(gpio, true); -} -EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); - /** * pinctrl_gpio_direction_input_new() - request a GPIO pin to go into inpu= t mode * @gc: GPIO chip structure from the GPIO subsystem @@ -891,7 +884,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); */ int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int of= fset) { - return pinctrl_gpio_direction_input(gc->base + offset); + return pinctrl_gpio_direction(gc->base + offset, true); } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input_new); =20 diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 467f02b0aa98..f9cf70887242 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -29,7 +29,6 @@ struct pinctrl_state; bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et); int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_direction_input(unsigned gpio); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_output(unsigned gpio); --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07FD2CD6E5D for ; Wed, 11 Oct 2023 12:12:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346775AbjJKMMa (ORCPT ); Wed, 11 Oct 2023 08:12:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346798AbjJKMMV (ORCPT ); Wed, 11 Oct 2023 08:12:21 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC23410CF for ; Wed, 11 Oct 2023 05:09:55 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-406618d0992so65244735e9.0 for ; Wed, 11 Oct 2023 05:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026178; x=1697630978; 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=CYjSdXnBn2U6AI/a2gaGCAgCRKx7tlSdfzxpGqCypic=; b=qijQ5k/hN6KFMCD6odx/HGVEp+360Q7pWWpbwyOHiwU4ZC2P/4CE6NUNnVxrueG6hA bz6rg4SfkKZggXCFKUW87vwCy75jCUx5bwMVNdYl+rHrkCMEipQw00RxJ1jAmaNm3rGQ +UOotZGy4PkCyDipC6cN5eZmI+RWnGmP3vaPpFbs4Y5BBEOHLZbRZe8hqniMJ5NzXgJG 0PV4ROrx/gsgIeynjklELYHnaiyuWiTvv1bMwKc3fPZI2i09FBMVZ53l8PkSvU1hzcXy 91UpUjc5MQO9oXvoyzWkU6CN72zmnZDEi8q8bNhpLiZRXHuIEDIwKZwWL+8tVBUEUnKf 0/iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026178; x=1697630978; 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=CYjSdXnBn2U6AI/a2gaGCAgCRKx7tlSdfzxpGqCypic=; b=jR1s5VJ311NYwZ7HB0PXE6olAnncob2D5LglyhuCwRsbO9NR90nJm5ARkbAQgS/y6+ Tq85r8qzLA8uyOG0XPBU8EjA00/chyotksSDXZFeK7P/UV6faLeBbL4d1HupJ/33WRsP hInVHR2rP0xW+WkgPM8qe22mWTumb7p8xOZpnnXLAwVvAYsgvOwT+4tjNurtIy6tCo0e iRV+O+oGU/YL5szy20+6grbLea8VY0nQCMCTJCaPq0Vq+drUZfFnmJ0q4wjLWx9tPdHv 2CkACbzomtDvYBiNvbLW6qft+QQBKxFoO+J2RYRcMjtt103UjUQ1dIaBlBBU/3SZouQU nIlA== X-Gm-Message-State: AOJu0YyhG1ngaCWzTwK3u4mT03quyb29hLEBJ8HllenfmSkAQzCQRSYq JxERlQOEMnn1flfSnyu6KL/V06NyCUVkHI8njJY= X-Google-Smtp-Source: AGHT+IGkkcc98HAYmTO1Uu1JuhpNbP95aHr2zgrNO7Z2GyIJi9vEbV9WZZMZs0icMbpJICwI8183RA== X-Received: by 2002:a5d:560a:0:b0:31a:e3ad:f30e with SMTP id l10-20020a5d560a000000b0031ae3adf30emr18624160wrv.68.1697026178350; Wed, 11 Oct 2023 05:09:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:37 -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 34/62] pinctrl: remove pinctrl_gpio_direction_output() Date: Wed, 11 Oct 2023 14:08:02 +0200 Message-Id: <20231011120830.49324-35-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski There are no more users of pinctrl_gpio_direction_output() so remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 9 +-------- include/linux/pinctrl/consumer.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 1d3afc7d1656..9f8027f381b6 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -888,13 +888,6 @@ int pinctrl_gpio_direction_input_new(struct gpio_chip = *gc, unsigned int offset) } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input_new); =20 -/* This function is deprecated and will be removed. Don't use. */ -int pinctrl_gpio_direction_output(unsigned gpio) -{ - return pinctrl_gpio_direction(gpio, false); -} -EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); - /** * pinctrl_gpio_direction_output_new() - request a GPIO pin to go into out= put * mode @@ -907,7 +900,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); */ int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int o= ffset) { - return pinctrl_gpio_direction_output(gc->base + offset); + return pinctrl_gpio_direction(gc->base + offset, false); } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output_new); =20 diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index f9cf70887242..4fdc0e570329 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -31,7 +31,6 @@ int pinctrl_gpio_request_new(struct gpio_chip *gc, unsign= ed int offset); void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_direction_output(unsigned gpio); int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_set_config(unsigned gpio, unsigned long config); --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6409CD6E64 for ; Wed, 11 Oct 2023 12:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346941AbjJKMWu (ORCPT ); Wed, 11 Oct 2023 08:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346944AbjJKMWS (ORCPT ); Wed, 11 Oct 2023 08:22:18 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9359110EC for ; Wed, 11 Oct 2023 05:09:59 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-405361bb94eso69189985e9.0 for ; Wed, 11 Oct 2023 05:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026179; x=1697630979; 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=vydHvbKqcmaUPhEEktsrjJB4doUamk1HoU6kP37WGGw=; b=UOD4sFFjbtImvcz93jTXokzZKbi5Tb1TYtMmDYYKnrSXR7P1ZkW1nNrvcXqX57hoCr q3kyEWb1pfsmJ1MFlG6PwD4c4SJjKHP0cXtb5J+luUvDu/e3EG4GBP7nwe/PajRpcS9L tijFIIDEDm6MzKICZSfem9c/E9iC5uK0EOUb3KrpPrxGvnHcEpjUsi+2tCJOPl2iSV25 0lK3RW9eSzZbOMyBHUaxJUiAuXfMCNdmwd44PwPfXrrDgcwn8PNCIDDsG0XVQsJGFgLZ /4HCBImJTHGQxCbmw71p4lj3UkTCBZf0T9HYv7+DNaiEnbJtyWBfF7BvcKr31l5G1d1n EkJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026179; x=1697630979; 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=vydHvbKqcmaUPhEEktsrjJB4doUamk1HoU6kP37WGGw=; b=V5dUp8OMLP7oTQd7eu6uC6QZbVyM9MM7LkaZGs5I79x8bq1WbXOS4FrXxxeGxgk19j Xz44d5pCKoPCndAQq0asBd6+ayVgrj6qCldWBunzNu2Tp6keeZpfvHodD+eGXMRmr8dp N1s/detrZCRYDgP/kwO9n9KYEFIE8B7cm6jaPtJu1XinCssfTS/LKLvtp2CaJA0PvQH3 ryeAfe98Fq9HBHIctlqj5Jd9qp/T06WZV09hlda1uueA6k13W6y9f8LgQgOz/B8+jGtF yzPv+8yOgAxnFYsGX5ZfgbAPu8wEpwQhxsU+ZKYwPHWx9NjMeXQWBZhzuYjmd/12/mDM HwfQ== X-Gm-Message-State: AOJu0YypBSS2JwXQOO1LQJQPHw/gyFBnXpT7kAaY6Cq0CsDlkaQ8E952 CT9x+hnET/89KQc+PtUsK8ogrQ== X-Google-Smtp-Source: AGHT+IHS2BfN8j1VltP7HJeTJ/PpoQRbbJmLvzona4YL/sOu5+nrUs6QWshdLDvA/nFAbRdW7WG2bQ== X-Received: by 2002:a05:600c:468d:b0:407:4944:76dc with SMTP id p13-20020a05600c468d00b00407494476dcmr8283375wmo.20.1697026179201; Wed, 11 Oct 2023 05:09:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:38 -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 35/62] pinctrl: remove pinctrl_gpio_set_config() Date: Wed, 11 Oct 2023 14:08:03 +0200 Message-Id: <20231011120830.49324-36-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski There are no more users of pinctrl_gpio_set_config() so remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 38 ++++++++++++++------------------ include/linux/pinctrl/consumer.h | 1 - 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 9f8027f381b6..99514119c2bd 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -904,27 +904,6 @@ int pinctrl_gpio_direction_output_new(struct gpio_chip= *gc, unsigned int offset) } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output_new); =20 -/* This function is deprecated and will be removed. Don't use. */ -int pinctrl_gpio_set_config(unsigned gpio, unsigned long config) -{ - unsigned long configs[] =3D { config }; - struct pinctrl_gpio_range *range; - struct pinctrl_dev *pctldev; - int ret, pin; - - ret =3D pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) - return ret; - - mutex_lock(&pctldev->mutex); - pin =3D gpio_to_pin(range, gpio); - ret =3D pinconf_set_config(pctldev, pin, configs, ARRAY_SIZE(configs)); - mutex_unlock(&pctldev->mutex); - - return ret; -} -EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config); - /** * pinctrl_gpio_set_config_new() - Apply config to given GPIO pin * @gc: GPIO chip structure from the GPIO subsystem @@ -938,7 +917,22 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config); int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, unsigned long config) { - return pinctrl_gpio_set_config(gc->base + offset, config); + unsigned long configs[] =3D { config }; + struct pinctrl_gpio_range *range; + struct pinctrl_dev *pctldev; + int ret, pin; + + ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, + &range); + if (ret) + return ret; + + mutex_lock(&pctldev->mutex); + pin =3D gpio_to_pin(range, gc->base + offset); + ret =3D pinconf_set_config(pctldev, pin, configs, ARRAY_SIZE(configs)); + mutex_unlock(&pctldev->mutex); + + return ret; } EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config_new); =20 diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 4fdc0e570329..bcd09f584525 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -33,7 +33,6 @@ int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_set_config(unsigned gpio, unsigned long config); int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, unsigned long config); =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77776CD6E5D for ; Wed, 11 Oct 2023 12:12:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346854AbjJKMMe (ORCPT ); Wed, 11 Oct 2023 08:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234946AbjJKMMS (ORCPT ); Wed, 11 Oct 2023 08:12:18 -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 44FF51702 for ; Wed, 11 Oct 2023 05:10:01 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4060b623e64so5627705e9.0 for ; Wed, 11 Oct 2023 05:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026180; x=1697630980; 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=Ym+lGOiXrLf/f0DbNS5vfxnOIvt8z3Dra3kRtB7r3BY=; b=mW72BsQjzS2uELChPLdKJcGvRE0RNG+FHz5J5TAxCnVeBXHXcf4cKdFjc+/0sZHmzs kivozQ5g+wMl2o+BfB+2lzaJFEdu1V22L9IjkrSLcmkhiIlCEjy2d2AO1H6nKcfmGhLM PWNk0i4CpajIv2JLblmAuiLXnSRDG/KcLiASBg9YGs767I4illxyjNko7BcE+d6Nxezt 03GAhV3YUOehFrQ/RxBDC05efX+vs9CzRC2OhLZOykxtn+R10dPXSYrvo1CAVJV8XZl6 qYjjz4EaNW5ehjDlKC/FxSeDyMDxlOv0MazN/yNFf/DS3adrAQM10xmeluqr8M/7ZebA 4VPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026180; x=1697630980; 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=Ym+lGOiXrLf/f0DbNS5vfxnOIvt8z3Dra3kRtB7r3BY=; b=B4ZUiYFXc3y5sVhAeRjgGRyV9mDzVZds9GkV21w4MnJ+mF/XYYC3KAT6AgpZwTM7u2 FI/X8tsLucbSCVGE0pUrh2FzP0uPORjHnrac0xp0or1rEzzSUqxf7t+aeQeWAUtOOuca U1p556GC+wZq59xygAWJ09iLx8KESCwWz08jLl4Tb2AoUKeDu0+oCgVyYxg4CqED3PfF tJO9Qjc5r7KrBAiXaZpALW0wmdWpTSvqujMXUDl23QYn5d2ey3ZG/VyEKk8p5TXZWVEA nrIyUh5J5gtfc5qPaFTZt52U7KkNLBQy7QNY1qjO9J3s+4J/CTjHSsWqeOeBdgVIACEx xA7w== X-Gm-Message-State: AOJu0YxXSCV2ugRypU96lOlDXCdRBvzLm48yP1FJXFlqjTZ4VTUkLm1+ Lbq16HuA3UdTvejCyHWDhPos1w== X-Google-Smtp-Source: AGHT+IGpDIm9Zgn0zQNDDt75Bdh7Sxc6oPaB9ssRSL02k06JvL7YWItC+HcBNLZizFTtalkCPv2H8Q== X-Received: by 2002:a05:600c:1e2a:b0:402:ebe1:7960 with SMTP id ay42-20020a05600c1e2a00b00402ebe17960mr15507087wmb.2.1697026180119; Wed, 11 Oct 2023 05:09:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:39 -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 36/62] treewide: rename pinctrl_gpio_can_use_line_new() Date: Wed, 11 Oct 2023 14:08:04 +0200 Message-Id: <20231011120830.49324-37-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Now that pinctrl_gpio_can_use_line() is no longer used, let's drop the '_new' suffix from its improved variant. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpiolib-cdev.c | 2 +- drivers/pinctrl/core.c | 4 ++-- include/linux/pinctrl/consumer.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 54ee075410db..02ffda6c1e51 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2287,7 +2287,7 @@ static void gpio_desc_to_lineinfo(struct gpio_desc *d= esc, * FIXME: find a non-racy way to retrieve this information. Maybe a * lock common to both frameworks? */ - ok_for_pinctrl =3D pinctrl_gpio_can_use_line_new(gc, info->offset); + ok_for_pinctrl =3D pinctrl_gpio_can_use_line(gc, info->offset); =20 spin_lock_irqsave(&gpio_lock, flags); =20 diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 99514119c2bd..2c8d0ef798f5 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -755,7 +755,7 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctl= dev, return -EINVAL; } =20 -bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et) +bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset) { struct pinctrl_dev *pctldev; struct pinctrl_gpio_range *range; @@ -781,7 +781,7 @@ bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc= , unsigned int offset) =20 return result; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); =20 /** * pinctrl_gpio_request_new() - request a single pin to be used as GPIO diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index bcd09f584525..220f69f342e1 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -26,7 +26,7 @@ struct pinctrl_state; #ifdef CONFIG_PINCTRL =20 /* External interface to pin control */ -bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offs= et); +bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, @@ -73,7 +73,7 @@ static inline bool pinctrl_gpio_can_use_line(unsigned gpi= o) } =20 static inline bool -pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset) +pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset) { return true; } --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADE01CD6E63 for ; Wed, 11 Oct 2023 12:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346848AbjJKMXb (ORCPT ); Wed, 11 Oct 2023 08:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346870AbjJKMXK (ORCPT ); Wed, 11 Oct 2023 08:23:10 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D32F091 for ; Wed, 11 Oct 2023 05:10:03 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-325e9cd483eso6397189f8f.2 for ; Wed, 11 Oct 2023 05:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026181; x=1697630981; 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=rTYBgbzA/nOA5w7jzT/+OjvsvBmscN77IyfTCYZLhsA=; b=X1ltQVEDv3tLnt5SfX4Y5P9Y0lXSThaSsEhVMfqfoFrnhgpQmE9JziKc5LH5znlcoD HrU2HnJ2r/nFJpZkw6CNgrCdMLYB26VhZ6Ge6KqPsFbl3Xlz2WAlGwu0zRpxsv8vQohr RHeQPHIrVUnSwR5dvN+mGWaxcz1xULd3gV8SBsyGs810WqoyA6+5Y8rv8YMOC4YAmBza 5FVkr/tZdoXW5HhQyyplqvjJaDv8WbSrfvuwZcLkkLFTRUxL5EVQ6CYT2GyM+xNaeVYl 6jYLqV8dmjGjFMqaPlDJqFsauRUmX378L4mFm5GaH0RiEI2PiORW79Xqlr1AlYcxej8H eG0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026181; x=1697630981; 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=rTYBgbzA/nOA5w7jzT/+OjvsvBmscN77IyfTCYZLhsA=; b=jbKz0woOUoRZw5DrSiVgvEWDtXGEbdrTX8C5ceJhG+Ig40S/tGi9zSuFmgb2eN7N6E uwAey+gL4Tf9OHEnZhu2sJbBBVzzMygE96ML8F+re3u5nf0V4f7iwasoQX8erRtdTKE3 mMZc3XbAHyOI6AsIPXipnkBMRABk4MSWo6XcE2aXBBFMFb/kZfeIw97+RUhU21FhAsD3 N2p5szQaSBJn1cQyGwfMdLzDHSewKRCMhJ8hgLIIHik67WbHa3/hi9TvbW/ZMf2aC4ty OSsn5LPCU+zIw72zFZsF2theGSA5kdn3h9pnnpRxMdBQrMlkFgmlBepzFti7lDX8wFKP 5iHg== X-Gm-Message-State: AOJu0YxRjpYqEWxPxDq1VWTd8nX5pSSOuaa1iXQtu+DfxxwaOsVm/N1P tSFzUSKnkq1I3NZS7q2OFQkO1Q== X-Google-Smtp-Source: AGHT+IGHZ/PFdhjR/5K1C7uzdVgnB9ZFfY7bKq1ghGP5Zjg/Uy+3Xk0x+KNbaVH79vPI3snaTwy1pA== X-Received: by 2002:a05:6000:184b:b0:32c:9fc6:d32 with SMTP id c11-20020a056000184b00b0032c9fc60d32mr4851654wri.37.1697026181015; Wed, 11 Oct 2023 05:09:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:40 -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 37/62] treewide: rename pinctrl_gpio_request_new() Date: Wed, 11 Oct 2023 14:08:05 +0200 Message-Id: <20231011120830.49324-38-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Now that pinctrl_gpio_request() is no longer used, let's drop the '_new' suffix from its improved variant. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-aspeed.c | 2 +- drivers/gpio/gpio-em.c | 2 +- drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-tegra.c | 2 +- drivers/gpio/gpiolib.c | 2 +- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- drivers/pinctrl/core.c | 6 +++--- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 2 +- drivers/pinctrl/renesas/gpio.c | 2 +- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 +- drivers/pinctrl/renesas/pinctrl-rzv2m.c | 2 +- drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +- drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 2 +- drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 2 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- include/linux/pinctrl/consumer.h | 4 ++-- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index d3aa1cfd4ace..af851c89cacc 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -750,7 +750,7 @@ static int aspeed_gpio_request(struct gpio_chip *chip, = unsigned int offset) if (!have_gpio(gpiochip_get_data(chip), offset)) return -ENODEV; =20 - return pinctrl_gpio_request_new(chip, offset); + return pinctrl_gpio_request(chip, offset); } =20 static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 35c65ff43f71..08c5427deb71 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -229,7 +229,7 @@ static int em_gio_to_irq(struct gpio_chip *chip, unsign= ed offset) =20 static int em_gio_request(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_request_new(chip, offset); + return pinctrl_gpio_request(chip, offset); } =20 static void em_gio_free(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 47121e1a6d4e..8c98730a7ad2 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -275,7 +275,7 @@ static int gpio_rcar_request(struct gpio_chip *chip, un= signed offset) return error; } =20 - error =3D pinctrl_gpio_request_new(chip, offset); + error =3D pinctrl_gpio_request(chip, offset); if (error) pm_runtime_put(p->dev); =20 diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 08951ddcd294..c974ba368d18 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -139,7 +139,7 @@ static void tegra_gpio_disable(struct tegra_gpio_info *= tgi, unsigned int gpio) =20 static int tegra_gpio_request(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_request_new(chip, offset); + return pinctrl_gpio_request(chip, offset); } =20 static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index cec816b46679..c3daf819af76 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1965,7 +1965,7 @@ int gpiochip_generic_request(struct gpio_chip *gc, un= signed int offset) return 0; #endif =20 - return pinctrl_gpio_request_new(gc, offset); + return pinctrl_gpio_request(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_request); =20 diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm= /pinctrl-iproc-gpio.c index fb98c3e14743..8162dd840933 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -335,7 +335,7 @@ static int iproc_gpio_request(struct gpio_chip *gc, uns= igned offset) if (!chip->pinmux_is_supported) return 0; =20 - return pinctrl_gpio_request_new(gc, offset); + return pinctrl_gpio_request(gc, offset); } =20 static void iproc_gpio_free(struct gpio_chip *gc, unsigned offset) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 2c8d0ef798f5..175240a354b7 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -784,7 +784,7 @@ bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, un= signed int offset) EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); =20 /** - * pinctrl_gpio_request_new() - request a single pin to be used as GPIO + * pinctrl_gpio_request() - request a single pin to be used as GPIO * @gc: GPIO chip structure from the GPIO subsystem * @offset: hardware offset of the GPIO relative to the controller * @@ -792,7 +792,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); * as part of their gpio_request() semantics, platforms and individual dri= vers * shall *NOT* request GPIO pins to be muxed in. */ -int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset) +int pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset) { struct pinctrl_gpio_range *range; struct pinctrl_dev *pctldev; @@ -817,7 +817,7 @@ int pinctrl_gpio_request_new(struct gpio_chip *gc, unsi= gned int offset) =20 return ret; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_request); =20 /** * pinctrl_gpio_free_new() - free control on a single pin, currently used = as GPIO diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm7xx.c index 62134a7f0b4e..ad39b8c060b7 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -201,7 +201,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip= , unsigned int offset) int ret; =20 dev_dbg(chip->parent, "gpio_request: offset%d\n", offset); - ret =3D pinctrl_gpio_request_new(chip, offset); + ret =3D pinctrl_gpio_request(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm8xx.c index 0b6d6964087e..dd4532ae62bf 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -198,7 +198,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip= , unsigned int offset) struct npcm8xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_request_new(chip, offset); + ret =3D pinctrl_gpio_request(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/renesas/gpio.c b/drivers/pinctrl/renesas/gpio.c index e7771a57e6d1..0c4f4d8d0891 100644 --- a/drivers/pinctrl/renesas/gpio.c +++ b/drivers/pinctrl/renesas/gpio.c @@ -135,7 +135,7 @@ static int gpio_pin_request(struct gpio_chip *gc, unsig= ned offset) if (idx < 0 || pfc->info->pins[idx].enum_id =3D=3D 0) return -EINVAL; =20 - return pinctrl_gpio_request_new(gc, offset); + return pinctrl_gpio_request(gc, offset); } =20 static void gpio_pin_free(struct gpio_chip *gc, unsigned offset) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/rene= sas/pinctrl-rzg2l.c index 22d4ab7d228c..c5d247d24374 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -1056,7 +1056,7 @@ static int rzg2l_gpio_request(struct gpio_chip *chip,= unsigned int offset) if (ret) return ret; =20 - ret =3D pinctrl_gpio_request_new(chip, offset); + ret =3D pinctrl_gpio_request(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/rene= sas/pinctrl-rzv2m.c index 3d29c77a5aad..1ec0922f735c 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzv2m.c +++ b/drivers/pinctrl/renesas/pinctrl-rzv2m.c @@ -754,7 +754,7 @@ static int rzv2m_gpio_request(struct gpio_chip *chip, u= nsigned int offset) u8 bit =3D RZV2M_PIN_ID_TO_PIN(offset); int ret; =20 - ret =3D pinctrl_gpio_request_new(chip, offset); + ret =3D pinctrl_gpio_request(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear= /pinctrl-plgpio.c index 7488f6394318..6d3b7ce1c35a 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c @@ -210,7 +210,7 @@ static int plgpio_request(struct gpio_chip *chip, unsig= ned offset) if (offset >=3D chip->ngpio) return -EINVAL; =20 - ret =3D pinctrl_gpio_request_new(chip, offset); + ret =3D pinctrl_gpio_request(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7100.c index 22a2db8fa315..88e39f68ef25 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c @@ -918,7 +918,7 @@ static struct pinctrl_desc starfive_desc =3D { =20 static int starfive_gpio_request(struct gpio_chip *gc, unsigned int gpio) { - return pinctrl_gpio_request_new(gc, gpio); + return pinctrl_gpio_request(gc, gpio); } =20 static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7110.c index 5557ef3fbeb2..c458c6fb992f 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -547,7 +547,7 @@ static const struct pinconf_ops jh7110_pinconf_ops =3D { =20 static int jh7110_gpio_request(struct gpio_chip *gc, unsigned int gpio) { - return pinctrl_gpio_request_new(gc, gpio); + return pinctrl_gpio_request(gc, gpio); } =20 static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/= pinctrl-stm32.c index 11d9f07934bd..dddbdc1a64c5 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -217,7 +217,7 @@ static int stm32_gpio_request(struct gpio_chip *chip, u= nsigned offset) return -EINVAL; } =20 - return pinctrl_gpio_request_new(chip, offset); + return pinctrl_gpio_request(chip, offset); } =20 static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 220f69f342e1..4aa22af8e4e4 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -27,7 +27,7 @@ struct pinctrl_state; =20 /* External interface to pin control */ bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); +int pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset); void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset); @@ -84,7 +84,7 @@ static inline int pinctrl_gpio_request(unsigned gpio) } =20 static inline int -pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset) +pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset) { return 0; } --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E9D0CD6E60 for ; Wed, 11 Oct 2023 12:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346766AbjJKMUw (ORCPT ); Wed, 11 Oct 2023 08:20:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235001AbjJKMU3 (ORCPT ); Wed, 11 Oct 2023 08:20:29 -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 2AADB1716 for ; Wed, 11 Oct 2023 05:10:05 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40684f53ef3so66545755e9.3 for ; Wed, 11 Oct 2023 05:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026182; x=1697630982; 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=35V8jvCQIw7rAurUbrq7bYE+MEctTdw7nPNJ1A06l4g=; b=njgzRyAoJcga0iVfTY06x/Vnv5iV8CTBpVEFs7kPsBUW85uRx7qsPYc5niVmAdJXTt c3C3w60yRkPPNyAjN/rbyScPs7rvQbUb6vAWYlkjMYK8zsHMO66viX21Qi5E/+EPxeEM vj2LfDIAEGJZ2oBhyHBty5m5y8NTvLrUkxSxVhZPxRvZHgPbPSK5E4flw8BdCMIJgIb/ Dcw1pwTrKlTmN8/Rlvsa+WwsR4KIMgsc1z8CfsxryLGl9LyD8JGdEpZ1Q4M448GUEnjg FFcIqByUMOB35no3I+q78CUTEf5XqRx7Gg78JoQMChgCYBiG8l5OLX2bF8cTn4s8dWHA NHzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026182; x=1697630982; 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=35V8jvCQIw7rAurUbrq7bYE+MEctTdw7nPNJ1A06l4g=; b=LtoeysS0x56I9U5IKlf+16N3y4UsrEbuwmgAwWfonqxcZvIP2vb3iJFK1ChV3f6LHe ZO47X0IAic7S6wzu4U2mt1BigyS7e3CL9OAGoG+CK9/kr3NfmQCv83OZkq07SpQheUwn 1XtwpAdLSayrtj3REOm8MZDj3S9gDNvJI0oUgUrxbHfQDoXkbBH4oblHe5MTuE/dbTBU MHX0DdtGN9pWyGWy9hoA3Jt0FTLP8+XLMJYl+mx3nbKgeRu4k5FOar9KJMFvNMAb0RSJ PzlvPrLcxu/i1Ta31abnVoCKwdOLKJsh2rpYHAd0d/sXcDQ3vg8sIQv03v6diunxEOHE lCsA== X-Gm-Message-State: AOJu0YwsPzB9tkgLxLbI3FytqUkcevwmmDgAa3uhClv5UR+SGGZpG30G /FdVfEzWRyeG0B5qwftH3t/ixw== X-Google-Smtp-Source: AGHT+IHcSrMJ+J2Z0SfCu4Y3ghOb4tA4yxUcD9YIt3siGmlFrbgCwexfGzP7ItwZjdr5k8VZB2p4LA== X-Received: by 2002:a05:600c:2298:b0:406:4573:81d2 with SMTP id 24-20020a05600c229800b00406457381d2mr17692837wmf.39.1697026181996; Wed, 11 Oct 2023 05:09:41 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:41 -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 38/62] treewide: rename pinctrl_gpio_free_new() Date: Wed, 11 Oct 2023 14:08:06 +0200 Message-Id: <20231011120830.49324-39-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Now that pinctrl_gpio_free()() is no longer used, let's drop the '_new' suffix from its improved variant. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-aspeed.c | 2 +- drivers/gpio/gpio-em.c | 2 +- drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-tegra.c | 2 +- drivers/gpio/gpiolib.c | 2 +- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- drivers/pinctrl/core.c | 6 +++--- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 2 +- drivers/pinctrl/renesas/gpio.c | 2 +- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 +- drivers/pinctrl/renesas/pinctrl-rzv2m.c | 2 +- drivers/pinctrl/spear/pinctrl-plgpio.c | 4 ++-- drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 2 +- drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 2 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- include/linux/pinctrl/consumer.h | 4 ++-- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index af851c89cacc..4c417c8486dd 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -755,7 +755,7 @@ static int aspeed_gpio_request(struct gpio_chip *chip, = unsigned int offset) =20 static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } =20 static int usecs_to_cycles(struct aspeed_gpio *gpio, unsigned long usecs, diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 08c5427deb71..aa31c189d0ef 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -234,7 +234,7 @@ static int em_gio_request(struct gpio_chip *chip, unsig= ned offset) =20 static void em_gio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); =20 /* Set the GPIO as an input to ensure that the next GPIO request won't * drive the GPIO pin as an output. diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 8c98730a7ad2..6159fda38d5d 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -286,7 +286,7 @@ static void gpio_rcar_free(struct gpio_chip *chip, unsi= gned offset) { struct gpio_rcar_priv *p =3D gpiochip_get_data(chip); =20 - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); =20 /* * Set the GPIO as an input to ensure that the next GPIO request won't diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index c974ba368d18..fcb3b474d1df 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -146,7 +146,7 @@ static void tegra_gpio_free(struct gpio_chip *chip, uns= igned int offset) { struct tegra_gpio_info *tgi =3D gpiochip_get_data(chip); =20 - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); tegra_gpio_disable(tgi, offset); } =20 diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index c3daf819af76..0c499cff3fad 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1981,7 +1981,7 @@ void gpiochip_generic_free(struct gpio_chip *gc, unsi= gned int offset) return; #endif =20 - pinctrl_gpio_free_new(gc, offset); + pinctrl_gpio_free(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_free); =20 diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm= /pinctrl-iproc-gpio.c index 8162dd840933..fd5ce52d05b1 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -345,7 +345,7 @@ static void iproc_gpio_free(struct gpio_chip *gc, unsig= ned offset) if (!chip->pinmux_is_supported) return; =20 - pinctrl_gpio_free_new(gc, offset); + pinctrl_gpio_free(gc, offset); } =20 static int iproc_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 175240a354b7..fa7f8dc5e5d8 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -820,7 +820,7 @@ int pinctrl_gpio_request(struct gpio_chip *gc, unsigned= int offset) EXPORT_SYMBOL_GPL(pinctrl_gpio_request); =20 /** - * pinctrl_gpio_free_new() - free control on a single pin, currently used = as GPIO + * pinctrl_gpio_free() - free control on a single pin, currently used as G= PIO * @gc: GPIO chip structure from the GPIO subsystem * @offset: hardware offset of the GPIO relative to the controller * @@ -828,7 +828,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_request); * as part of their gpio_request() semantics, platforms and individual dri= vers * shall *NOT* request GPIO pins to be muxed in. */ -void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset) +void pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset) { struct pinctrl_gpio_range *range; struct pinctrl_dev *pctldev; @@ -848,7 +848,7 @@ void pinctrl_gpio_free_new(struct gpio_chip *gc, unsign= ed int offset) =20 mutex_unlock(&pctldev->mutex); } -EXPORT_SYMBOL_GPL(pinctrl_gpio_free_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_free); =20 static int pinctrl_gpio_direction(unsigned gpio, bool input) { diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm7xx.c index ad39b8c060b7..ab7cfc1e66f0 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -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_new(chip, offset); + pinctrl_gpio_free(chip, offset); } =20 static void npcmgpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm8xx.c index dd4532ae62bf..78dbeef6af86 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -207,7 +207,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip= , unsigned int offset) =20 static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } =20 static void npcmgpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/renesas/gpio.c b/drivers/pinctrl/renesas/gpio.c index 0c4f4d8d0891..b39125a632b0 100644 --- a/drivers/pinctrl/renesas/gpio.c +++ b/drivers/pinctrl/renesas/gpio.c @@ -140,7 +140,7 @@ static int gpio_pin_request(struct gpio_chip *gc, unsig= ned offset) =20 static void gpio_pin_free(struct gpio_chip *gc, unsigned offset) { - return pinctrl_gpio_free_new(gc, offset); + return pinctrl_gpio_free(gc, offset); } =20 static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset, diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/rene= sas/pinctrl-rzg2l.c index c5d247d24374..9de350ad7e7d 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -1181,7 +1181,7 @@ static void rzg2l_gpio_free(struct gpio_chip *chip, u= nsigned int offset) { unsigned int virq; =20 - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); =20 virq =3D irq_find_mapping(chip->irq.domain, offset); if (virq) diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/rene= sas/pinctrl-rzv2m.c index 1ec0922f735c..21d7d5ac8c4a 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzv2m.c +++ b/drivers/pinctrl/renesas/pinctrl-rzv2m.c @@ -832,7 +832,7 @@ static int rzv2m_gpio_get(struct gpio_chip *chip, unsig= ned int offset) =20 static void rzv2m_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); =20 /* * Set the GPIO as an input to ensure that the next GPIO request won't diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear= /pinctrl-plgpio.c index 6d3b7ce1c35a..a05570c7d833 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c @@ -248,7 +248,7 @@ static int plgpio_request(struct gpio_chip *chip, unsig= ned offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); err0: - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); return ret; } =20 @@ -278,7 +278,7 @@ static void plgpio_free(struct gpio_chip *chip, unsigne= d offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); =20 - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } =20 /* PLGPIO IRQ */ diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7100.c index 88e39f68ef25..7beed57d665a 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c @@ -923,7 +923,7 @@ static int starfive_gpio_request(struct gpio_chip *gc, = unsigned int gpio) =20 static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free_new(gc, gpio); + pinctrl_gpio_free(gc, gpio); } =20 static int starfive_gpio_get_direction(struct gpio_chip *gc, unsigned int = gpio) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7110.c index c458c6fb992f..695c8c0a6e8b 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -552,7 +552,7 @@ static int jh7110_gpio_request(struct gpio_chip *gc, un= signed int gpio) =20 static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free_new(gc, gpio); + pinctrl_gpio_free(gc, gpio); } =20 static int jh7110_gpio_get_direction(struct gpio_chip *gc, diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/= pinctrl-stm32.c index dddbdc1a64c5..e4453fa58f9e 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -222,7 +222,7 @@ static int stm32_gpio_request(struct gpio_chip *chip, u= nsigned offset) =20 static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } =20 static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset) diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 4aa22af8e4e4..7dc7fcf23f9a 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -28,7 +28,7 @@ struct pinctrl_state; /* External interface to pin control */ bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset); -void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset); +void pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, @@ -94,7 +94,7 @@ static inline void pinctrl_gpio_free(unsigned gpio) } =20 static inline void -pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset) +pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset) { } =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C62C3CD6E5D for ; Wed, 11 Oct 2023 12:21:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235060AbjJKMVj (ORCPT ); Wed, 11 Oct 2023 08:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235084AbjJKMUi (ORCPT ); Wed, 11 Oct 2023 08:20:38 -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 3A4BA1724 for ; Wed, 11 Oct 2023 05:10:08 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-406618d0992so65245355e9.0 for ; Wed, 11 Oct 2023 05:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026183; x=1697630983; 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=VpFrwYJaNCpP9/pahd8WXPSb6KpKEJe0UkhDGdY3T54=; b=DRQ4C+sELbmHedX9H3kFXlaFAzHfhR1/ZsDTEzfN2K2E2J26e3Z+IOGTFBZdCIqv2+ E6F5bb7KMXD8/xXh3dH08qnE4exgKKH/kkY1xt3s0wankE2ZG8ySvubXTos9y0xjR1Vf Dm4PvJJ7Q3l2gk6HLGc02dUcSb+wmIblC9Zb4VnP6EvIlNnoYsYbKboyK4rNBxciMR/B GkwUIdeDwdkReIE28VlGK+WTv2ZRGH/yxoJxje55E1OAn9DqIVl4/i0Ueo6t1GdZPiuq 0INKIbMqlSkExdtflAKqL1Q2lfjMy37qyU0oNZhx+Lv2sP3eqlfh5duWJAq3eG4oJnof Pc6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026183; x=1697630983; 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=VpFrwYJaNCpP9/pahd8WXPSb6KpKEJe0UkhDGdY3T54=; b=vuGhPf/zc+ieRn90qAze6vYWQ6DbWp5qqDTtjy7YYu2vDovd7M2LoZdXNavRzx+sZY cFB4VZwJXfXcU/grMt7NlrMOm9NqaKGFqFQ+MDn+zYhHir98biyLr9UxhwImIpEJwD5r lvEEcIQ9HbljJu6peN/boC2+94OqTi6uMJhmocBCbpnOIxRqipWGDi1yFP/h03fBhqTD Zb3wCOWcZ9Bszhyeq8Dxw2JgBR1XH6nWNV/5HLmNyOUZrDrN0SPXvwXjpC689BDGIFpw fFF/d0op2cGa4DjamEhHinLrH8P1WeDZY9aBivlOR0UWGHZxUq9e/SHxL5AGNZEL/qP4 MxWg== X-Gm-Message-State: AOJu0YxgNfXy0R5VA8Ovgs+svPpMyiGjk24ZUjs5In1i8Op8vlyc8Zks pP8mk85GAw87vi4lCspgX35A0g== X-Google-Smtp-Source: AGHT+IGwUQzNqMtGi60/98rHQyQT8aoMQezAMaiODGWe09qopyLwc+LFhwMCoubtb8kDaMZqmdjFmA== X-Received: by 2002:a7b:cbcf:0:b0:406:545a:f8fe with SMTP id n15-20020a7bcbcf000000b00406545af8femr18580572wmi.29.1697026182935; Wed, 11 Oct 2023 05:09:42 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:42 -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 39/62] treewide: rename pinctrl_gpio_direction_input_new() Date: Wed, 11 Oct 2023 14:08:07 +0200 Message-Id: <20231011120830.49324-40-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Now that pinctrl_gpio_direction_input() is no longer used, let's drop the '_new' suffix from its improved variant. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-mvebu.c | 2 +- drivers/gpio/gpio-pxa.c | 2 +- drivers/gpio/gpio-rockchip.c | 2 +- drivers/gpio/gpio-tegra.c | 2 +- drivers/gpio/gpio-vf610.c | 2 +- drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 2 +- drivers/pinctrl/core.c | 6 +++--- drivers/pinctrl/intel/pinctrl-cherryview.c | 2 +- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 2 +- drivers/pinctrl/mediatek/pinctrl-moore.c | 2 +- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 +- drivers/pinctrl/mediatek/pinctrl-paris.c | 2 +- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 2 +- drivers/pinctrl/pinctrl-as3722.c | 2 +- drivers/pinctrl/pinctrl-axp209.c | 2 +- drivers/pinctrl/pinctrl-cy8c95x0.c | 2 +- drivers/pinctrl/pinctrl-ingenic.c | 2 +- drivers/pinctrl/pinctrl-ocelot.c | 2 +- drivers/pinctrl/pinctrl-rk805.c | 2 +- drivers/pinctrl/pinctrl-st.c | 2 +- drivers/pinctrl/renesas/gpio.c | 2 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 +- include/linux/pinctrl/consumer.h | 6 +++--- 26 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index d7eae6f0430d..3d1f941191e7 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -346,7 +346,7 @@ static int mvebu_gpio_direction_input(struct gpio_chip = *chip, unsigned int pin) * Check with the pinctrl driver whether this pin is usable as * an input GPIO */ - ret =3D pinctrl_gpio_direction_input_new(chip, pin); + ret =3D pinctrl_gpio_direction_input(chip, pin); if (ret) return ret; =20 diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 2fd797b91270..c60197d5fde0 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -260,7 +260,7 @@ static int pxa_gpio_direction_input(struct gpio_chip *c= hip, unsigned offset) int ret; =20 if (pxa_gpio_has_pinctrl()) { - ret =3D pinctrl_gpio_direction_input_new(chip, offset); + ret =3D pinctrl_gpio_direction_input(chip, offset); if (ret) return ret; } diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 3576793f0bd9..05afb67fd677 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -159,7 +159,7 @@ static int rockchip_gpio_set_direction(struct gpio_chip= *chip, =20 =20 if (input) - pinctrl_gpio_direction_input_new(chip, offset); + pinctrl_gpio_direction_input(chip, offset); else pinctrl_gpio_direction_output_new(chip, offset); =20 diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index fcb3b474d1df..a9a00b28cc55 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -179,7 +179,7 @@ static int tegra_gpio_direction_input(struct gpio_chip = *chip, tegra_gpio_mask_write(tgi, GPIO_MSK_OE(tgi, offset), offset, 0); tegra_gpio_enable(tgi, offset); =20 - ret =3D pinctrl_gpio_direction_input_new(chip, offset); + ret =3D pinctrl_gpio_direction_input(chip, offset); if (ret < 0) dev_err(tgi->dev, "Failed to set pinctrl input direction of GPIO %d: %d", diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index 2c22a31ffbdc..fd1c06abb5a7 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -130,7 +130,7 @@ static int vf610_gpio_direction_input(struct gpio_chip = *chip, unsigned gpio) vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR); } =20 - return pinctrl_gpio_direction_input_new(chip, gpio); + return pinctrl_gpio_direction_input(chip, gpio); } =20 static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gp= io, diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cir= rus/pinctrl-cs42l43.c index 097e4dcdda36..e35964359381 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -508,7 +508,7 @@ static void cs42l43_gpio_set(struct gpio_chip *chip, un= signed int offset, int va =20 static int cs42l43_gpio_direction_in(struct gpio_chip *chip, unsigned int = offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int cs42l43_gpio_direction_out(struct gpio_chip *chip, diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index fa7f8dc5e5d8..46f6510194de 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -874,7 +874,7 @@ static int pinctrl_gpio_direction(unsigned gpio, bool i= nput) } =20 /** - * pinctrl_gpio_direction_input_new() - request a GPIO pin to go into inpu= t mode + * pinctrl_gpio_direction_input() - request a GPIO pin to go into input mo= de * @gc: GPIO chip structure from the GPIO subsystem * @offset: hardware offset of the GPIO relative to the controller * @@ -882,11 +882,11 @@ static int pinctrl_gpio_direction(unsigned gpio, bool= input) * as part of their gpio_direction_input() semantics, platforms and indivi= dual * drivers shall *NOT* touch pin control GPIO calls. */ -int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int of= fset) +int pinctrl_gpio_direction_input(struct gpio_chip *gc, unsigned int offset) { return pinctrl_gpio_direction(gc->base + offset, true); } -EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); =20 /** * pinctrl_gpio_direction_output_new() - request a GPIO pin to go into out= put diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/i= ntel/pinctrl-cherryview.c index 02202cac8fec..31b5ce821b76 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1172,7 +1172,7 @@ static int chv_gpio_get_direction(struct gpio_chip *c= hip, unsigned int offset) =20 static int chv_gpio_direction_input(struct gpio_chip *chip, unsigned int o= ffset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int chv_gpio_direction_output(struct gpio_chip *chip, unsigned int = offset, diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/= pinctrl-intel.c index 271aa60dbe9e..7710236423bc 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -991,7 +991,7 @@ static int intel_gpio_get_direction(struct gpio_chip *c= hip, unsigned int offset) =20 static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned int= offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned in= t offset, diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/in= tel/pinctrl-lynxpoint.c index 91d228fead45..b4174829e1f9 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -541,7 +541,7 @@ static void lp_gpio_set(struct gpio_chip *chip, unsigne= d int offset, int value) =20 static int lp_gpio_direction_input(struct gpio_chip *chip, unsigned int of= fset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int o= ffset, diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/med= iatek/pinctrl-moore.c index dc41ffa31357..5a5ec00e32ea 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.c +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -512,7 +512,7 @@ static void mtk_gpio_set(struct gpio_chip *chip, unsign= ed int gpio, int value) =20 static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int g= pio) { - return pinctrl_gpio_direction_input_new(chip, gpio); + return pinctrl_gpio_direction_input(chip, gpio); } =20 static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int = gpio, diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctr= l/mediatek/pinctrl-mtk-common.c index fc046415b567..b2dc3072050a 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -811,7 +811,7 @@ static const struct pinmux_ops mtk_pmx_ops =3D { static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int mtk_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/med= iatek/pinctrl-paris.c index 14b151aec2f9..d8c969e506ce 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -916,7 +916,7 @@ static int mtk_gpio_direction_input(struct gpio_chip *c= hip, unsigned int gpio) if (gpio >=3D hw->soc->npins) return -EINVAL; =20 - return pinctrl_gpio_direction_input_new(chip, gpio); + return pinctrl_gpio_direction_input(chip, gpio); } =20 static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int = gpio, diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm7xx.c index ab7cfc1e66f0..d7ce67242248 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 *c= hip, unsigned int offset) struct npcm7xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_direction_input_new(chip, offset); + ret =3D pinctrl_gpio_direction_input(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm8xx.c index 78dbeef6af86..c22513e30068 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 *c= hip, unsigned int offset) struct npcm8xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_direction_input_new(chip, offset); + ret =3D pinctrl_gpio_direction_input(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3= 722.c index 3d3adf9793fb..3f27da80adde 100644 --- a/drivers/pinctrl/pinctrl-as3722.c +++ b/drivers/pinctrl/pinctrl-as3722.c @@ -502,7 +502,7 @@ static void as3722_gpio_set(struct gpio_chip *chip, uns= igned offset, =20 static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned of= fset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int as3722_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp= 209.c index d7f081f1d1f6..a6eb3b866a23 100644 --- a/drivers/pinctrl/pinctrl-axp209.c +++ b/drivers/pinctrl/pinctrl-axp209.c @@ -126,7 +126,7 @@ static int axp20x_gpio_get_reg(unsigned int offset) =20 static int axp20x_gpio_input(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int axp20x_gpio_get(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-c= y8c95x0.c index 8c6006353515..729c13a249ef 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -554,7 +554,7 @@ static int cy8c95x0_read_regs_mask(struct cy8c95x0_pinc= trl *chip, int reg, =20 static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned in= t off) { - return pinctrl_gpio_direction_input_new(gc, off); + return pinctrl_gpio_direction_input(gc, off); } =20 static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-in= genic.c index 5072fb907193..df36141edbf3 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -3563,7 +3563,7 @@ static int ingenic_gpio_get(struct gpio_chip *gc, uns= igned int offset) static int ingenic_gpio_direction_input(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_direction_input_new(gc, offset); + return pinctrl_gpio_direction_input(gc, offset); } =20 static int ingenic_gpio_direction_output(struct gpio_chip *gc, diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-oce= lot.c index a6022d44ad6c..d02d16084f33 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1779,7 +1779,7 @@ static int ocelot_gpio_get_direction(struct gpio_chip= *chip, static int ocelot_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int ocelot_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/pinctrl-rk805.c b/drivers/pinctrl/pinctrl-rk80= 5.c index 58e6dd932bc7..f0feb3a8e630 100644 --- a/drivers/pinctrl/pinctrl-rk805.c +++ b/drivers/pinctrl/pinctrl-rk805.c @@ -289,7 +289,7 @@ static void rk805_gpio_set(struct gpio_chip *chip, static int rk805_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int rk805_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index ec763572ab3e..3f6631716779 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -719,7 +719,7 @@ static void st_gpio_set(struct gpio_chip *chip, unsigne= d offset, int value) =20 static int st_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_direction_input_new(chip, offset); + pinctrl_gpio_direction_input(chip, offset); =20 return 0; } diff --git a/drivers/pinctrl/renesas/gpio.c b/drivers/pinctrl/renesas/gpio.c index b39125a632b0..54346b7fcdef 100644 --- a/drivers/pinctrl/renesas/gpio.c +++ b/drivers/pinctrl/renesas/gpio.c @@ -164,7 +164,7 @@ static void gpio_pin_set_value(struct sh_pfc_chip *chip= , unsigned offset, =20 static int gpio_pin_direction_input(struct gpio_chip *gc, unsigned offset) { - return pinctrl_gpio_direction_input_new(gc, offset); + return pinctrl_gpio_direction_input(gc, offset); } =20 static int gpio_pin_direction_output(struct gpio_chip *gc, unsigned offset, diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/= pinctrl-stm32.c index e4453fa58f9e..cbe306f47c0a 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -241,7 +241,7 @@ static void stm32_gpio_set(struct gpio_chip *chip, unsi= gned offset, int value) =20 static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned off= set) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int stm32_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/= pinctrl-wmt.c index 1a313295611e..54cd556a16b8 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -528,7 +528,7 @@ static void wmt_gpio_set_value(struct gpio_chip *chip, = unsigned offset, =20 static int wmt_gpio_direction_input(struct gpio_chip *chip, unsigned offse= t) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } =20 static int wmt_gpio_direction_output(struct gpio_chip *chip, unsigned offs= et, diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 7dc7fcf23f9a..8b7ab935a3d3 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -29,8 +29,8 @@ struct pinctrl_state; bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset); void pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, - unsigned int offset); +int pinctrl_gpio_direction_input(struct gpio_chip *gc, + unsigned int offset); int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, @@ -104,7 +104,7 @@ static inline int pinctrl_gpio_direction_input(unsigned= gpio) } =20 static inline int -pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset) +pinctrl_gpio_direction_input(struct gpio_chip *gc, unsigned int offset) { return 0; } --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0071FCD6E60 for ; Wed, 11 Oct 2023 12:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235026AbjJKMWi (ORCPT ); Wed, 11 Oct 2023 08:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235052AbjJKMWN (ORCPT ); Wed, 11 Oct 2023 08:22:13 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FDE3173D for ; Wed, 11 Oct 2023 05:10:10 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40566f8a093so62354745e9.3 for ; Wed, 11 Oct 2023 05:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026184; x=1697630984; 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=cr+mqMhY0QceHUa4cJ5PUAlov5QDj9F7U6gWCeUJCmk=; b=iYRenB8J+c5iBSpsXw+spsSygfPEv+Jxk3ze02sV9o0EyNNGxcK++QVWeJ6v19Kbr1 NDzJZoUPPL1ul2RixZTiA8YFfSSERmNB0w8+KO7g2eT+ONU5wbbwfHDTHHkxfyPTl+LM yw0WTsvzmNamhA7NNCacH6OhARPaCjCDZ84p4agqgtvFEzPtpaVqzX86sg8ZnvGv7TKi hfg1FhzyPcqF8WFMtNuJdZUI5eu7cmEOr4EVe0hPyh4YjNn1K9xeaTryYdU/QuMlERZa /8mLja4yITD5Fd8NWWsIJw01NRd0y9in+cJMuLilUxwBuSE1JJUDkYAr4C5TJ6eJO/T0 QVmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026184; x=1697630984; 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=cr+mqMhY0QceHUa4cJ5PUAlov5QDj9F7U6gWCeUJCmk=; b=Oyo59Oc/tNzp7stH6aJCwBvV/F5bPEQDP8ZEoz56F+d8aRJAqQuqZo6BbSapZxa6K6 GpONIkSFxUfBcPDB6C/HrwSbPywj8IZKy/HYPzEwFW0h4ZogcJctZiY263w/JIv4NDCa t8YMFhxIX5AlB85dw4JuRff+on9jtZzB2U54TQCBTL29yP4mL7Grf7ewHZDGUnPaCav0 LJ1YQixV1d0kEXeIT0T16CpOXjJ8xQ0GrQS0hnRTno+6y4Ia5gJmqlao6+LWEItrOCPM Yu9+jagK8UO0jy1RTyqZRcC/cLK2rei+OX4PL9d+Ei9InfQJwMLyzWgugR2oUQ5gemcS KHGQ== X-Gm-Message-State: AOJu0YyeVbxzpfcXmj0P78F4byu9WFyRnU/pz+hcLUko+DhsREGAf1hi zX86D0YANukZJ0S20VmLDDEnPg== X-Google-Smtp-Source: AGHT+IHsToK2e5rY4TZFacjkjhrKk1xEwAerZM2fNKtUFzuowV3ufGq03elZ5/sEExfqpLl5kFpq4Q== X-Received: by 2002:a05:600c:1caa:b0:407:5b54:bb15 with SMTP id k42-20020a05600c1caa00b004075b54bb15mr2747779wms.36.1697026183986; Wed, 11 Oct 2023 05:09:43 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:43 -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 40/62] treewide: rename pinctrl_gpio_direction_output_new() Date: Wed, 11 Oct 2023 14:08:08 +0200 Message-Id: <20231011120830.49324-41-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Now that pinctrl_gpio_direction_output() is no longer used, let's drop the '_new' suffix from its improved variant. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-mvebu.c | 2 +- drivers/gpio/gpio-pxa.c | 2 +- drivers/gpio/gpio-rockchip.c | 2 +- drivers/gpio/gpio-tegra.c | 2 +- drivers/gpio/gpio-vf610.c | 2 +- drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 2 +- drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 2 +- drivers/pinctrl/core.c | 7 +++---- drivers/pinctrl/intel/pinctrl-cherryview.c | 2 +- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 2 +- drivers/pinctrl/mediatek/pinctrl-moore.c | 2 +- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 +- drivers/pinctrl/mediatek/pinctrl-paris.c | 2 +- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 2 +- drivers/pinctrl/pinctrl-as3722.c | 2 +- drivers/pinctrl/pinctrl-cy8c95x0.c | 2 +- drivers/pinctrl/pinctrl-ingenic.c | 4 ++-- drivers/pinctrl/pinctrl-ocelot.c | 2 +- drivers/pinctrl/pinctrl-rk805.c | 2 +- drivers/pinctrl/pinctrl-st.c | 2 +- drivers/pinctrl/renesas/gpio.c | 2 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 +- include/linux/pinctrl/consumer.h | 6 +++--- 26 files changed, 31 insertions(+), 32 deletions(-) diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 3d1f941191e7..8342bfc2d3f9 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -366,7 +366,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip= *chip, unsigned int pin, * Check with the pinctrl driver whether this pin is usable as * an output GPIO */ - ret =3D pinctrl_gpio_direction_output_new(chip, pin); + ret =3D pinctrl_gpio_direction_output(chip, pin); if (ret) return ret; =20 diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index c60197d5fde0..91cea97255fa 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -289,7 +289,7 @@ static int pxa_gpio_direction_output(struct gpio_chip *= chip, writel_relaxed(mask, base + (value ? GPSR_OFFSET : GPCR_OFFSET)); =20 if (pxa_gpio_has_pinctrl()) { - ret =3D pinctrl_gpio_direction_output_new(chip, offset); + ret =3D pinctrl_gpio_direction_output(chip, offset); if (ret) return ret; } diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 05afb67fd677..0bd339813110 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -161,7 +161,7 @@ static int rockchip_gpio_set_direction(struct gpio_chip= *chip, if (input) pinctrl_gpio_direction_input(chip, offset); else - pinctrl_gpio_direction_output_new(chip, offset); + pinctrl_gpio_direction_output(chip, offset); =20 raw_spin_lock_irqsave(&bank->slock, flags); rockchip_gpio_writel_bit(bank, offset, data, bank->gpio_regs->port_ddr); diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index a9a00b28cc55..adfbed62eff1 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -199,7 +199,7 @@ static int tegra_gpio_direction_output(struct gpio_chip= *chip, tegra_gpio_mask_write(tgi, GPIO_MSK_OE(tgi, offset), offset, 1); tegra_gpio_enable(tgi, offset); =20 - ret =3D pinctrl_gpio_direction_output_new(chip, offset); + ret =3D pinctrl_gpio_direction_output(chip, offset); if (ret < 0) dev_err(tgi->dev, "Failed to set pinctrl output direction of GPIO %d: %d", diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index fd1c06abb5a7..e3427a6aecff 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -148,7 +148,7 @@ static int vf610_gpio_direction_output(struct gpio_chip= *chip, unsigned gpio, =20 vf610_gpio_set(chip, gpio, value); =20 - return pinctrl_gpio_direction_output_new(chip, gpio); + return pinctrl_gpio_direction_output(chip, gpio); } =20 static void vf610_gpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cir= rus/pinctrl-cs42l43.c index e35964359381..1ba89cf279fb 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -516,7 +516,7 @@ static int cs42l43_gpio_direction_out(struct gpio_chip = *chip, { cs42l43_gpio_set(chip, offset, value); =20 - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static int cs42l43_gpio_add_pin_ranges(struct gpio_chip *chip) diff --git a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c b/drivers/pinctrl/c= irrus/pinctrl-lochnagar.c index f3c8a8c14e14..014297a3fbd2 100644 --- a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c +++ b/drivers/pinctrl/cirrus/pinctrl-lochnagar.c @@ -1098,7 +1098,7 @@ static int lochnagar_gpio_direction_out(struct gpio_c= hip *chip, { lochnagar_gpio_set(chip, offset, value); =20 - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static int lochnagar_fill_func_groups(struct lochnagar_pin_priv *priv) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 46f6510194de..0c583626e50c 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -889,8 +889,7 @@ int pinctrl_gpio_direction_input(struct gpio_chip *gc, = unsigned int offset) EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); =20 /** - * pinctrl_gpio_direction_output_new() - request a GPIO pin to go into out= put - * mode + * pinctrl_gpio_direction_output() - request a GPIO pin to go into output = mode * @gc: GPIO chip structure from the GPIO subsystem * @offset: hardware offset of the GPIO relative to the controller * @@ -898,11 +897,11 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); * as part of their gpio_direction_output() semantics, platforms and indiv= idual * drivers shall *NOT* touch pin control GPIO calls. */ -int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int o= ffset) +int pinctrl_gpio_direction_output(struct gpio_chip *gc, unsigned int offse= t) { return pinctrl_gpio_direction(gc->base + offset, false); } -EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); =20 /** * pinctrl_gpio_set_config_new() - Apply config to given GPIO pin diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/i= ntel/pinctrl-cherryview.c index 31b5ce821b76..5abe83de1ea8 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1179,7 +1179,7 @@ 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_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static const struct gpio_chip chv_gpio_chip =3D { diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/= pinctrl-intel.c index 7710236423bc..f20e027d0584 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -998,7 +998,7 @@ static int intel_gpio_direction_output(struct gpio_chip= *chip, unsigned int offs int value) { intel_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static const struct gpio_chip intel_gpio_chip =3D { diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/in= tel/pinctrl-lynxpoint.c index b4174829e1f9..e6878e4cf20c 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -549,7 +549,7 @@ static int lp_gpio_direction_output(struct gpio_chip *c= hip, unsigned int offset, { lp_gpio_set(chip, offset, value); =20 - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static int lp_gpio_get_direction(struct gpio_chip *chip, unsigned int offs= et) diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/med= iatek/pinctrl-moore.c index 5a5ec00e32ea..c3f33f96f920 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.c +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -520,7 +520,7 @@ static int mtk_gpio_direction_output(struct gpio_chip *= chip, unsigned int gpio, { mtk_gpio_set(chip, gpio, value); =20 - return pinctrl_gpio_direction_output_new(chip, gpio); + return pinctrl_gpio_direction_output(chip, gpio); } =20 static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctr= l/mediatek/pinctrl-mtk-common.c index b2dc3072050a..41e9847e3085 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -818,7 +818,7 @@ static int mtk_gpio_direction_output(struct gpio_chip *= chip, unsigned offset, int value) { mtk_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/med= iatek/pinctrl-paris.c index d8c969e506ce..6392f1e05d02 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -929,7 +929,7 @@ static int mtk_gpio_direction_output(struct gpio_chip *= chip, unsigned int gpio, =20 mtk_gpio_set(chip, gpio, value); =20 - return pinctrl_gpio_direction_output_new(chip, gpio); + return pinctrl_gpio_direction_output(chip, gpio); } =20 static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm7xx.c index d7ce67242248..51aeac7ecc79 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -188,7 +188,7 @@ static int npcmgpio_direction_output(struct gpio_chip *= chip, dev_dbg(chip->parent, "gpio_direction_output: offset%d =3D %x\n", offset, value); =20 - ret =3D pinctrl_gpio_direction_output_new(chip, offset); + ret =3D pinctrl_gpio_direction_output(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm8xx.c index c22513e30068..140fdbbe8458 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -186,7 +186,7 @@ static int npcmgpio_direction_output(struct gpio_chip *= chip, struct npcm8xx_gpio *bank =3D gpiochip_get_data(chip); int ret; =20 - ret =3D pinctrl_gpio_direction_output_new(chip, offset); + ret =3D pinctrl_gpio_direction_output(chip, offset); if (ret) return ret; =20 diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3= 722.c index 3f27da80adde..4151656f6245 100644 --- a/drivers/pinctrl/pinctrl-as3722.c +++ b/drivers/pinctrl/pinctrl-as3722.c @@ -509,7 +509,7 @@ static int as3722_gpio_direction_output(struct gpio_chi= p *chip, unsigned offset, int value) { as3722_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static int as3722_gpio_to_irq(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-c= y8c95x0.c index 729c13a249ef..04285c930e94 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -571,7 +571,7 @@ static int cy8c95x0_gpio_direction_output(struct gpio_c= hip *gc, if (ret) return ret; =20 - return pinctrl_gpio_direction_output_new(gc, off); + return pinctrl_gpio_direction_output(gc, off); } =20 static int cy8c95x0_gpio_get_value(struct gpio_chip *gc, unsigned int off) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-in= genic.c index df36141edbf3..ca58c9db5c2c 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -3570,7 +3570,7 @@ static int ingenic_gpio_direction_output(struct gpio_= chip *gc, unsigned int offset, int value) { ingenic_gpio_set(gc, offset, value); - return pinctrl_gpio_direction_output_new(gc, offset); + return pinctrl_gpio_direction_output(gc, offset); } =20 static inline void ingenic_config_pin(struct ingenic_pinctrl *jzpc, @@ -4054,7 +4054,7 @@ static int ingenic_pinconf_set(struct pinctrl_dev *pc= tldev, unsigned int pin, break; =20 case PIN_CONFIG_OUTPUT: - ret =3D pinctrl_gpio_direction_output_new(jzpc->gc, + ret =3D pinctrl_gpio_direction_output(jzpc->gc, pin - jzpc->gc->base); if (ret) return ret; diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-oce= lot.c index d02d16084f33..96b4e9fceb78 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1795,7 +1795,7 @@ static int ocelot_gpio_direction_output(struct gpio_c= hip *chip, regmap_write(info->map, REG(OCELOT_GPIO_OUT_CLR, info, offset), pin); =20 - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static const struct gpio_chip ocelot_gpiolib_chip =3D { diff --git a/drivers/pinctrl/pinctrl-rk805.c b/drivers/pinctrl/pinctrl-rk80= 5.c index f0feb3a8e630..968f066eb9da 100644 --- a/drivers/pinctrl/pinctrl-rk805.c +++ b/drivers/pinctrl/pinctrl-rk805.c @@ -296,7 +296,7 @@ static int rk805_gpio_direction_output(struct gpio_chip= *chip, unsigned int offset, int value) { rk805_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static int rk805_gpio_get_direction(struct gpio_chip *chip, unsigned int o= ffset) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 3f6631716779..db511dbd50e5 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -730,7 +730,7 @@ static int st_gpio_direction_output(struct gpio_chip *c= hip, struct st_gpio_bank *bank =3D gpiochip_get_data(chip); =20 __st_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output_new(chip, offset); + pinctrl_gpio_direction_output(chip, offset); =20 return 0; } diff --git a/drivers/pinctrl/renesas/gpio.c b/drivers/pinctrl/renesas/gpio.c index 54346b7fcdef..a5136dacaaf2 100644 --- a/drivers/pinctrl/renesas/gpio.c +++ b/drivers/pinctrl/renesas/gpio.c @@ -172,7 +172,7 @@ static int gpio_pin_direction_output(struct gpio_chip *= gc, unsigned offset, { gpio_pin_set_value(gpiochip_get_data(gc), offset, value); =20 - return pinctrl_gpio_direction_output_new(gc, offset); + return pinctrl_gpio_direction_output(gc, offset); } =20 static int gpio_pin_get(struct gpio_chip *gc, unsigned offset) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/= pinctrl-stm32.c index cbe306f47c0a..917b87acbf0d 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -250,7 +250,7 @@ static int stm32_gpio_direction_output(struct gpio_chip= *chip, struct stm32_gpio_bank *bank =3D gpiochip_get_data(chip); =20 __stm32_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output_new(chip, offset); + pinctrl_gpio_direction_output(chip, offset); =20 return 0; } diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/= pinctrl-wmt.c index 54cd556a16b8..639446bba373 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -535,7 +535,7 @@ static int wmt_gpio_direction_output(struct gpio_chip *= chip, unsigned offset, int value) { wmt_gpio_set_value(chip, offset, value); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } =20 static const struct gpio_chip wmt_gpio_chip =3D { diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 8b7ab935a3d3..8c40f35d9232 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -31,8 +31,8 @@ int pinctrl_gpio_request(struct gpio_chip *gc, unsigned i= nt offset); void pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_input(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, - unsigned int offset); +int pinctrl_gpio_direction_output(struct gpio_chip *gc, + unsigned int offset); int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, unsigned long config); =20 @@ -115,7 +115,7 @@ static inline int pinctrl_gpio_direction_output(unsigne= d gpio) } =20 static inline int -pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offse= t) +pinctrl_gpio_direction_output(struct gpio_chip *gc, unsigned int offset) { return 0; } --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EEBDCD6E60 for ; Wed, 11 Oct 2023 12:23:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234973AbjJKMXZ (ORCPT ); Wed, 11 Oct 2023 08:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346798AbjJKMW5 (ORCPT ); Wed, 11 Oct 2023 08:22:57 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC5BEAF for ; Wed, 11 Oct 2023 05:10:11 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50567477b29so8835435e87.3 for ; Wed, 11 Oct 2023 05:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026185; x=1697630985; 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=quON8EwoIJw5m45II3ErPq5D8iS+63rbVlCGeP/qYpc=; b=qa0aUeUQCZnfWWGQBCNYaqjyEMh62PLFtsb6eTxhESsOZGl9sL+/Ttxb+SbNhIJ88B RB6I5emIPaDNAMRxV+hxJOR/dEyW/ZwJeIzm1XOO+QYGA7ICxRCnxxG/rwmMntD0BFuh 1p4Ps8aY/IcQaK6MakzIrl61akasMmqor+YEt1tW+zopyjFt95JSeVqCMywc+w/6QlWf CMTtev6vD7AnU+N018k12ZbPJt3pE1SzZ6SsYVXjZOkZPw4OkWHPH0oxyhFV9nEs0YGQ s/eV5Ekv7toxQkapaXy+OOeU8rWOV+TyRns7OrUu6f0VcPZ610rIQBSA4omI7YfJyL4Q UADQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026185; x=1697630985; 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=quON8EwoIJw5m45II3ErPq5D8iS+63rbVlCGeP/qYpc=; b=ERAigLRJgRyFO4dnd5rlpMd+00N2r7P56foTlKxA023apua9R8Od+ZYvLoCmyEufG5 0ngr4Pt7RdM+9l33yRKO66I1GcmUgWDDzuGXVZAbDG9ozCnQkA2nGfOv+Ho3P5j6G+k1 1C8LYiRBplpmf/b1eKQlf3osooYJRu11LbLFxIcsfH2qJ1XJVqbMjUxS7ObdrczY9Fnu BOm18TAozJF4LQj3PSBVEcrxcrInPixyFhl03Fw7Yc7xJm5FaOmK6gQkqPdO6u5/7FBd JtFZozzgZO6N8Hfi+dN20r4zGJgLJpHcUEfYBFUjovw/ORNbrhjwxEpmv1NYdatTImsk kIYg== X-Gm-Message-State: AOJu0Yy7GGfFDhS1Z+PnSQBGDAg4F2E/PNFWmpmH611vTi+owKreGWQz I0N3Fkt14UIyb9dDF0krbMNCjw== X-Google-Smtp-Source: AGHT+IG0d2pSB/wWQL+1jmWl3DKvoD3msvj9GdiSM/36D6PMBIyQVJeZv0O3+c7jkmh4y7i9XQjFDQ== X-Received: by 2002:a05:6512:1104:b0:503:9ea:3a67 with SMTP id l4-20020a056512110400b0050309ea3a67mr21807088lfg.26.1697026184894; Wed, 11 Oct 2023 05:09:44 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:44 -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 41/62] treewide: rename pinctrl_gpio_set_config_new() Date: Wed, 11 Oct 2023 14:08:09 +0200 Message-Id: <20231011120830.49324-42-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Now that pinctrl_gpio_set_config() is no longer used, let's drop the '_new' suffix from its improved variant. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-aspeed.c | 2 +- drivers/gpio/gpiolib.c | 2 +- drivers/pinctrl/core.c | 6 +++--- include/linux/pinctrl/consumer.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index 4c417c8486dd..04c03402db6d 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -973,7 +973,7 @@ static int aspeed_gpio_set_config(struct gpio_chip *chi= p, unsigned int offset, else if (param =3D=3D PIN_CONFIG_BIAS_DISABLE || param =3D=3D PIN_CONFIG_BIAS_PULL_DOWN || param =3D=3D PIN_CONFIG_DRIVE_STRENGTH) - return pinctrl_gpio_set_config_new(chip, offset, config); + return pinctrl_gpio_set_config(chip, offset, config); else if (param =3D=3D PIN_CONFIG_DRIVE_OPEN_DRAIN || param =3D=3D PIN_CONFIG_DRIVE_OPEN_SOURCE) /* Return -ENOTSUPP to trigger emulation, as per datasheet */ diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 0c499cff3fad..d703e24a8d24 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1994,7 +1994,7 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_free); int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset, unsigned long config) { - return pinctrl_gpio_set_config_new(gc, offset, config); + return pinctrl_gpio_set_config(gc, offset, config); } EXPORT_SYMBOL_GPL(gpiochip_generic_config); =20 diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 0c583626e50c..7552cf358e5d 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -904,7 +904,7 @@ int pinctrl_gpio_direction_output(struct gpio_chip *gc,= unsigned int offset) EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); =20 /** - * pinctrl_gpio_set_config_new() - Apply config to given GPIO pin + * pinctrl_gpio_set_config() - Apply config to given GPIO pin * @gc: GPIO chip structure from the GPIO subsystem * @offset: hardware offset of the GPIO relative to the controller * @config: the configuration to apply to the GPIO @@ -913,7 +913,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); * they need to call the underlying pin controller to change GPIO config * (for example set debounce time). */ -int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, +int pinctrl_gpio_set_config(struct gpio_chip *gc, unsigned int offset, unsigned long config) { unsigned long configs[] =3D { config }; @@ -933,7 +933,7 @@ int pinctrl_gpio_set_config_new(struct gpio_chip *gc, u= nsigned int offset, =20 return ret; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config); =20 static struct pinctrl_state *find_state(struct pinctrl *p, const char *name) diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consu= mer.h index 8c40f35d9232..e072d0765a1a 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -33,7 +33,7 @@ int pinctrl_gpio_direction_input(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_output(struct gpio_chip *gc, unsigned int offset); -int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, +int pinctrl_gpio_set_config(struct gpio_chip *gc, unsigned int offset, unsigned long config); =20 struct pinctrl * __must_check pinctrl_get(struct device *dev); @@ -126,7 +126,7 @@ static inline int pinctrl_gpio_set_config(unsigned gpio= , unsigned long config) } =20 static inline int -pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, +pinctrl_gpio_set_config(struct gpio_chip *gc, unsigned int offset, unsigned long config) { return 0; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13198CD6E60 for ; Wed, 11 Oct 2023 12:21:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235014AbjJKMVZ (ORCPT ); Wed, 11 Oct 2023 08:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbjJKMUe (ORCPT ); Wed, 11 Oct 2023 08:20:34 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22E7C128 for ; Wed, 11 Oct 2023 05:10:12 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-405524e6768so65070335e9.2 for ; Wed, 11 Oct 2023 05:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026186; x=1697630986; 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=eURLtK1E6JcmmzD6B2P6Irw26TYQ834NNrDsSTOKog0=; b=OdgRvOlQzfaxIi+84kESxE4CZxh8AP1xbGArr74lLY8jWv0In8VXwPvREiKt7R+cT9 dArnTTz9rqJMbUoEvsdNjFe0TdAVEcB+AJz8x4TRMarUPVCDFlfkjaeZFJtDRKG69jyo vNSelE1d2fQ/3/W3YE01g/6c/XimRt2hemyNQcTf5OXhKJhnd9TEBE3RmWvCp/01B1KE fgj60BFQj1iq/LEfiXAUgXTItMHk5PctoPaWExPWFJzD6V1Q/t443nnO6UOkAnGAcBCg 8IIyB9PQQmCS9E34e683UCVyznZVTlD5kVa735mQnUM3MheE87+x5kcsualPFwGuhmsJ PT6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026186; x=1697630986; 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=eURLtK1E6JcmmzD6B2P6Irw26TYQ834NNrDsSTOKog0=; b=FAftOz8qbh5ROGaZxMZ7BJRXP5/htYCJJV3VWb/cvbc2gwQiC73KE3TQxXNmdaUA2u irO+RVKp1/GfnYj5Rr5S0FIHEaHju8BxKBKKDeOUXlnRuRNqTzXHLhuw32kNw3ttj2SJ 1ZF8CTiCeSZwtT7sKc1oXp7KaeED0HSlvYODI7rU8ld0gyX2Fped06h57iubjC/V96Ub u3eiBx6uy7RGSRyICPiHHXNcW7pbPAdbzbAcUh9rnjUOna8asf78gY0CxxhWSjeDd04x KMgRAxWHuhSr2kTCqdEnX1yqcyNjmA09ycMg7kJ6ILdREtX0ICzYFPSizC8p+svQwNm7 7Y/Q== X-Gm-Message-State: AOJu0YyJ/ooOQHtA7TAem98vpDUf8Iis3ZYUPr6yg2f63W7rgIhYAfB6 137mK3WOj1gg0Kn046qKemLm20kXQ9xDYOgjpt4= X-Google-Smtp-Source: AGHT+IE1tIsUdkO5TpFkqzJYNZJ5LbHIqogh+lf6MyZjarepBDtXaghNqZJ2hzf0G/CBAb4ziGaq3w== X-Received: by 2002:a05:600c:2613:b0:401:d947:c8a9 with SMTP id h19-20020a05600c261300b00401d947c8a9mr18328913wma.19.1697026186266; Wed, 11 Oct 2023 05:09:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:45 -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 42/62] pinctrl: change the signature of pinctrl_gpio_direction() Date: Wed, 11 Oct 2023 14:08:10 +0200 Message-Id: <20231011120830.49324-43-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Modify pinctrl_gpio_direction() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 7552cf358e5d..24cc075044e9 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -850,14 +850,16 @@ void pinctrl_gpio_free(struct gpio_chip *gc, unsigned= int offset) } EXPORT_SYMBOL_GPL(pinctrl_gpio_free); =20 -static int pinctrl_gpio_direction(unsigned gpio, bool input) +static int pinctrl_gpio_direction(struct gpio_chip *gc, unsigned int offse= t, + bool input) { struct pinctrl_dev *pctldev; struct pinctrl_gpio_range *range; int ret; int pin; =20 - ret =3D pinctrl_get_device_gpio_range(gpio, &pctldev, &range); + ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, + &range); if (ret) { return ret; } @@ -865,7 +867,7 @@ static int pinctrl_gpio_direction(unsigned gpio, bool i= nput) mutex_lock(&pctldev->mutex); =20 /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gpio); + pin =3D gpio_to_pin(range, gc->base + offset); ret =3D pinmux_gpio_direction(pctldev, range, pin, input); =20 mutex_unlock(&pctldev->mutex); @@ -884,7 +886,7 @@ static int pinctrl_gpio_direction(unsigned gpio, bool i= nput) */ int pinctrl_gpio_direction_input(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_direction(gc->base + offset, true); + return pinctrl_gpio_direction(gc, offset, true); } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); =20 @@ -899,7 +901,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); */ int pinctrl_gpio_direction_output(struct gpio_chip *gc, unsigned int offse= t) { - return pinctrl_gpio_direction(gc->base + offset, false); + return pinctrl_gpio_direction(gc, offset, false); } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3BDCCD6E5D for ; Wed, 11 Oct 2023 12:21:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346891AbjJKMVL (ORCPT ); Wed, 11 Oct 2023 08:21:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234984AbjJKMUa (ORCPT ); Wed, 11 Oct 2023 08:20:30 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B33612C for ; Wed, 11 Oct 2023 05:10:12 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4066241289bso63791895e9.0 for ; Wed, 11 Oct 2023 05:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026187; x=1697630987; 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=W1TfGq9ZUTHjJHsNkCdZo3V3ZE8dSm/Gv302pfRQaqA=; b=eTfCMhyDUcQLjBLy+jSp2B5rBlewXmVneO9QPMu1GvTK3jUhamVCGHTa8WAmGC4oYw RDI8nZ7qJVgHN5d8JhJznilTxrZLIgBOX5ow3Ezp2mVUlAgXNMyfKeeF25YgP4lJhjxH g3gXLQxRjSE1ANX0w6ZgFxHEQD79RvCeULl6bsfAOgHA3yaylm8+8v1yLrjcGen4YpOc sfCOirtNzw/WMPJWQ9eAVxBetAmheyp9lyAUNaH6X6Lb3i1Z5nVUkCWk8muwcs0w9YCG PT9gtepLCZNAfHVP+5/HjJHSN3KFIAKP7FyIaYGujY6Z17GCVATakDco1Oj6Nd5NNMQe 5h2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026187; x=1697630987; 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=W1TfGq9ZUTHjJHsNkCdZo3V3ZE8dSm/Gv302pfRQaqA=; b=GKn2eAfX3Wzy+W1GTZpnAL6DkfEaUpPHOZdSlGDOmlnrpljtIYJxBEM8NwCpdbYeBT jSlsSRw/vX8dTUGK9zNWuybJzM/UGGZDjL8pcXTxIibBi302S9ij3ETOWLlQ+DemovKa wkyRBoXarkQru3cRClXBHaR9LbQtFTCnjdlmf9du81YFCR0J01+BDDaYzAuZYybk6U8K MtJszu1p1ZoaZKy66i/yPN0lRgKEKmFmsQFs0O019sQgAYgpD1/oThk9hgT/0k8Mo3TS EtawJCzPT3piNQtx22n9PPxZhkrcogZOvpiJyDl+78eh08BhO8N1mq+gYCMAlEjLicBc 5uaA== X-Gm-Message-State: AOJu0YxbmCatjnmdkHQMAqa/JALoXA6z4nFqVXlj52rm+BekPqSZOEFD HuQSqvTmmqtDSErfL1slYMCJTA== X-Google-Smtp-Source: AGHT+IGmmRYlRS77pWXSdEKmBXTYA9CFLs9xBAXETYvcReLzr8ebHqpBGdeY3RShIedVYqAO4OYy9w== X-Received: by 2002:a05:600c:2218:b0:3f7:cb42:fa28 with SMTP id z24-20020a05600c221800b003f7cb42fa28mr17715760wml.28.1697026187109; Wed, 11 Oct 2023 05:09:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:46 -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 43/62] pinctrl: change the signature of pinctrl_get_device_gpio_range() Date: Wed, 11 Oct 2023 14:08:11 +0200 Message-Id: <20231011120830.49324-44-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Modify pinctrl_get_device_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 24cc075044e9..2eebd86ca2bc 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -372,7 +372,8 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio)= { return true; } =20 /** * pinctrl_get_device_gpio_range() - find device for GPIO range - * @gpio: the pin to locate the pin controller for + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller * @outdev: the pin control device if found * @outrange: the GPIO range if found * @@ -381,7 +382,8 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio)= { return true; } * -EPROBE_DEFER if the GPIO range could not be found in any device since = it * may still have not been registered. */ -static int pinctrl_get_device_gpio_range(unsigned gpio, +static int pinctrl_get_device_gpio_range(struct gpio_chip *gc, + unsigned int offset, struct pinctrl_dev **outdev, struct pinctrl_gpio_range **outrange) { @@ -393,7 +395,7 @@ static int pinctrl_get_device_gpio_range(unsigned gpio, list_for_each_entry(pctldev, &pinctrldev_list, node) { struct pinctrl_gpio_range *range; =20 - range =3D pinctrl_match_gpio_range(pctldev, gpio); + range =3D pinctrl_match_gpio_range(pctldev, gc->base + offset); if (range) { *outdev =3D pctldev; *outrange =3D range; @@ -767,7 +769,7 @@ bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, un= signed int offset) * we're probably dealing with GPIO driver * without a backing pin controller - bail out. */ - if (pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, &range)) + if (pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range)) return true; =20 mutex_lock(&pctldev->mutex); @@ -798,8 +800,7 @@ int pinctrl_gpio_request(struct gpio_chip *gc, unsigned= int offset) struct pinctrl_dev *pctldev; int ret, pin; =20 - ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret =3D pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) { if (pinctrl_ready_for_gpio_range(gc->base + offset)) ret =3D 0; @@ -834,8 +835,7 @@ void pinctrl_gpio_free(struct gpio_chip *gc, unsigned i= nt offset) struct pinctrl_dev *pctldev; int ret, pin; =20 - ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret =3D pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) return; =20 @@ -858,8 +858,7 @@ static int pinctrl_gpio_direction(struct gpio_chip *gc,= unsigned int offset, int ret; int pin; =20 - ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret =3D pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) { return ret; } @@ -923,8 +922,7 @@ int pinctrl_gpio_set_config(struct gpio_chip *gc, unsig= ned int offset, struct pinctrl_dev *pctldev; int ret, pin; =20 - ret =3D pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret =3D pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) return ret; =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27086CD6E61 for ; Wed, 11 Oct 2023 12:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234746AbjJKMUh (ORCPT ); Wed, 11 Oct 2023 08:20:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345956AbjJKMU2 (ORCPT ); Wed, 11 Oct 2023 08:20:28 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123AD199A for ; Wed, 11 Oct 2023 05:10:17 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40572aeb73cso63112225e9.3 for ; Wed, 11 Oct 2023 05:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026188; x=1697630988; 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=fvacOMAsy6FdrV/J7pT291xHl3F2giUmTM8V2Tkqr7o=; b=vZqVc+bSZpgKue+0l6Q1VTop2/2jZ+nZmSd/VDRiWukvrMLRnBG3PrHmC0LK8aQ9Uk Y7LVFfGVp7/nYZj7uZaZNx0Sdx4b/C5i6NmGIcmPAkZXCWFwVk52sXBvl64twnbs7zTS /G9Za2x+fJFVf/1CjNrLU3Fnh32b7Dzjk7zCGgtqazmi2bzr80AV2Di4R959h1gfvetP Lywh5EgGb3+RDcR3ZoZUXv+qOCptt4Q4gR8Ire8g7+AUuyN7+46OVFml7P03AgyaEklG OrrIHd7sUCRCvN3k3EfLF/1gtJC1GgXjd4AkxwVXMFHIQTkd/73+KgWGGVr/WRIkuK90 pXYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026188; x=1697630988; 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=fvacOMAsy6FdrV/J7pT291xHl3F2giUmTM8V2Tkqr7o=; b=kW44taCe1d8D0IaECdjyZDVzxmtt1vJtKTk/x4Ki4GcWozFBiPDL0IOepKqGObRkVs aLpIhrfh4PuXDuXIkxQDn3NV+Lfv1M/kjMcVt5vvYe2+sxbb2rZZDoLOCUKPJ0tKw8Yt zwcfVG5QQ+NG0oMSPS+QVyjBROx6R05fJC1fDA20dX3T6DrSTJqCcbkuA1MHSYLFTQus y+oLdIda7tpEcpvj73PN9waWRQ5s9Fznp0YDjg0OitqRHyvOSwhfvwDtwlD6M3EsSm3f qb6OrAYiDp6O6KpX6ZDzJkftYq8z9bwU++2RMqTIQ8XkUzMLwgY6FWJW2sFesAd3EGV/ qexw== X-Gm-Message-State: AOJu0YyoW8LgmpJOCuUBTOV4tjah003RFkYlofJZ/3ARU4dYPu8jFj7Y Mo5lHSW2807NHnwhQNy54IkvLQ== X-Google-Smtp-Source: AGHT+IHSvLmetJI0wFfvlmR2PQ5I2awpBh6SmY4ieaJBT9vT+eeMUOlqRrInwp+zikj18o3KLWhR8w== X-Received: by 2002:a7b:cb8b:0:b0:3fb:e189:3532 with SMTP id m11-20020a7bcb8b000000b003fbe1893532mr18370414wmi.20.1697026188168; Wed, 11 Oct 2023 05:09:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:47 -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 44/62] pinctrl: change the signature of pinctrl_match_gpio_range() Date: Wed, 11 Oct 2023 14:08:12 +0200 Message-Id: <20231011120830.49324-45-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Modify pinctrl_match_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 2eebd86ca2bc..dbc59e409439 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -292,13 +292,15 @@ static inline int gpio_to_pin(struct pinctrl_gpio_ran= ge *range, /** * pinctrl_match_gpio_range() - check if a certain GPIO pin is in range * @pctldev: pin controller device to check - * @gpio: gpio pin to check taken from the global GPIO pin space + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller * * Tries to match a GPIO pin number to the ranges handled by a certain pin * controller, return the range or NULL */ static struct pinctrl_gpio_range * -pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, unsigned gpio) +pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, struct gpio_chip *gc, + unsigned int offset) { struct pinctrl_gpio_range *range; =20 @@ -306,8 +308,8 @@ pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, u= nsigned gpio) /* Loop over the ranges */ list_for_each_entry(range, &pctldev->gpio_ranges, node) { /* Check if we're in the valid range */ - if (gpio >=3D range->base && - gpio < range->base + range->npins) { + if ((gc->base + offset) >=3D range->base && + (gc->base + offset) < range->base + range->npins) { mutex_unlock(&pctldev->mutex); return range; } @@ -395,7 +397,7 @@ static int pinctrl_get_device_gpio_range(struct gpio_ch= ip *gc, list_for_each_entry(pctldev, &pinctrldev_list, node) { struct pinctrl_gpio_range *range; =20 - range =3D pinctrl_match_gpio_range(pctldev, gc->base + offset); + range =3D pinctrl_match_gpio_range(pctldev, gc, offset); if (range) { *outdev =3D pctldev; *outrange =3D range; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3661FCD6E5D for ; Wed, 11 Oct 2023 12:22:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234984AbjJKMWd (ORCPT ); Wed, 11 Oct 2023 08:22:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232213AbjJKMWK (ORCPT ); Wed, 11 Oct 2023 08:22:10 -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 89B71199E for ; Wed, 11 Oct 2023 05:10:18 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40684f53bfcso62664555e9.0 for ; Wed, 11 Oct 2023 05:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026189; x=1697630989; 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=KvqkdE0pFC3rt0ALCPspH5t69Bx+kT0SWwFi+Jjq8JI=; b=QZT2QNjmtsq4K2GdrJujpExlrFRrPGj3KERcfivGBjcMjq4lF4WxhrOuICYEB3xrBq RdIwARKiFOdjht488LPPwY7ntC3NrlkYtF3X+IZX2eMmaeKmxfhx6LxovjKwywQXBlUH uYEZFWhtRmVPupuj348uHMyPwZuJw0x++Jcxl0i3k/sA4VIva60/SImfOiArwX3QlgD0 ZQhf0UCUbEBcjWJe1A0XyWok3ZRtD5Rg8E9+tRh+ceN1PBrgN8w2b0FFxsgEPwL2xqM6 C2FqDD72WvUDh1d/QDK98nT5NBQlp2jg8pdybOqsoGC6nZbMFzURlbZe/1T5DcwfG9P5 JyRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026189; x=1697630989; 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=KvqkdE0pFC3rt0ALCPspH5t69Bx+kT0SWwFi+Jjq8JI=; b=fwaEQRDos1l5+GXE/C4yIYQP2E3lY2vt4uvzLItfRgwT7BTiXeChnOJcGD04ND5Jnu L0ka7TA5GcA1GTogzENL73OTAnA3rHUqynD87wGmU7dpHm50sMz6nR2+gCAtKeiCUZIp GNSOwEUs4p/o3C179dKjuq+gFvjh0LeeIvanjxLLua2q9AjcwkMvZ3apNBZ8drkHszqB M88bhzB9E1FLFDiS5BLzeN4dzfefcmekPPJ6Xc+KFeREw9z5KkfOjn33l4w/qLfdvqRI p1UByX6hB4mUq/jfuqb9LbFIWOHsjDaTHKlYi812G4VafwfdtCVUtRKtMqDF+KMcyQ08 dyDA== X-Gm-Message-State: AOJu0YyZBBp54+naSlnaRr8lQbAff22VF3sROVevgPoy5z8s8bqUWmS1 plaCLm84oSORDzifxeNfBwVMsw== X-Google-Smtp-Source: AGHT+IEY3ze74YLdjgYxoIb2hDThDJHsXjE7QOB83QYbmA/+gfM7BN03FF3RKA4WGnljEqr6LsiS+A== X-Received: by 2002:a7b:c4d6:0:b0:406:7074:301d with SMTP id g22-20020a7bc4d6000000b004067074301dmr19196089wmk.11.1697026189083; Wed, 11 Oct 2023 05:09:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:48 -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 45/62] pinctrl: change the signature of gpio_to_pin() Date: Wed, 11 Oct 2023 14:08:13 +0200 Message-Id: <20231011120830.49324-46-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Modify gpio_to_pin() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index dbc59e409439..89df934d65bc 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -269,7 +269,8 @@ static int pinctrl_register_pins(struct pinctrl_dev *pc= tldev, /** * gpio_to_pin() - GPIO range GPIO number to pin number translation * @range: GPIO range used for the translation - * @gpio: gpio pin to translate to a pin number + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller * * Finds the pin number for a given GPIO using the specified GPIO range * as a base for translation. The distinction between linear GPIO ranges @@ -280,13 +281,13 @@ static int pinctrl_register_pins(struct pinctrl_dev *= pctldev, * result of successful pinctrl_get_device_gpio_range calls)! */ static inline int gpio_to_pin(struct pinctrl_gpio_range *range, - unsigned int gpio) + struct gpio_chip *gc, unsigned int offset) { - unsigned int offset =3D gpio - range->base; + unsigned int pin =3D gc->base + offset - range->base; if (range->pins) - return range->pins[offset]; + return range->pins[pin]; else - return range->pin_base + offset; + return range->pin_base + pin; } =20 /** @@ -777,7 +778,7 @@ bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, un= signed int offset) mutex_lock(&pctldev->mutex); =20 /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gc->base + offset); + pin =3D gpio_to_pin(range, gc, offset); =20 result =3D pinmux_can_be_used_for_gpio(pctldev, pin); =20 @@ -812,7 +813,7 @@ int pinctrl_gpio_request(struct gpio_chip *gc, unsigned= int offset) mutex_lock(&pctldev->mutex); =20 /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gc->base + offset); + pin =3D gpio_to_pin(range, gc, offset); =20 ret =3D pinmux_request_gpio(pctldev, range, pin, gc->base + offset); =20 @@ -844,7 +845,7 @@ void pinctrl_gpio_free(struct gpio_chip *gc, unsigned i= nt offset) mutex_lock(&pctldev->mutex); =20 /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gc->base + offset); + pin =3D gpio_to_pin(range, gc, offset); =20 pinmux_free_gpio(pctldev, pin, range); =20 @@ -868,7 +869,7 @@ static int pinctrl_gpio_direction(struct gpio_chip *gc,= unsigned int offset, mutex_lock(&pctldev->mutex); =20 /* Convert to the pin controllers number space */ - pin =3D gpio_to_pin(range, gc->base + offset); + pin =3D gpio_to_pin(range, gc, offset); ret =3D pinmux_gpio_direction(pctldev, range, pin, input); =20 mutex_unlock(&pctldev->mutex); @@ -929,7 +930,7 @@ int pinctrl_gpio_set_config(struct gpio_chip *gc, unsig= ned int offset, return ret; =20 mutex_lock(&pctldev->mutex); - pin =3D gpio_to_pin(range, gc->base + offset); + pin =3D gpio_to_pin(range, gc, offset); ret =3D pinconf_set_config(pctldev, pin, configs, ARRAY_SIZE(configs)); mutex_unlock(&pctldev->mutex); =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88B62CD6E5D for ; Wed, 11 Oct 2023 12:20:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232154AbjJKMU2 (ORCPT ); Wed, 11 Oct 2023 08:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231695AbjJKMUY (ORCPT ); Wed, 11 Oct 2023 08:20:24 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 025EE19A7 for ; Wed, 11 Oct 2023 05:10:20 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-405361bb94eso69192205e9.0 for ; Wed, 11 Oct 2023 05:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026190; x=1697630990; 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=PV4PS0wlUJUsPnHQ+15CSYkWjpePpNEtuLC0jO+O4fA=; b=SmIHmEHKMnG2f/01uVvH1kD0bW639bRCf6KaJd2vlyfTV9XvDKyGtnaFBZS4txs77Q DIx8+KV6HWPDMFV1N7VvdlvR0mKtld+Wv/MfH7Vn6kP0r8mRUc0F6Fc8zO12p+X8g8an ZIO4WrKU1cBzw43RAsKlL1FLcf/lxCmht4NHZ0Odh47tvak9MMiHnd+igSq3c2ZCLaAx kLRddvtWUhv0Vo4crOkw6PDuLuUluY3q9m2ytcF5kLM2NNeXUdyTvAGrKVLmh64+2Hrb xsHxr8+ynKcMOQXOpRZ2brgtB4EeMOnUSjivFmm+pmiF38zfq/52AJbkuhUlmn/9YCeP 7M4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026190; x=1697630990; 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=PV4PS0wlUJUsPnHQ+15CSYkWjpePpNEtuLC0jO+O4fA=; b=Ne3xhxun9nSAKfU+YfJMariuai4KaxcF9PbLYPTrojXpVk1Cx/P2/7+daEyaITO2by mPG3KafQn6BDE94co6vyR6vzh7cYNOFGJ85ZkmYLUKYfZzTxvMdiJY34Pwi0V2n0KNo7 vg+zQ6mcrgNXk+bCRVT5BZ32jjNuGqng2C0wutxWyfYcv6h5EXDoP8t74V73I3TA9iM2 3PH59PLJA2LUSkCummEdlxYGmpg+t0XrHA5EDfOsmMfJDuzOD9vwFuLpQrY6mBPYxsoD 7PkBD0ZBNADMoOdx8lXtIuPTUokaeBygydEukxpSkdtNHEIdrbynUm/d18vXXGrXT56F WElg== X-Gm-Message-State: AOJu0YyIoWk9DyfPgaSxybxjBkAR/sB4XrbbER/UcOJN2IdvdQXb5Gd9 Zk6Oox4S0Wm5VjGDD4MFnK0mvQ== X-Google-Smtp-Source: AGHT+IEKkuO4KWkKGW5OySKb472C3QwclFRZfn913ZUhBxKsM11lqZrt/xgzMcaE2ugp1JieZ9X8UQ== X-Received: by 2002:a7b:c7c5:0:b0:404:4b6f:d70d with SMTP id z5-20020a7bc7c5000000b004044b6fd70dmr19405847wmk.17.1697026189872; Wed, 11 Oct 2023 05:09:49 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:49 -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 46/62] pinctrl: change the signature of pinctrl_ready_for_gpio_range() Date: Wed, 11 Oct 2023 14:08:14 +0200 Message-Id: <20231011120830.49324-47-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Modify pinctrl_ready_for_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/core.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 89df934d65bc..e3da8aeee01d 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -322,7 +322,8 @@ pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, s= truct gpio_chip *gc, /** * pinctrl_ready_for_gpio_range() - check if other GPIO pins of * the same GPIO chip are in range - * @gpio: gpio pin to check taken from the global GPIO pin space + * @gc: GPIO chip structure from the GPIO subsystem + * @offset: hardware offset of the GPIO relative to the controller * * This function is complement of pinctrl_match_gpio_range(). If the return * value of pinctrl_match_gpio_range() is NULL, this function could be used @@ -333,19 +334,11 @@ pinctrl_match_gpio_range(struct pinctrl_dev *pctldev,= struct gpio_chip *gc, * is false, it means that pinctrl device may not be ready. */ #ifdef CONFIG_GPIOLIB -static bool pinctrl_ready_for_gpio_range(unsigned gpio) +static bool pinctrl_ready_for_gpio_range(struct gpio_chip *gc, + unsigned int offset) { struct pinctrl_dev *pctldev; struct pinctrl_gpio_range *range =3D NULL; - /* - * FIXME: "gpio" here is a number in the global GPIO numberspace. - * get rid of this from the ranges eventually and get the GPIO - * descriptor from the gpio_chip. - */ - struct gpio_chip *chip =3D gpiod_to_chip(gpio_to_desc(gpio)); - - if (WARN(!chip, "no gpio_chip for gpio%i?", gpio)) - return false; =20 mutex_lock(&pinctrldev_list_mutex); =20 @@ -355,8 +348,8 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio) mutex_lock(&pctldev->mutex); list_for_each_entry(range, &pctldev->gpio_ranges, node) { /* Check if any gpio range overlapped with gpio chip */ - if (range->base + range->npins - 1 < chip->base || - range->base > chip->base + chip->ngpio - 1) + if (range->base + range->npins - 1 < gc->base || + range->base > gc->base + gc->ngpio - 1) continue; mutex_unlock(&pctldev->mutex); mutex_unlock(&pinctrldev_list_mutex); @@ -370,7 +363,11 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio) return false; } #else -static bool pinctrl_ready_for_gpio_range(unsigned gpio) { return true; } +static inline bool +pinctrl_ready_for_gpio_range(struct gpio_chip *gc, unsigned int offset) +{ + return true; +} #endif =20 /** @@ -805,7 +802,7 @@ int pinctrl_gpio_request(struct gpio_chip *gc, unsigned= int offset) =20 ret =3D pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) { - if (pinctrl_ready_for_gpio_range(gc->base + offset)) + if (pinctrl_ready_for_gpio_range(gc, offset)) ret =3D 0; return ret; } --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8699ACD6E5D for ; Wed, 11 Oct 2023 12:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346459AbjJKMM0 (ORCPT ); Wed, 11 Oct 2023 08:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234821AbjJKMMR (ORCPT ); Wed, 11 Oct 2023 08:12:17 -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 2352219BA for ; Wed, 11 Oct 2023 05:10:22 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4064876e8b8so66736655e9.0 for ; Wed, 11 Oct 2023 05:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026191; x=1697630991; 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=/q2AAUK8nSoyCcAL3+dAuFLxmVbbJcIniBd1EuYZbmQ=; b=lfRa0TK5Bmz558wPy655hvc0XZ/Ygpzc826pfbyw7z1DHFOTWXT2pS1cmOHXrCRDwi P9gpBv8w9sYpfD27OC+6/JYD/vtQRk/XiUbjBLUkTuMG+FwSi9Vwdf0aoSG8x54eNIlm jKXjiA9IILJVjjOavHNW+wHDm7xEoA/pWrcbcDVQHQvVh3OrBiBDKmAy7xS+qJYUSFsu qQpw/h6UbuwpmEmDHynUGmqlx2bqwx+gsXZcUX5W4WT1HnxFRQiCpzTQWMMgd70SbEQ5 4ZKSuvcPEr5c5L75waFEz7tMZGflKOCCD/SWfCWNBnef4V2OkjsPGBv3u4DwTSxXs/FA TA0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026191; x=1697630991; 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=/q2AAUK8nSoyCcAL3+dAuFLxmVbbJcIniBd1EuYZbmQ=; b=CxYjgNZuR2kNyaQiPVSG0qHJ1QmKWzI14W1m7LJU6E66VZ+QADJxH/m7bopbtT8AWL wcvBljvbAxWhmlKdyM54cKIR+3kccgVaqXJ3MeAM13BM5Vaj+CjDMj9rGVzqHpJ+pGMy wVvcVOw0u54ycPlcPPLJiCEk3ZfANZ3E9LhbPEusOjMALroFQqowedGm0OGZFoIvWCc8 rCqJqRD7874wvkw6jCGkETJzPftFylo3Un65DbCeBrTjGUyiokmUk2FXa6S79+YBmQcF 9NWUGrBQBy6rAYgc6HtS/xTEJw3lv/Ux8OV0XWYEeR34e+9rMqqgIKo0tc4vOLWbzHc5 sVdw== X-Gm-Message-State: AOJu0YzxnjfIptc4x0vlZlYmwOOy1g5xf3EId8dI+gWd0Cy8wFAbVqih 3PQh1w1k+cM0sFoTsAehDgV3YQI+Plz+XVGn768= X-Google-Smtp-Source: AGHT+IHAmrK7CL234ZlKddU9bn/ryIqmCG9P9cfyvHmrPE6PCNb7YNB5Vs/kq2qwLnLC1iLWQpExaw== X-Received: by 2002:a7b:c45a:0:b0:403:e21:1355 with SMTP id l26-20020a7bc45a000000b004030e211355mr17503175wmi.36.1697026190788; Wed, 11 Oct 2023 05:09:50 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:50 -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 47/62] pinctrl: intel: drop the wrappers around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:15 +0200 Message-Id: <20231011120830.49324-48-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrappers around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/intel/pinctrl-cherryview.c | 7 +------ drivers/pinctrl/intel/pinctrl-intel.c | 7 +------ drivers/pinctrl/intel/pinctrl-lynxpoint.c | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/i= ntel/pinctrl-cherryview.c index 5abe83de1ea8..0f3112d7d372 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1170,11 +1170,6 @@ static int chv_gpio_get_direction(struct gpio_chip *= chip, unsigned int offset) return GPIO_LINE_DIRECTION_IN; } =20 -static int chv_gpio_direction_input(struct gpio_chip *chip, unsigned int o= ffset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int chv_gpio_direction_output(struct gpio_chip *chip, unsigned int = offset, int value) { @@ -1187,7 +1182,7 @@ static const struct gpio_chip chv_gpio_chip =3D { .request =3D gpiochip_generic_request, .free =3D gpiochip_generic_free, .get_direction =3D chv_gpio_get_direction, - .direction_input =3D chv_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D chv_gpio_direction_output, .get =3D chv_gpio_get, .set =3D chv_gpio_set, diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/= pinctrl-intel.c index f20e027d0584..c46dc1efa92b 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -989,11 +989,6 @@ static int intel_gpio_get_direction(struct gpio_chip *= chip, unsigned int offset) return GPIO_LINE_DIRECTION_OUT; } =20 -static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned int= offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned in= t offset, int value) { @@ -1006,7 +1001,7 @@ static const struct gpio_chip intel_gpio_chip =3D { .request =3D gpiochip_generic_request, .free =3D gpiochip_generic_free, .get_direction =3D intel_gpio_get_direction, - .direction_input =3D intel_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D intel_gpio_direction_output, .get =3D intel_gpio_get, .set =3D intel_gpio_set, diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/in= tel/pinctrl-lynxpoint.c index e6878e4cf20c..303aaca341ea 100644 --- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c +++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c @@ -539,11 +539,6 @@ static void lp_gpio_set(struct gpio_chip *chip, unsign= ed int offset, int value) raw_spin_unlock_irqrestore(&lg->lock, flags); } =20 -static int lp_gpio_direction_input(struct gpio_chip *chip, unsigned int of= fset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int o= ffset, int value) { @@ -799,7 +794,7 @@ static int lp_gpio_probe(struct platform_device *pdev) gc->owner =3D THIS_MODULE; gc->request =3D gpiochip_generic_request; gc->free =3D gpiochip_generic_free; - gc->direction_input =3D lp_gpio_direction_input; + gc->direction_input =3D pinctrl_gpio_direction_input; gc->direction_output =3D lp_gpio_direction_output; gc->get =3D lp_gpio_get; gc->set =3D lp_gpio_set; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE6E6CD6E5D for ; Wed, 11 Oct 2023 12:14:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232155AbjJKMOC (ORCPT ); Wed, 11 Oct 2023 08:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346809AbjJKMNz (ORCPT ); Wed, 11 Oct 2023 08:13:55 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73F621BC5 for ; Wed, 11 Oct 2023 05:10:24 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4060b623e64so5628895e9.0 for ; Wed, 11 Oct 2023 05:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026191; x=1697630991; 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=e36s7GGdluC5QXynxByie2ZOB2vhF56/mrPwGpCKJMc=; b=DywQE1gyVx47sFwd2d/Iuml2zEp0tVCWZz5ZkG3lcZNwjQC3FJBCNrfiEsQ3TbWDjH 742aYDguhBdOEPorCmCNgyC7HdZkER92HCMP+WjaV0ZJFqxwtUSL14F1ljrFF2uUmFzf 4fL3tn1hP2zP3R3aMbgBXgMalHbzhDi057oNGf8kUW8ymGuKwfjjSNxfOF9Atz2LWMUn 4uz52YRxNNMt67XBL5lzXUlLN0p8G3cPpAgJ798lK2rnVhE3+BYmlTAU7lSSNFd7H+ha 06hnNsT/nQTlZO0V+YGuMNyASN3LrW35Bw7Y4t4LUSYGswiNNztBueLNWrXOy1T1lNzT wllQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026191; x=1697630991; 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=e36s7GGdluC5QXynxByie2ZOB2vhF56/mrPwGpCKJMc=; b=MC7qGmqdh3bdrcduHk/lVn9fpd3dmCbSciFbWLlgbtnFrEWOTj6g60ofZtTqLdXdHj JDWKVWQu+DyOXbpTumtHi49v0Cr7tNAyh9qdLKgKqsAQmepnkXIa8ZKaADgaXeyQ3XLk Ajcp6SGUi/6WJ/lO4Dmw+pKCh296P8gFgBF5VVIQ+nhtul3LR8yc/oschiM8dMszEmhm JlBJ/atEAsY9ON89jsEmETYCdJNGx6+FGRAv8WUkQVNfHzeApYWmkG9Bakd/t9BNK4ou dpxQG8goQbzuysv9sQ5FSGO5rKUBuTYVG7B9czDJXay2yOQjaJzMwBF+T2a13odd01Kh uJIA== X-Gm-Message-State: AOJu0Yy1UT87hQ2pepwMn0yKGc4UZ4tRta5ZmI1ONDwpOVXIIKNWR6VB WRFRmq1ZyT62SGrAoDQmQLc7Ww== X-Google-Smtp-Source: AGHT+IFSAwuCWBTL7lezmJLtCyMvDb/zGXh4Rj3UdDilTVGeSvBu9wBWn9fhQSJSYAyBp8blm3Zxhw== X-Received: by 2002:a05:600c:4f02:b0:401:609f:7f9a with SMTP id l2-20020a05600c4f0200b00401609f7f9amr15768612wmq.8.1697026191637; Wed, 11 Oct 2023 05:09:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:51 -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 48/62] pinctrl: st: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:16 +0200 Message-Id: <20231011120830.49324-49-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-st.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index db511dbd50e5..a30b426d1e74 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -717,13 +717,6 @@ static void st_gpio_set(struct gpio_chip *chip, unsign= ed offset, int value) __st_gpio_set(bank, offset, value); } =20 -static int st_gpio_direction_input(struct gpio_chip *chip, unsigned offset) -{ - pinctrl_gpio_direction_input(chip, offset); - - return 0; -} - static int st_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { @@ -1488,7 +1481,7 @@ static const struct gpio_chip st_gpio_template =3D { .free =3D gpiochip_generic_free, .get =3D st_gpio_get, .set =3D st_gpio_set, - .direction_input =3D st_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D st_gpio_direction_output, .get_direction =3D st_gpio_get_direction, .ngpio =3D ST_GPIO_PINS_PER_BANK, --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FCD2CD6E60 for ; Wed, 11 Oct 2023 12:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346924AbjJKMVQ (ORCPT ); Wed, 11 Oct 2023 08:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234998AbjJKMU3 (ORCPT ); Wed, 11 Oct 2023 08:20:29 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 182621BCB for ; Wed, 11 Oct 2023 05:10:25 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4054496bde3so62408885e9.1 for ; Wed, 11 Oct 2023 05:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026192; x=1697630992; 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=o1iLMtevXqv9Kk30l8xkOyL7j4m4nBnZ6GmTsolOeXI=; b=anjzPtSQkeB4UBRQhalEeL075Xa7BZm3sFIhbzZeLR8FV0htGQ2zrLrryDKhxAUgLr jyWxN6+g3xhhiTlWKyPJ+bx8AnTiTWnKmdvotJSbSKk6pPrecV7Ap1JzzFkU/WVKf0/9 6LlbWHQHfQWofGigU1974vaBiDZXmcdEYL2giaDciyl5WG0jaC9+2DeIW8QuzBWALuTy kXm9jAtSCLVJsshckF7La6DkK3LAQIVEb5nPxNcp4pdPHLIwqC3IpMCT5DW6g62thvio N2XaGbv3S9WRaou8NN+PXn/9szMu2hcMunTr/e1pQJtbQdsy1YdWxY1ZYHm3i9BXjgWs IsEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026192; x=1697630992; 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=o1iLMtevXqv9Kk30l8xkOyL7j4m4nBnZ6GmTsolOeXI=; b=CTf9gfQr/mp4XLDjsZ3pnNVqi8vnUOqmrSIx8eOji1ImFmNm8BlKyuIveHN9NZlY1c XPMVAHQqZis4u2bXdsP+mtMRj86dVaJ5ueCvDQUOaUZTXVgEkKDkDNGMw/GiXBLRuSPI zCeRUJM222La6m3akHULxGrUiAY8tjXxFCCKcEnR3ugE7+PmoIZuqfGaW7jsbQb7utH3 /lmrZnc5m/kXDzsAk6exwl6R/elbhYZJ3DJ2RXy+mVkbwLoGXn8Ug2wbz1FGxu++Yap7 xTC8f5xYKjV6vp3cpbyOQ639HFJH5FtiSe8zxu9ZtHpp6xZ5Dzn6OcBjg2t1cmPoMjil FxWw== X-Gm-Message-State: AOJu0YwSIiUtAGKKVKzvsx4yUXjh7Hgi6dFBl/C5bcixgezX77VDBjq2 Ajpgalbeb01ZlVf0GBdsHu/fTw== X-Google-Smtp-Source: AGHT+IHOWnpmsJTqrwNvvhgGMgR6h8nP+PquRmjaKPLLyvFA3cvrWpH7tew41p007DtOoA+dKCur/g== X-Received: by 2002:adf:cc81:0:b0:321:5971:23a5 with SMTP id p1-20020adfcc81000000b00321597123a5mr18409071wrj.20.1697026192467; Wed, 11 Oct 2023 05:09:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:52 -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 49/62] pinctrl: ingenic: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:17 +0200 Message-Id: <20231011120830.49324-50-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-ingenic.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-in= genic.c index ca58c9db5c2c..ee718f6e2556 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -3560,12 +3560,6 @@ static int ingenic_gpio_get(struct gpio_chip *gc, un= signed int offset) return (int) ingenic_gpio_get_value(jzgc, offset); } =20 -static int ingenic_gpio_direction_input(struct gpio_chip *gc, - unsigned int offset) -{ - return pinctrl_gpio_direction_input(gc, offset); -} - static int ingenic_gpio_direction_output(struct gpio_chip *gc, unsigned int offset, int value) { @@ -3680,7 +3674,7 @@ static int ingenic_gpio_irq_request(struct irq_data *= data) irq_hw_number_t irq =3D irqd_to_hwirq(data); int ret; =20 - ret =3D ingenic_gpio_direction_input(gpio_chip, irq); + ret =3D pinctrl_gpio_direction_input(gpio_chip, irq); if (ret) return ret; =20 @@ -4197,7 +4191,7 @@ static int __init ingenic_gpio_probe(struct ingenic_p= inctrl *jzpc, =20 jzgc->gc.set =3D ingenic_gpio_set; jzgc->gc.get =3D ingenic_gpio_get; - jzgc->gc.direction_input =3D ingenic_gpio_direction_input; + jzgc->gc.direction_input =3D pinctrl_gpio_direction_input; jzgc->gc.direction_output =3D ingenic_gpio_direction_output; jzgc->gc.get_direction =3D ingenic_gpio_get_direction; jzgc->gc.request =3D gpiochip_generic_request; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A28CECD6E62 for ; Wed, 11 Oct 2023 12:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346932AbjJKMWQ (ORCPT ); Wed, 11 Oct 2023 08:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235075AbjJKMVl (ORCPT ); Wed, 11 Oct 2023 08:21:41 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6999F1BD3 for ; Wed, 11 Oct 2023 05:10:26 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5042bfb4fe9so8306127e87.1 for ; Wed, 11 Oct 2023 05:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026193; x=1697630993; 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=aEPSU1082I8bAKtyLPrVc7z4Kqv5UrO7T/vph5tByY8=; b=wgRzau7L5Z/TS70EjYSoceZJIC+uekmcCdQ7CUhbkT0HyM49EMzacfrmQ3y/jMAh0V ccR/BrTFDlUYoeZws5U5FAQXpgGbiuglM/JzehhvfFLqGxFyhbMO5jcQYfEPF0DjJ4KE 15AwQwdK0lDz2KFWbq6J+bu8kZXPJ20qQsCeHvJq9mT5o8sUEp866t1D2zOWPnn+t9w3 l4HaQcx8KeTh6qLGepf79DRAh0c+blQuZb6gG115ndo/CBCS3a+iaAedTSd2aRd0WTuL aFGlrcRsVQpNpzL7jrrwc7vt4Z9KzWMWPa6QOC78/CgeWPOCt19byycbIExfJAlLWenq iHgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026193; x=1697630993; 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=aEPSU1082I8bAKtyLPrVc7z4Kqv5UrO7T/vph5tByY8=; b=TbQHODRjeoFwvKrNnbzHLeUACL3PXJUBsDZWT17IAQS0Uf85jjJFFL9/y9KBxV7hAB g0rF2Cj4xnpqKsvdNZX3j1wbjyikhALywran59/Zd/rQfi3ZlipdyJws81UgnLcwKO+O rkZa+92kYZd3FQcArfjliOcL/A1gH4647R6yt3TMCazvK9lLoRzcv4tq8ovT23Hl6loE MUAkC/RrIDQF+Otc02VWv/oNAZgbtnynj4HSnGhI/W5z8MmOBJ/99UhE75I+qcCjXRba KebuHTNGc5shOtKM5a8SF5FsO7XZwd+B+2DBx+dVbAMZOtpFDMJXqGxnGF1oOp/VZO8b t5UA== X-Gm-Message-State: AOJu0YxD2rb9wbW9WOByv/IzhDv+d7A0mpshsndVUIzVJ04k+RGl4edF tn3+4hN726JYL2wgZYZG8k3YGw== X-Google-Smtp-Source: AGHT+IHAxig/Z2/CxGgyYEn8u7D6J4Z3mhzkbCMMS0AxePToIPU+9wKEc6XAHZWoiyvTWp2/9z01cg== X-Received: by 2002:a19:6414:0:b0:500:9d6c:913e with SMTP id y20-20020a196414000000b005009d6c913emr15678060lfb.52.1697026193395; Wed, 11 Oct 2023 05:09:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:52 -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 50/62] pinctrl: as3722: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:18 +0200 Message-Id: <20231011120830.49324-51-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-as3722.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3= 722.c index 4151656f6245..e696bac83818 100644 --- a/drivers/pinctrl/pinctrl-as3722.c +++ b/drivers/pinctrl/pinctrl-as3722.c @@ -500,11 +500,6 @@ static void as3722_gpio_set(struct gpio_chip *chip, un= signed offset, "GPIO_SIGNAL_OUT_REG update failed: %d\n", ret); } =20 -static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned of= fset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int as3722_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { @@ -526,7 +521,7 @@ static const struct gpio_chip as3722_gpio_chip =3D { .free =3D gpiochip_generic_free, .get =3D as3722_gpio_get, .set =3D as3722_gpio_set, - .direction_input =3D as3722_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D as3722_gpio_direction_output, .to_irq =3D as3722_gpio_to_irq, .can_sleep =3D true, --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C887CD6E63 for ; Wed, 11 Oct 2023 12:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346855AbjJKMOI (ORCPT ); Wed, 11 Oct 2023 08:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346953AbjJKMN7 (ORCPT ); Wed, 11 Oct 2023 08:13:59 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2B67119 for ; Wed, 11 Oct 2023 05:10:27 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50336768615so8873636e87.0 for ; Wed, 11 Oct 2023 05:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026194; x=1697630994; 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=qZqsH4ukWg8dp7mZFhLrP2ADJHJW7V1bq0dpTxn7+d4=; b=jDN+8VhqyHXhzlnpklZZO6feBFgL6OpJluLHRWfrD8Q7Oxzm2sXfIrcVrJZXfbij7E 0qIsYx9/K8QV2jYXYv2XnQMXf5UaLGyTufL5SSucLL4oybZci5MPkFO49q9I10gU0SDW If8E0pvuNIAwQyTqXPTXoLXnzLWg2rmT+JHhhWLa16pxvRRfFCtJs9V6G2bIpQ6isBMa 2xb9wC3N338vpbtbXPDnPCu3Fc7EK7OSiJ9QEp/TTT6CSazZ4DV0Oifn6MxmfhrNr6lo tbX0zLqTzfDfKXR/U2Rh+lBWPpFyqTFuYCHrYsFW+kUNnx9whG1bEi+cN0FXgst5PjdL yW2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026194; x=1697630994; 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=qZqsH4ukWg8dp7mZFhLrP2ADJHJW7V1bq0dpTxn7+d4=; b=w+QnBzw6GQa2IJYNUb0do/OSJxVd/2Qvw9EKc9ToIdjH0mhH6OG5yhDTcDSZh/Srzf D5V62PJU1iqi4B9zGSNhJLkymiCAkD2Ejt8at1I4Id422QIbj1vWWuVuxhxYQNkJ+jGW yevEeCD4rQpYkRvV1ZBW2dGwMWPrWK3Wk9iMXzn9dydos0bpZKQ4ADpubvEBCH8czV9y UbPZCOgtiy5838af9jRc9q8xcsnoMKYKHbF4TL4j+wbvTA7nUc+pqyNOObEd+TlWlyAG h3oJSnlHhwDZzaMsZKY9MmbPbTSPMaNYOK0dPdFqoO7vJtK6CrWHS+KpS+kfUMKirXiC iIiw== X-Gm-Message-State: AOJu0Ywt0LRd5IEticYtjWyAJZtnvNhSZH3Cifrzyk1+QZ9Ox5wJ6eXK 7V3j6xGv+Ylk6J6sQbfTjlYVfg== X-Google-Smtp-Source: AGHT+IG3KFLgStVlObc2CV0eMCmybYAlZC4l462r1+w4xC55d7bDJvQdEq22/PMM+bC/ZCGW6q0JQg== X-Received: by 2002:a05:6512:308e:b0:503:2642:435e with SMTP id z14-20020a056512308e00b005032642435emr19858949lfd.66.1697026194235; Wed, 11 Oct 2023 05:09:54 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:53 -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 51/62] pinctrl: cy8c95x0: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:19 +0200 Message-Id: <20231011120830.49324-52-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-cy8c95x0.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-c= y8c95x0.c index 04285c930e94..adecb7d85da1 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -552,11 +552,6 @@ static int cy8c95x0_read_regs_mask(struct cy8c95x0_pin= ctrl *chip, int reg, return ret; } =20 -static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned in= t off) -{ - return pinctrl_gpio_direction_input(gc, off); -} - static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, unsigned int off, int val) { @@ -814,7 +809,7 @@ static int cy8c95x0_setup_gpiochip(struct cy8c95x0_pinc= trl *chip) =20 gc->request =3D gpiochip_generic_request; gc->free =3D gpiochip_generic_free; - gc->direction_input =3D cy8c95x0_gpio_direction_input; + gc->direction_input =3D pinctrl_gpio_direction_input; gc->direction_output =3D cy8c95x0_gpio_direction_output; gc->get =3D cy8c95x0_gpio_get_value; gc->set =3D cy8c95x0_gpio_set_value; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AEDDCD6E61 for ; Wed, 11 Oct 2023 12:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346777AbjJKMU4 (ORCPT ); Wed, 11 Oct 2023 08:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234999AbjJKMU3 (ORCPT ); Wed, 11 Oct 2023 08:20:29 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DF24183 for ; Wed, 11 Oct 2023 05:10:28 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4066241289bso63793015e9.0 for ; Wed, 11 Oct 2023 05:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026195; x=1697630995; 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=1fJ2QmhXWplWv9DEf43iP6RhPqRuukfw3F4hurk2iKc=; b=YJc1gOBPYnF1YmAADxLd64DHA/EwbJ0R0qLlyJMDzjjt+X8c93rGfeo2XwHRKsi7EZ o+VZ2cmKz1n4ArJbiAFh+IcnN0Ae7zMpO+6qbjzOp/ym10cHC2gRqzWxyQhFl6Odfoer cC+sUihlNHeYQA9aeP4CcsukaLFaCxQClKT33YBi/6PcKn72rF9W6MU89bfH2uD6iIcI DrsoS9+wjkd7Diql6so9OWyYpJX7hwc26fba7nxIl0LECo4ygnLUKbGBz+0fiSIiSwR0 iuohcpFEFS9NGzo72ynNmTRCqFr2qfh5Jgu5z3A8bXnB+KQsrHF9qTOm8887YATlXySe paMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026195; x=1697630995; 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=1fJ2QmhXWplWv9DEf43iP6RhPqRuukfw3F4hurk2iKc=; b=Qkw8Lzz0dAnHewBtL5NFP0dVoAYphtZHMRfp0KcvM96qyAIqFt/l9CWIug8O8r9jO0 dVND+zQt0D8H5cJLRee0r2d8KcFVWXmEKAR2HqEWFihmJd114dUxSYaS74vKLRsf4Uau ORmWP8lWjvnYWgLMP+I+jTXT1fxXXkmYfFfYSpnlskEMDmsP9B+RlKN//6zD7TFAwTyG 2PogNZQTe22to327ngp5/+1fmpf19KPtBVGHwMfiP+TtGh7hFDW34lVB6wT2AU/PXbT3 ihcDaNLsqNw3d42Rwhc8f7d1JsAv7GiLGlwq2+kAJ7VmchzYYlI+kY/AlM8UQ8GLauqU O1cQ== X-Gm-Message-State: AOJu0YyKiMED1LGjb6UJLgUeKaoqFsGLIWHc3ezutr9VJgeVc7A0qKRF TyGSI55f4p70IDy+BbMgkFsa0g== X-Google-Smtp-Source: AGHT+IHezi/Ra4dzqQwKFnBx1xG/zTlvOuMCpECzOYPprKTJYnjFWFcuv+is8+FT22ih9eOHYCRGtA== X-Received: by 2002:a05:600c:4686:b0:405:95ae:4a94 with SMTP id p6-20020a05600c468600b0040595ae4a94mr17714386wmo.5.1697026195043; Wed, 11 Oct 2023 05:09:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:54 -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 52/62] pinctrl: vt8500: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:20 +0200 Message-Id: <20231011120830.49324-53-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/vt8500/pinctrl-wmt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/= pinctrl-wmt.c index 639446bba373..fce92111a32e 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -526,11 +526,6 @@ static void wmt_gpio_set_value(struct gpio_chip *chip,= unsigned offset, wmt_clearbits(data, reg_data_out, BIT(bit)); } =20 -static int wmt_gpio_direction_input(struct gpio_chip *chip, unsigned offse= t) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int wmt_gpio_direction_output(struct gpio_chip *chip, unsigned offs= et, int value) { @@ -544,7 +539,7 @@ static const struct gpio_chip wmt_gpio_chip =3D { .request =3D gpiochip_generic_request, .free =3D gpiochip_generic_free, .get_direction =3D wmt_gpio_get_direction, - .direction_input =3D wmt_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D wmt_gpio_direction_output, .get =3D wmt_gpio_get_value, .set =3D wmt_gpio_set_value, --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C84E1CD6E61 for ; Wed, 11 Oct 2023 12:21:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346842AbjJKMVF (ORCPT ); Wed, 11 Oct 2023 08:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234979AbjJKMUa (ORCPT ); Wed, 11 Oct 2023 08:20:30 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22D881BE3 for ; Wed, 11 Oct 2023 05:10:31 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50336768615so8873752e87.0 for ; Wed, 11 Oct 2023 05:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026196; x=1697630996; 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=hnHBRfmIODSTWCjwzxjk920VZIB9kQcoosTVsaf2qL0=; b=v24PuOjcTzGp0dh2Iu29GIIH7mSwc8A/2AgjDyUlJSPrOePMGqiWAA7AtRuOtt5T48 ZhoqNtiPOIZ2tcmaSezB1FCEZ7VB6hIjRVx3SdyXiBtmTvh7brTWI4zKgNoXG5lR8fNo IDimzhlRIkd5xoxHcPH+oO+3RP4OyEFqQ+CR1W26V4LOZjfT4gvZBIwh1v1ajz7eUZR9 x8Vy5sqWFI/wgs3KwVEJHxTtdN1RVlbiLr+Zp9lORqSUUGOvRPWbid8lzlQBcQnkYGnf +QBAX/dqns8j2NeFA52HDvbyhxWgRRhvnzAq16nEbg3te2ORlCO5gVt2Lefzi2y/F3oG BBAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026196; x=1697630996; 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=hnHBRfmIODSTWCjwzxjk920VZIB9kQcoosTVsaf2qL0=; b=gQMqaA6a9MDfRESyeJxLEJVMq5H9Hk9eNHJlI8wK0EoGbnlu9l5C8mqX4FdCApDkDZ RCCPGAYyoF9KY+k54O/p1rpH88J6d733QViT/9oYQY+xNlpT8vJb3FdjHt4uF5z3BrEJ B81ofc7acMNujlxB75bBtV8LpvjEVYStKcEC48t2VDDm0ohIFF4wy3gGl2IL1pZh+1JP RfVrD9A+oBGyGYwiXi7ARSi0DI+KYRZHEhTqeyUxCseuJVCJP/gJVMyvP21iwwZ3MSTE 1aB9STll8JTAbL/nFmWwox0YMbRhzYVxC27kWsAmdoduyHg6Gri174pRoNQld+SCyHkc cbHQ== X-Gm-Message-State: AOJu0Yzw+PuVwWM7HNsJC+fYEz1W9luSx75ZBJ37kH5IBTm1lWWXf3Ok 7Xl5TYNv0wQV+Yag8cTeDg5rvw== X-Google-Smtp-Source: AGHT+IHiLET8Kdxt+n+ntqcTD8EU7hvexgq5tOthMl0H0anAtL86DL6NDxtysNs/9SknJ9KKmwY/QQ== X-Received: by 2002:a19:771e:0:b0:503:555:4000 with SMTP id s30-20020a19771e000000b0050305554000mr15204373lfc.25.1697026195947; Wed, 11 Oct 2023 05:09:55 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:55 -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 53/62] pinctrl: axp209: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:21 +0200 Message-Id: <20231011120830.49324-54-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-axp209.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp= 209.c index a6eb3b866a23..2b4805e74eed 100644 --- a/drivers/pinctrl/pinctrl-axp209.c +++ b/drivers/pinctrl/pinctrl-axp209.c @@ -124,11 +124,6 @@ static int axp20x_gpio_get_reg(unsigned int offset) return -EINVAL; } =20 -static int axp20x_gpio_input(struct gpio_chip *chip, unsigned int offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int axp20x_gpio_get(struct gpio_chip *chip, unsigned int offset) { struct axp20x_pctl *pctl =3D gpiochip_get_data(chip); @@ -474,7 +469,7 @@ static int axp20x_pctl_probe(struct platform_device *pd= ev) pctl->chip.get =3D axp20x_gpio_get; pctl->chip.get_direction =3D axp20x_gpio_get_direction; pctl->chip.set =3D axp20x_gpio_set; - pctl->chip.direction_input =3D axp20x_gpio_input; + pctl->chip.direction_input =3D pinctrl_gpio_direction_input; pctl->chip.direction_output =3D axp20x_gpio_output; =20 pctl->desc =3D of_device_get_match_data(dev); --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B7CDCD6E5D for ; Wed, 11 Oct 2023 12:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235004AbjJKMUl (ORCPT ); Wed, 11 Oct 2023 08:20:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346422AbjJKMU2 (ORCPT ); Wed, 11 Oct 2023 08:20:28 -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 1EE731BE1 for ; Wed, 11 Oct 2023 05:10:31 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-406618d080eso64753875e9.2 for ; Wed, 11 Oct 2023 05:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026197; x=1697630997; 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=4mWMEsrepSOyp3f33hvoi4PwifoeQU9K1dcaB1U/fvQ=; b=FKWovqnOwjZuwTs7Aa/tCt/9cS7mrqIGlmBTvjvS07A+MIUSEvjYSFdr4aYew5CYD7 G8HT1jI6OfVrLQB7VDebI42VsgJVrZI1je5W6p0+txUZM81v83fDPlaIMADpmtd5+TPc MfPco/nATr3R3ws5O1fOjqBggG3jfduSUwG5gggmsTxSi9/Eya6k0qA62Y5N6jLn8eVC 2A9xRjGJPso7PyW0q1gbRzsp9a2foTssOWodFhF46jKjCIDgBCIPXG6nVXZGMAe9oh9/ 9ow+TyBG3xGMGp4GeQl2FJynAOHyKwTtJPfViUeRS+w9s6KBgfzauaLBAPSS2NELKq/x QnaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026197; x=1697630997; 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=4mWMEsrepSOyp3f33hvoi4PwifoeQU9K1dcaB1U/fvQ=; b=V7b+bsKJHjm9YvpIZ/jp2pECjGFHoYZ1q6OtrTIuhsHRSldfQ4TKfA/k4JdtVFyWK9 NNyNDgSeKU88bWehz/Rg4O2U0fuzvgjuYighCVOr8zhrZwXuBPbeMUXhOKvfk8Fl3hju ASjgzZGHXMiQ/0f+70MTMNKHgr7TOokoMTazhIfboQeYi7MQ49oZ/G18RIyGF7LcWvdH gxgSPRTRe4YCrkA9ET/1fAjzNcTKUm+hZEzc+jss8MuJURk6vpgq8OLqSYEpvn7ALaE8 kwsW/UNpHFpa1SeCTS2J5/n8Rc1Mry2Pxs2rfDH7jB41+7fkXs1XXyGofnmvrC+qtXHe Rq1w== X-Gm-Message-State: AOJu0YwDTSVa2ib04XwwZ5aPd5JOqwQkllBqhquoiboAX7eZFIm5yGGw cYGtM3HHTIRLk3bqrpAUNN1tGQ== X-Google-Smtp-Source: AGHT+IHbsk17MHC1ZOrnCe3XmmMvQ8tujl3C2ZLsp7RvRp2klsO03kngkwXgqbGXLmpYUjjwn9OlCw== X-Received: by 2002:a1c:721a:0:b0:405:1baf:cedf with SMTP id n26-20020a1c721a000000b004051bafcedfmr18766386wmc.24.1697026197027; Wed, 11 Oct 2023 05:09:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:56 -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 54/62] pinctrl: rk805: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:22 +0200 Message-Id: <20231011120830.49324-55-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-rk805.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rk805.c b/drivers/pinctrl/pinctrl-rk80= 5.c index 968f066eb9da..56d916f2cee6 100644 --- a/drivers/pinctrl/pinctrl-rk805.c +++ b/drivers/pinctrl/pinctrl-rk805.c @@ -286,12 +286,6 @@ static void rk805_gpio_set(struct gpio_chip *chip, offset, value); } =20 -static int rk805_gpio_direction_input(struct gpio_chip *chip, - unsigned int offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int rk805_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, int value) { @@ -330,7 +324,7 @@ static const struct gpio_chip rk805_gpio_chip =3D { .get_direction =3D rk805_gpio_get_direction, .get =3D rk805_gpio_get, .set =3D rk805_gpio_set, - .direction_input =3D rk805_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D rk805_gpio_direction_output, .can_sleep =3D true, .base =3D -1, --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44D79CD6E60 for ; Wed, 11 Oct 2023 12:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346996AbjJKMXT (ORCPT ); Wed, 11 Oct 2023 08:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234838AbjJKMWv (ORCPT ); Wed, 11 Oct 2023 08:22:51 -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 B1C211BF0 for ; Wed, 11 Oct 2023 05:10:32 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40684f53bfcso62666245e9.0 for ; Wed, 11 Oct 2023 05:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026198; x=1697630998; 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=nBWQ9fSQp0ZA4dnWkAWnLMnFs+FYMpI9chYs/e79dsQ=; b=xpHXUceaMR9V3bs14CPaeZRHcc1oDeNa/NPsff6yt78NhTfZPKZdPpqGFSDWdtt2IO xJqPNF6i1bJmys6z0Tz1oZTEBZ8Pz2vd3W7v4/j0Hxzuiyp6+N/0o3HyWwsjURHfl5Qn llQpa3VymxSX40V7ZoKYlZFsub/GW47+xGldH0V9SHPpVspkLhTJ5O4ksuIAJmhRbpuU JOu4N4/EmV0chugmVK6NpJfvfFNqtOBmaGlFS11wU6grteZKVopjT4fPLPlq2T6Mk7eK clVepseFJv/UJBkG/PufAK3mTw9ADo5LktLn6deI4X2pRMbokzzkxolPscjoxAz7G61L vi9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026198; x=1697630998; 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=nBWQ9fSQp0ZA4dnWkAWnLMnFs+FYMpI9chYs/e79dsQ=; b=FUTsHDZ4KUVj4V2e+r7Qz2kPC0lk7/TbXQGFcBUyTCDwa1qlNIh4XgBVOsgZggy9Oe UC6x7+4rIzLrPqtDeoJp44nZ1R5XV3TCs9ZSGS3ZAjp0fh/H8ko/UVtE4Cd4ofkEjMik xytleJhPEx0rHjougZlFv1BCCoa8OFFDYxxXYMW9cpIqqfdXBz7JM1O8weDuL9dbeBxo wNBkRje+76VBdYycTxW/FBYy3dV3cG2Pf+ULAPabq6gW09hz90BWOIN8yEc708g7oSID bXKlUeKJr2qA42rmqw0EUBITdbvFwdyvlto4NQ4x4euzFHKx/S3pgynCgtY+bynGGF5p AanQ== X-Gm-Message-State: AOJu0YyI29KnhYA9l/LK+//WY5MThKReYWq2aLuDEGC0vf9XYm9y5JBE iPk/lWM3tAfbYa2zWmLeobNFG/OfK8aRXdk6cYs= X-Google-Smtp-Source: AGHT+IHh7D7JdR9pIqvKYYhRQNptYpBq6OqzbRE26mTQKCl1hcF1aF3IUYfDRd5BaZH3PNhzdp5PrA== X-Received: by 2002:a7b:cd8c:0:b0:401:bcd9:4871 with SMTP id y12-20020a7bcd8c000000b00401bcd94871mr19673885wmj.21.1697026197822; Wed, 11 Oct 2023 05:09:57 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:57 -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 55/62] pinctrl: mediatek: drop the wrappers around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:23 +0200 Message-Id: <20231011120830.49324-56-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrappers around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/mediatek/pinctrl-moore.c | 7 +------ drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/med= iatek/pinctrl-moore.c index c3f33f96f920..c3d59eddd994 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.c +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -510,11 +510,6 @@ static void mtk_gpio_set(struct gpio_chip *chip, unsig= ned int gpio, int value) mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, !!value); } =20 -static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int g= pio) -{ - return pinctrl_gpio_direction_input(chip, gpio); -} - static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int = gpio, int value) { @@ -569,7 +564,7 @@ static int mtk_build_gpiochip(struct mtk_pinctrl *hw) chip->parent =3D hw->dev; chip->request =3D gpiochip_generic_request; chip->free =3D gpiochip_generic_free; - chip->direction_input =3D mtk_gpio_direction_input; + chip->direction_input =3D pinctrl_gpio_direction_input; chip->direction_output =3D mtk_gpio_direction_output; chip->get =3D mtk_gpio_get; chip->set =3D mtk_gpio_set; diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctr= l/mediatek/pinctrl-mtk-common.c index 41e9847e3085..e79d66a04194 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -808,12 +808,6 @@ static const struct pinmux_ops mtk_pmx_ops =3D { .gpio_request_enable =3D mtk_pmx_gpio_request_enable, }; =20 -static int mtk_gpio_direction_input(struct gpio_chip *chip, - unsigned offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { @@ -898,7 +892,7 @@ static const struct gpio_chip mtk_gpio_chip =3D { .request =3D gpiochip_generic_request, .free =3D gpiochip_generic_free, .get_direction =3D mtk_gpio_get_direction, - .direction_input =3D mtk_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D mtk_gpio_direction_output, .get =3D mtk_gpio_get, .set =3D mtk_gpio_set, --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 028D5CD6E62 for ; Wed, 11 Oct 2023 12:23:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346750AbjJKMXO (ORCPT ); Wed, 11 Oct 2023 08:23:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234836AbjJKMWv (ORCPT ); Wed, 11 Oct 2023 08:22:51 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7DF3D65 for ; Wed, 11 Oct 2023 05:10:33 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40666aa674fso63481255e9.0 for ; Wed, 11 Oct 2023 05:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026198; x=1697630998; 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=+7umkbBqVb4ekwk4qPLSYyQOmuMCZz6eMQtDEbYpxk8=; b=DqSVuYfWO6wFHSbp4Ht0wm2VI9IyxdCllQeF6HEAfv6SlHI3oX6lwdMlAMXWy0JxOH o3EOBywgILVV48Mox6D84LkZXuUqxgvlfyjRIsF76OemVFZ4BFAkoVDC0rL3gBjhP5my cgYBj7AK7Z2elHr+5YkMjaeon7B0yHjs7yg5S4ktBqT0hYBNahJ/oGh2ufXqMx42O7E4 aMMt6q+XhBRSiKvx5z288LBSEzVM57bw/WOFQWvtnD6Pq3H0+CBPcmUohJwL5mRprDxk BTqlT1vOzRVy/+LwpytBMNdKcEcbnqJJ1MFpxTCVmOSbmPC8vsbwC8EmqGcelPoa8zlI sZiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026198; x=1697630998; 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=+7umkbBqVb4ekwk4qPLSYyQOmuMCZz6eMQtDEbYpxk8=; b=X24IO91bnrwUUUTEaXkwLMgaM0RXpNjbAEUKeyhwxLDqPyhuJBbm8cJw1Eb321txJH VFY5bpJvjivL6jg8ypB/JMEFoQ5T7/iEmt3CFJJK94RVjyoyOug1HF9326g9xbplfHB2 rp8M3W3CfJlzHF0rm+tQkeIlWwZyqBVCb5K4j+wgcd+rCF7d0NBSZ1WejnSUE2eEYtTn i02AsO2JCbTevWNYLrRQYTd1DBul+UZ3AFgt/5KDLnJNkshqvPppylsC9OEMF4Roz1SP Imvir03bBWa9s6SVZTOGJ5zCJrsjkIJrJxLmqGp+6ev1ytmLodqdm6kMvsJUQLNkoz4+ jYQw== X-Gm-Message-State: AOJu0YzGyGLHvtD42B6Rt4cVYZ907iOJod+/BCoqVOnujVO1Kbw3cJqu 5eTjxQlwQGrvZFdsV9hvgEdWeA== X-Google-Smtp-Source: AGHT+IFyfLQRfRNQv/Aap//7J0BkR5itENHvEINMkF1uwUWU+yQ5zfYwaAVKTN5evBQyvYr8MKWv0Q== X-Received: by 2002:a05:600c:220d:b0:406:5301:317c with SMTP id z13-20020a05600c220d00b004065301317cmr17875372wml.6.1697026198647; Wed, 11 Oct 2023 05:09:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:58 -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 56/62] pinctrl: cirrus: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:24 +0200 Message-Id: <20231011120830.49324-57-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cir= rus/pinctrl-cs42l43.c index 1ba89cf279fb..012b0a3bad5a 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -506,11 +506,6 @@ static void cs42l43_gpio_set(struct gpio_chip *chip, u= nsigned int offset, int va pm_runtime_put(priv->dev); } =20 -static int cs42l43_gpio_direction_in(struct gpio_chip *chip, unsigned int = offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int cs42l43_gpio_direction_out(struct gpio_chip *chip, unsigned int offset, int value) { @@ -551,7 +546,7 @@ static int cs42l43_pin_probe(struct platform_device *pd= ev) =20 priv->gpio_chip.request =3D gpiochip_generic_request; priv->gpio_chip.free =3D gpiochip_generic_free; - priv->gpio_chip.direction_input =3D cs42l43_gpio_direction_in; + priv->gpio_chip.direction_input =3D pinctrl_gpio_direction_input; priv->gpio_chip.direction_output =3D cs42l43_gpio_direction_out; priv->gpio_chip.add_pin_ranges =3D cs42l43_gpio_add_pin_ranges; priv->gpio_chip.get =3D cs42l43_gpio_get; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AE21CD6E5D for ; Wed, 11 Oct 2023 12:12:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346845AbjJKMMV (ORCPT ); Wed, 11 Oct 2023 08:12:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234879AbjJKMMR (ORCPT ); Wed, 11 Oct 2023 08:12:17 -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 0F44D1BFF for ; Wed, 11 Oct 2023 05:10:35 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40537481094so63321825e9.0 for ; Wed, 11 Oct 2023 05:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026199; x=1697630999; 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=8hYD07DORFpnS7uYBoHZE2h5e1OIf1dxiUrdwCdcwh8=; b=nFV1NNCXTRV1zYzxZI/tjJNRUIfP2G6CoqyzO+tNyfDp3lkJxE1NtvufjXEPSrgi6Z 1CSKXj7TZgxPILIT9GQTqIwRdB8atiA/3XrGtIxMASySOGz9vxhCRnv0934TlUQMQry9 YSyJ3oDaqoeo6BBybDdaUvQdSdJ4YAwkgIBw/Lfp2wjXHUsIuksxMvGJZXjDOX8T0HWA 1+DU+9QZ0p9JD9lW0S8oMqmAN6JNwVyVIkjyezroPzjfU0q4k4QcRenIeiNno3O4Ujns iECRqSORBwYx5lOrNuX6J4zghcHRd/xYZuPXUTExVMa6kXaYTfarSJqSkRjuZK9u0nyM qpjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026199; x=1697630999; 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=8hYD07DORFpnS7uYBoHZE2h5e1OIf1dxiUrdwCdcwh8=; b=pBm0LVpcRxWbNS+p755buzZDeSR2zbRq73Qim5wAgPmiQirP1TVYCNK75vPSpSx0y1 xEMUJO248ceRCOYQxmxZKLpTEIB/FWwUj+PyZXwlQVwfO0qywUfOZ2zz8IxOp7rCBJwt iNYWrbeegbZ33cnTqnQlhFs3VCn2Lx87WcZg9dlxfxgRf3u+XQpMpud9KAQWeLvc+ORD mzKulprvBZlVjSqNhpKVecUlKRW0Bd8lX9oy7XfjLSkS2VvVIBQZiCoSCouMilIcii0j a2RQPf8n/iWIWl98vnMW56mpJaoCuEDxBI9Sx3BdmgvXJBh7AX5KDXChZAF1YlH6oZlG 0Yug== X-Gm-Message-State: AOJu0Ywmzrle+GMXaJIr2SSvAb8ZNCn9i/ql0E3NxQAIFmpZoz5Vqwmt l4C6aSUWebM5jTe/qLh6lc1yYA== X-Google-Smtp-Source: AGHT+IFJJqC8+fuQJ2pNf275wGTpeHg9YSMcla/JCmhWhH9yvD7At417hN56M5hiOFvFmI5HaDsByg== X-Received: by 2002:a05:600c:210b:b0:406:548e:bd51 with SMTP id u11-20020a05600c210b00b00406548ebd51mr17375258wml.26.1697026199541; Wed, 11 Oct 2023 05:09:59 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:59 -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 57/62] pinctrl: ocelot: drop the wrapper around pinctrl_gpio_direction_input() Date: Wed, 11 Oct 2023 14:08:25 +0200 Message-Id: <20231011120830.49324-58-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_direction_input() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-ocelot.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-oce= lot.c index 96b4e9fceb78..52aadd6d72a8 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1776,12 +1776,6 @@ static int ocelot_gpio_get_direction(struct gpio_chi= p *chip, return GPIO_LINE_DIRECTION_IN; } =20 -static int ocelot_gpio_direction_input(struct gpio_chip *chip, - unsigned int offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int ocelot_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, int value) { @@ -1804,7 +1798,7 @@ static const struct gpio_chip ocelot_gpiolib_chip =3D= { .set =3D ocelot_gpio_set, .get =3D ocelot_gpio_get, .get_direction =3D ocelot_gpio_get_direction, - .direction_input =3D ocelot_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D ocelot_gpio_direction_output, .owner =3D THIS_MODULE, }; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20AE0CD6E60 for ; Wed, 11 Oct 2023 12:13:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346853AbjJKMNA (ORCPT ); Wed, 11 Oct 2023 08:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346878AbjJKMMl (ORCPT ); Wed, 11 Oct 2023 08:12:41 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D8261FCF for ; Wed, 11 Oct 2023 05:10:37 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-406618d0991so62404005e9.2 for ; Wed, 11 Oct 2023 05:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026200; x=1697631000; 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=DD6BuU8IBUrRqrtumgxKZT6+9ObXU+wfHPC15JgkQ2k=; b=OHL9Nzn4aCShWYbtYAmeJLu+GIdlpF6HGwwHfvMjeNP4YJfJNsODtEs6yR5QJCyJT+ RQq4g11FAbgHkknhNeB8/DtGt8Fn4eSKhcsFFBUXxr1nnSK7lFjRfkZm3wPOlMK1FIAt s2mxr7za/yjad2TBObxtUqnIenyHe5VC7ufIrXiZNERsiQXYikpJ7gqgt4pNBFGvPkMb tKFa3MJ2pm75io4BL5asEeisOYwb4CuWfVRhfuveMjnEVtftyqv/vjlPZNJw6XSXe/O3 h3Gb9YryDmVtaOPjvqOruZVW5czmnxwzOkd4KNNhjVsZw7ukyZei85e7jjVhGTbpT3Fm SPUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026200; x=1697631000; 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=DD6BuU8IBUrRqrtumgxKZT6+9ObXU+wfHPC15JgkQ2k=; b=oytJ7lZR0j2s5oOwIgH/94NupesGq5DAadT2rZPMKwDcce460VxplPYKBYSqrjExur 7IUub9NGZAuPVc9dX9RUHJ2+um4wASYlexXgZl/HBvHq2OyAPKFmkMWLDISuMnIfPxQm oO0ELT87YL4b5/YObNjWt0yVNv3HUrjNgRcxLZGvlNfOUEhGIX8MKsAmLQSZVhozNG0H 9r50iSob9ohl24Dceoj1LYJqF2z8JJ6NGTSXrUkMuVM4fxtO94IX6YicIjZSngik3Vl8 5zrUm+nw7FmPv96p2xdk7aMpTW0eSh0AErLNDM4GXeCVNyvA2uq4mz0VtFec4zdSFIcW SBWQ== X-Gm-Message-State: AOJu0YydKq9n+0KzjFPbUD28OEePFc4S5MU8HDCR0HUx6Ia9cOSBN5FG Fu/dzeb4t4KAKFUSjWyTV27VyVRTvGdw6m8bNO0= X-Google-Smtp-Source: AGHT+IEFq+coT62Yma7NWl07yIfaFMeiu/EDdvRfXRkmuZzXSfkwTtPEjpsqAXpAWQRCdXSEE3OLEg== X-Received: by 2002:a05:600c:cc:b0:405:3955:5872 with SMTP id u12-20020a05600c00cc00b0040539555872mr17752582wmm.18.1697026200458; Wed, 11 Oct 2023 05:10:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:09:59 -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 58/62] pinctrl: starfive: drop wrappers around pinctrl_gpio_request/free() Date: Wed, 11 Oct 2023 14:08:26 +0200 Message-Id: <20231011120830.49324-59-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_*() helpers now have signatures corresponding with those of the GPIOLIB callbacks. We can drop the wrappers. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 14 ++------------ drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 14 ++------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7100.c index 7beed57d665a..ea70b8c61679 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c @@ -916,16 +916,6 @@ static struct pinctrl_desc starfive_desc =3D { .custom_conf_items =3D starfive_pinconf_custom_conf_items, }; =20 -static int starfive_gpio_request(struct gpio_chip *gc, unsigned int gpio) -{ - return pinctrl_gpio_request(gc, gpio); -} - -static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) -{ - pinctrl_gpio_free(gc, gpio); -} - static int starfive_gpio_get_direction(struct gpio_chip *gc, unsigned int = gpio) { struct starfive_pinctrl *sfp =3D container_of(gc, struct starfive_pinctrl= , gc); @@ -1309,8 +1299,8 @@ static int starfive_probe(struct platform_device *pde= v) =20 sfp->gc.label =3D dev_name(dev); sfp->gc.owner =3D THIS_MODULE; - sfp->gc.request =3D starfive_gpio_request; - sfp->gc.free =3D starfive_gpio_free; + sfp->gc.request =3D pinctrl_gpio_request; + sfp->gc.free =3D pinctrl_gpio_free; sfp->gc.get_direction =3D starfive_gpio_get_direction; sfp->gc.direction_input =3D starfive_gpio_direction_input; sfp->gc.direction_output =3D starfive_gpio_direction_output; diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/p= inctrl/starfive/pinctrl-starfive-jh7110.c index 695c8c0a6e8b..9d71e8c13310 100644 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -545,16 +545,6 @@ static const struct pinconf_ops jh7110_pinconf_ops =3D= { .is_generic =3D true, }; =20 -static int jh7110_gpio_request(struct gpio_chip *gc, unsigned int gpio) -{ - return pinctrl_gpio_request(gc, gpio); -} - -static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) -{ - pinctrl_gpio_free(gc, gpio); -} - static int jh7110_gpio_get_direction(struct gpio_chip *gc, unsigned int gpio) { @@ -940,8 +930,8 @@ int jh7110_pinctrl_probe(struct platform_device *pdev) =20 sfp->gc.label =3D dev_name(dev); sfp->gc.owner =3D THIS_MODULE; - sfp->gc.request =3D jh7110_gpio_request; - sfp->gc.free =3D jh7110_gpio_free; + sfp->gc.request =3D pinctrl_gpio_request; + sfp->gc.free =3D pinctrl_gpio_free; sfp->gc.get_direction =3D jh7110_gpio_get_direction; sfp->gc.direction_input =3D jh7110_gpio_direction_input; sfp->gc.direction_output =3D jh7110_gpio_direction_output; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5133CD6E63 for ; Wed, 11 Oct 2023 12:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346950AbjJKMXA (ORCPT ); Wed, 11 Oct 2023 08:23:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346959AbjJKMWb (ORCPT ); Wed, 11 Oct 2023 08:22:31 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1C8C19A for ; Wed, 11 Oct 2023 05:10:38 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-406618d080eso64754705e9.2 for ; Wed, 11 Oct 2023 05:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026201; x=1697631001; 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=nUbVE7EnprLRCHg/IupG2aGO0MyUMAidx/+KUyiUqH8=; b=nOjheE+SGPdXqTm3Xpp/aWp6ag9Ig52xlyg3hylrHr4SC2pTAUOQRzqSDZpabFdVjI vIjqdWQrrAH47bjRx6FxSw4hsRE53gNLCB/nHYIqK0cNflxmb4zxOAGAU68SOVV2QshK mv/ThRX4uhrbt9fwgAtPVeyNpmZW5hvKwZX4TBwy0Yt6jvGmdia//5g6XTbycLNViiUA qGbcoR/Th+UhivKgjiCFShjuNAvAFiOtK1RIJD5P5gesCk08RKORpUDFnubXlkuUiGdw Y71jwAPL1AnAXRaJ4uCZRf+8LpNh+Bw0zFuzeYTUzNryi4hSDNPXElamzqpbEzpJvRIS 4xAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026201; x=1697631001; 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=nUbVE7EnprLRCHg/IupG2aGO0MyUMAidx/+KUyiUqH8=; b=vU6j9MW1OHww/a+Ihsbx+a3cknkNAWl1tUBjGtlMYz078y8k2AZoION77/YbeFHvAM Ar1o2qOJM8iv5c7Ht8pj5KYLA+vECgBQEVz1/IvLVb0BlO756P/iNMEgNxdOxcoh+ZRs 0+aYfEbjIiGm+31mw0v3PaCgl6GwO07QrAaBI1jSliR8qqR3YTqaV9u8qae6xTpWvhLQ a4I9mD840OHgd3isXRbGAH4y8r2F436rmfeQnZYKTfzzvy51PC7norECliJP9JJ3vJIQ 0i0aP3Mnm5z3L3ZzSgUEfekD2DKBR8ZXrvOH/+XoMbZDi8WYXBMX4wgsmCwkuI5iZdbu ofEQ== X-Gm-Message-State: AOJu0YxhPll+kTu5KwLftwsUmA+dUxFZ/gaEvIsEuTxVVUa2HHfIGAGh fkEI4ZZMzcfP6srXxfj9sOAE8g== X-Google-Smtp-Source: AGHT+IEPRuIYbzvef3i9jdK8m7uV+p1qfFU44AIb0ANdBVLyT68aVw2Zh4aIudZrTjzL26NX6RkBDA== X-Received: by 2002:adf:ed11:0:b0:317:6653:60b8 with SMTP id a17-20020adfed11000000b00317665360b8mr17257726wro.50.1697026201490; Wed, 11 Oct 2023 05:10:01 -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.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:10:00 -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 59/62] pinctrl: stm32: drop wrappers around pinctrl_gpio_free/input() Date: Wed, 11 Oct 2023 14:08:27 +0200 Message-Id: <20231011120830.49324-60-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_*() helpers now have signatures corresponding with those of the GPIOLIB callbacks. We can drop the wrappers. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/stm32/pinctrl-stm32.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/= pinctrl-stm32.c index 917b87acbf0d..64e8201c7eac 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -220,11 +220,6 @@ static int stm32_gpio_request(struct gpio_chip *chip, = unsigned offset) return pinctrl_gpio_request(chip, offset); } =20 -static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) -{ - pinctrl_gpio_free(chip, offset); -} - static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset) { struct stm32_gpio_bank *bank =3D gpiochip_get_data(chip); @@ -239,11 +234,6 @@ static void stm32_gpio_set(struct gpio_chip *chip, uns= igned offset, int value) __stm32_gpio_set(bank, offset, value); } =20 -static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned off= set) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int stm32_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { @@ -316,10 +306,10 @@ static int stm32_gpio_init_valid_mask(struct gpio_chi= p *chip, =20 static const struct gpio_chip stm32_gpio_template =3D { .request =3D stm32_gpio_request, - .free =3D stm32_gpio_free, + .free =3D pinctrl_gpio_free, .get =3D stm32_gpio_get, .set =3D stm32_gpio_set, - .direction_input =3D stm32_gpio_direction_input, + .direction_input =3D pinctrl_gpio_direction_input, .direction_output =3D stm32_gpio_direction_output, .to_irq =3D stm32_gpio_to_irq, .get_direction =3D stm32_gpio_get_direction, @@ -381,7 +371,7 @@ static int stm32_gpio_irq_request_resources(struct irq_= data *irq_data) struct stm32_pinctrl *pctl =3D dev_get_drvdata(bank->gpio_chip.parent); int ret; =20 - ret =3D stm32_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq); + ret =3D pinctrl_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq); if (ret) return ret; =20 --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6403DCD6E5D for ; Wed, 11 Oct 2023 12:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346847AbjJKMNL (ORCPT ); Wed, 11 Oct 2023 08:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346883AbjJKMMl (ORCPT ); Wed, 11 Oct 2023 08:12:41 -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 C9FB31FD6 for ; Wed, 11 Oct 2023 05:10:40 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-405505b07dfso5389705e9.0 for ; Wed, 11 Oct 2023 05:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026203; x=1697631003; 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=RhxxEdfFHW+stAxKA/W7e3OuQ/nZwbmKsltug+cK6+c=; b=DDRCmaNSEFdynYCD7ID/io8ArwGu5dYgFg8GdTCHT1HUkL3vAsvmLouyr45WPNmM0V N+clcNEZK2UXB1z3dSIoTWk/mVbn5W9Bce65XBdA8R/vbhX732c4lX5Wk/5Lv1CoCWzY AK9datAetrpGIoW4X+xBwz4V+PCPgKALnrIiUI5sTw5VVDP56nwQJ2Ebk8EzA9I8TExW ZoPA2xdgN4D+Gc+dFQvn4npUBi4iV1/D73h01Yu2xhaWegHYoFY35cmTj47zeUDsCIYI G77J5Pk7ogCArZx/I1swTad3ULSCFq+QwvJK+uGIR0e7HyoxKi2SCJK7DJIxwdX9Xh6e g4NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026203; x=1697631003; 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=RhxxEdfFHW+stAxKA/W7e3OuQ/nZwbmKsltug+cK6+c=; b=P7+b6Be4H2zfBIdddWGgkykrrXG8eawwseLsw0x5uymf1j2AH9NR0In0/t+vgd521m TwUNnTzZMY6wYFAG9fXO+PJqDXEzuGPf69P76hF9Nja4ldd8/m93ZnQeNYpo4QVhd4hj kj9/+lDmP0o44lfLZOHrcp/+mmmOZG3VmJFgIHFkMznxFdW6IkatFipXeOe896F8J4ob Poe4B4MXz6RHrcyKnYjfIu80D2aaJ54TaYXSXsOc0+u+s/2k2O9/5p21kZ1jszxHoOY/ E1PkwwtAAKn6T7iDGABxTTnyi+Vp6M/uuFnkTJy/u0FRl8hy58+9B4LDSYkpaJTRg+Ea Iq5g== X-Gm-Message-State: AOJu0YxfQS0j3Rk1iot7rBPu0tPaNbP5xucfDcgoXVy4ReJ2DL5uGqrl odGQalzUO8dGsbjk8mfJ62yWMQ== X-Google-Smtp-Source: AGHT+IFTHg1z8EvZk2ZpTplwEy/MDg9y1Qxo7yi7/hSIC3LqIaPDZuETg9wI+Df8PAcjX5DcHWSVPg== X-Received: by 2002:a7b:cbc8:0:b0:405:19dd:ad82 with SMTP id n8-20020a7bcbc8000000b0040519ddad82mr15567410wmi.16.1697026202814; Wed, 11 Oct 2023 05:10:02 -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.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:10:02 -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 60/62] pinctrl: nuvoton: drop wrappers around pinctrl_gpio_request/free() Date: Wed, 11 Oct 2023 14:08:28 +0200 Message-Id: <20231011120830.49324-61-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_*() helpers now have signatures corresponding with those of the GPIOLIB callbacks. We can drop the wrappers. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 8 +------- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm7xx.c index 51aeac7ecc79..1e658721aaba 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -208,12 +208,6 @@ static int npcmgpio_gpio_request(struct gpio_chip *chi= p, unsigned int offset) return bank->request(chip, offset); } =20 -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(chip, offset); -} - static void npcmgpio_irq_handler(struct irq_desc *desc) { struct gpio_chip *gc; @@ -1916,7 +1910,7 @@ static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pc= trl) pctrl->gpio_bank[id].gc.direction_output =3D npcmgpio_direction_output; pctrl->gpio_bank[id].request =3D pctrl->gpio_bank[id].gc.request; pctrl->gpio_bank[id].gc.request =3D npcmgpio_gpio_request; - pctrl->gpio_bank[id].gc.free =3D npcmgpio_gpio_free; + pctrl->gpio_bank[id].gc.free =3D pinctrl_gpio_free; id++; } =20 diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nu= voton/pinctrl-npcm8xx.c index 140fdbbe8458..a377d36b0eb0 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -205,11 +205,6 @@ static int npcmgpio_gpio_request(struct gpio_chip *chi= p, unsigned int offset) return bank->request(chip, offset); } =20 -static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) -{ - pinctrl_gpio_free(chip, offset); -} - static void npcmgpio_irq_handler(struct irq_desc *desc) { unsigned long sts, en, bit; @@ -2388,7 +2383,7 @@ static int npcm8xx_gpio_fw(struct npcm8xx_pinctrl *pc= trl) pctrl->gpio_bank[id].gc.direction_output =3D npcmgpio_direction_output; pctrl->gpio_bank[id].request =3D pctrl->gpio_bank[id].gc.request; pctrl->gpio_bank[id].gc.request =3D npcmgpio_gpio_request; - pctrl->gpio_bank[id].gc.free =3D npcmgpio_gpio_free; + pctrl->gpio_bank[id].gc.free =3D pinctrl_gpio_free; for (i =3D 0 ; i < NPCM8XX_DEBOUNCE_MAX ; i++) pctrl->gpio_bank[id].debounce.set_val[i] =3D false; pctrl->gpio_bank[id].gc.add_pin_ranges =3D npcmgpio_add_pin_ranges; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41733CD6E5D for ; Wed, 11 Oct 2023 12:20:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235007AbjJKMUr (ORCPT ); Wed, 11 Oct 2023 08:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346724AbjJKMU2 (ORCPT ); Wed, 11 Oct 2023 08:20:28 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 157221FE1 for ; Wed, 11 Oct 2023 05:10:41 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3215f19a13aso6632960f8f.3 for ; Wed, 11 Oct 2023 05:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026204; x=1697631004; 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=4LZIUlewtVfNK9nVoiXqaExbYoS0xfZdDyCSvk2gByo=; b=Nf5RdwE6yhqFdyYTXpyFyz/WWrsW9eGihDz8CrOx/VB8cWbx7HtjR9xEndfboBIhci AwNLShAW1U+S7bSdA7mIsu/QTppLPxHIAvNXakZ5kfsyPGIrHkx7YOv3YkEk1cyrVnxO OE58ZjEW+5ZEzx9JDQRvrfto2Ecbq5WbNauXNtfBpKSwsYkJ4O14S1AcDJms8nPvgcx/ IhndHCln5BGo+qKjplqrRAjSwWA13HskQpPq80jn9UJz1/98256HzBfZvzq2PMb+qhH9 Zf0JeJfLq0jOGvL9uLnLLve/aZRhKjyZTHHbZ5hp6n++o1fbf5HNGWNTt1gy3X5f7HF5 rSVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026204; x=1697631004; 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=4LZIUlewtVfNK9nVoiXqaExbYoS0xfZdDyCSvk2gByo=; b=ouweyJ9I1foAU7/iZYCn+UBdOGte4ddoNAY0u+q8ywnRaRD0GIeNkfEezAWnkR8CVm 3zBI6fweeAbXyWd1bU/1kUxCL6PFNyhp5u0ypiy21zaMqeuLDcr+cLgQLYuLxnU4Vwsz cUfamektlZWkVVo9w5a0Tvn+iAjWM9MPiYuSY6+KEuvSQUEmd7Qw2dNo73nXb6LFkgbK h1USUzzq+1cKmhG8FpHHHqFC58kZbyKtbJNgTJqvqVqMkBCYs+NlVOPgYNh+zvtGi602 RYte89NCHEVgl+Leq31PzDlMQ5ehGiG5BllSpfYdj40Rk9D/tppli/quwKT97AfWFl4k c95g== X-Gm-Message-State: AOJu0Yy0jAuuVVdyBXwe4+lFJ6ONoXe8nBSnPzROjVJx7gG6cLwW9iKb JWil9qtDPWcLfkLin7ZBf7yzmQ== X-Google-Smtp-Source: AGHT+IH4maRAwRzcaevPB/f3f3E+P7d+G3CxPj36ujiSz4Q04iXxz1W4INNjCrmHRJ8dEAGjsXmhvQ== X-Received: by 2002:adf:ed8c:0:b0:31f:9a0d:167f with SMTP id c12-20020adfed8c000000b0031f9a0d167fmr17018035wro.50.1697026203806; Wed, 11 Oct 2023 05:10:03 -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.10.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:10:03 -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 61/62] pinctrl: em: drop the wrapper around pinctrl_gpio_request() Date: Wed, 11 Oct 2023 14:08:29 +0200 Message-Id: <20231011120830.49324-62-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_request() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-em.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index aa31c189d0ef..6c862c572322 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -227,11 +227,6 @@ static int em_gio_to_irq(struct gpio_chip *chip, unsig= ned offset) return irq_create_mapping(gpio_to_priv(chip)->irq_domain, offset); } =20 -static int em_gio_request(struct gpio_chip *chip, unsigned offset) -{ - return pinctrl_gpio_request(chip, offset); -} - static void em_gio_free(struct gpio_chip *chip, unsigned offset) { pinctrl_gpio_free(chip, offset); @@ -311,7 +306,7 @@ static int em_gio_probe(struct platform_device *pdev) gpio_chip->direction_output =3D em_gio_direction_output; gpio_chip->set =3D em_gio_set; gpio_chip->to_irq =3D em_gio_to_irq; - gpio_chip->request =3D em_gio_request; + gpio_chip->request =3D pinctrl_gpio_request; gpio_chip->free =3D em_gio_free; gpio_chip->label =3D name; gpio_chip->parent =3D dev; --=20 2.39.2 From nobody Fri Jan 2 12:27:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C6E3CD6E5D for ; Wed, 11 Oct 2023 12:22:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234981AbjJKMWA (ORCPT ); Wed, 11 Oct 2023 08:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235016AbjJKMVZ (ORCPT ); Wed, 11 Oct 2023 08:21:25 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CC9A1FED for ; Wed, 11 Oct 2023 05:10:42 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40666aa674fso63482135e9.0 for ; Wed, 11 Oct 2023 05:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697026204; x=1697631004; 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=EYaubAEjb8jIz/ZTOGnBQzJ0oe0Kyc/ixkibc3BZPzU=; b=gJ6o3XNXNqPcrsDzBkzjjR7P/qyRDWUszJX6S21MICz8qC0s4tawavCrpD98GEA+jo f0ZGAZDHMPZ46eOG0KCZCTfujTuQG/eiZ1PrW5t2Vbyh5TN37d33IqcmGHbJPBuyz380 qwB6ZL21T92NOsT01yWhihvMyERSCq0vMSTI2OJXIbmtgfLhe4M+b4bfD4cM1Pf+Lyma q1yGNZXtRLkuoKgrNRTlUbq55PpxXP+07EpmAiuFzNYep8CU+JhWSWxLfMIYZhvD1Bi1 c8AjlmgRyNIBkCUxCXm0s2ZWE+22UR7GkX03d2ANiIdgXoBF2DLeZa4JM78lP2yX4kCE wvtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026204; x=1697631004; 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=EYaubAEjb8jIz/ZTOGnBQzJ0oe0Kyc/ixkibc3BZPzU=; b=rvcjSep2CyRI9tWr6pvSlPBK7+Qz0vjQchmAvSEBkG/iIDZqRQWnvmduMFQoYM36qg aMD6k7SSrl15iyYwRJOd2aeWIj3/SniQrvAKYCPGjVPMWyYVz678aeTLttRuKAUxgugO BLHNbNXaJebaBmRxPI9gkLq15mtFTYy6IkyB+LFyf9pVymxpyr1R3cSlm2s4nZrTlrJy MgI/Pst8+ZEwTkqB7s2yOo147fqav7lweN8TbSfv7qJeacwBNYbtEXeBMAZkl5FAtfBi zzfM8RmzaB5EGA1UnBXcZYRavC6+NJxCvcjMP0qETKGNsaZnvx5vpvlM5uXBVnD/n+1G usFQ== X-Gm-Message-State: AOJu0Yw9V1rFuMBiB/wGLgfMtdbL1oSehnmkgcJLBV2PBNRN7DNv4CQp D0XQmvpYWphOtcEMJubJ3pvkGw== X-Google-Smtp-Source: AGHT+IGmBAeYs64/RxasQf7SrRNvdthF83D37oFng3awwML8beZt/DpTLPi0E5IrqQczr0w0q42XHg== X-Received: by 2002:a7b:cd85:0:b0:406:599f:f92c with SMTP id y5-20020a7bcd85000000b00406599ff92cmr18667253wmj.20.1697026204759; Wed, 11 Oct 2023 05:10:04 -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.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:10:04 -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 62/62] pinctrl: tegra: drop the wrapper around pinctrl_gpio_request() Date: Wed, 11 Oct 2023 14:08:30 +0200 Message-Id: <20231011120830.49324-63-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski pinctrl_gpio_request() now has the same signature as the wrapper around it so we can drop them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-tegra.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index adfbed62eff1..ea5f9cc14bc4 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -137,11 +137,6 @@ static void tegra_gpio_disable(struct tegra_gpio_info = *tgi, unsigned int gpio) tegra_gpio_mask_write(tgi, GPIO_MSK_CNF(tgi, gpio), gpio, 0); } =20 -static int tegra_gpio_request(struct gpio_chip *chip, unsigned int offset) -{ - return pinctrl_gpio_request(chip, offset); -} - static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset) { struct tegra_gpio_info *tgi =3D gpiochip_get_data(chip); @@ -717,7 +712,7 @@ static int tegra_gpio_probe(struct platform_device *pde= v) } =20 tgi->gc.label =3D "tegra-gpio"; - tgi->gc.request =3D tegra_gpio_request; + tgi->gc.request =3D pinctrl_gpio_request; tgi->gc.free =3D tegra_gpio_free; tgi->gc.direction_input =3D tegra_gpio_direction_input; tgi->gc.get =3D tegra_gpio_get; --=20 2.39.2