From patchwork Wed Oct 11 12:07:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732261 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 D6794CD6E60 for ; Wed, 11 Oct 2023 12:09:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231889AbjJKMJL (ORCPT ); Wed, 11 Oct 2023 08:09:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346207AbjJKMJK (ORCPT ); Wed, 11 Oct 2023 08:09:10 -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 4D8749E for ; Wed, 11 Oct 2023 05:09:07 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40572aeb673so65232015e9.0 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=IBQbWt+mETy3IZoKLbD1BeCTr+HWk88BSw8ygastfleBCUIriEM2CVf2pZTX1d6ceh nj20qvqwfwkUT71+aoHnehzfQ5RGPigogRH+h6EPjfnQc9QxB8k2yCGqOUqs/4sNyLpR u334dSk4xPG+qLwFrAB3jO9CqBZlnDxv0+2+3TCSWxGLHJl8H5rtE63vAmUdE/vP+P8B N9FH8yiEA/Tm7GDcL1NdNUOa1+f5oiZ5+wKFYMlyuwpeUINIHYJRtg3htnd0gQUHs6iY M24GVfuLTS2HdH0lZpdE07G+kZVUoFjJYvloEHaE7E/4cQuLJy501MLIEAeE/VUiVFje l54Q== X-Gm-Message-State: AOJu0YyI3CEkwUV6ICoZnhDKWpvIQCmuElZatAI5uZMdRTZQ+vw+V18k p0p1aLuEYmUCpH7fbUtTK010tw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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/consumer.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 /* 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); -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 pinctrl *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); -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); #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) { From patchwork Wed Oct 11 12:07:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732260 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 9168BCD6E60 for ; Wed, 11 Oct 2023 12:09:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346383AbjJKMJO (ORCPT ); Wed, 11 Oct 2023 08:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346226AbjJKMJL (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 BE488B0 for ; Wed, 11 Oct 2023 05:09:08 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40572aeb673so65232275e9.0 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=ctiiyzgUw3gjH/g403fr+LzKT5JNojNr0vgWQ2nHp0PIX16fJJYZap4kF4+/3rE9TK OI/hWLYvHKjXyWEzO+d2WS7zWuqJzFp0pu98u5rW2hq+u8CzV2psOInE8uu137gWPlE4 /8Gp7qy7rxIlZtlmQIaWV2BZ5npSRMNvrkY6DzBMuCtOv6o1dl/QYz2HZkfp2UKP4pzj sG7auOXnvyo+P6PQa+PAM6JdcY5rt3AC4AL8vqNcAZjvv4Q2RHx37wSCtZXVct6unyvg Ykqz4GD49t0iVZ/Kmazz395H+pNUDf/PZFMVzhwcqw/yIDPpSVzVx7lMnOw4YCOQi8uI E10g== X-Gm-Message-State: AOJu0YyzmPK+b4cyH33l5fkSdyRwkj5IMcySvUR3YylQj/9mE8jYmKqB YHx/0hG8yTOewAS76J8ANRwYIQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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 +#include + #include #include #include @@ -781,14 +783,13 @@ bool pinctrl_gpio_can_use_line(unsigned gpio) } EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); -/** - * 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 drivers - * shall *NOT* request GPIO pins to be muxed in. - */ +bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset) +{ + 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); /** - * pinctrl_gpio_free() - free control on a single pin, currently used as GPIO - * @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 drivers + * 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); +/** + * 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 drivers + * 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; } -/** - * pinctrl_gpio_direction_input() - request a GPIO pin to go into input mode - * @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 individual - * 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); /** - * 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 input 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 individual + * as part of their gpio_direction_input() semantics, platforms and individual * drivers shall *NOT* touch pin control GPIO calls. */ +int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset) +{ + 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); /** - * 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 output + * 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 individual + * drivers shall *NOT* touch pin control GPIO calls. */ +int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset) +{ + 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[] = { config }; @@ -926,6 +959,23 @@ int pinctrl_gpio_set_config(unsigned gpio, unsigned long config) } 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 + * @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/consumer.h index 22eef0a513ce..c95c13983376 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -17,6 +17,7 @@ #include struct device; +struct gpio_chip; /* This struct is private to the core and should be regarded as a cookie */ struct pinctrl; @@ -26,11 +27,20 @@ struct pinctrl_state; /* 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 offset); 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); 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 gpio) return true; } +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; } +static inline int +pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset) +{ + return 0; +} + static inline void pinctrl_gpio_free(unsigned gpio) { } +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; } +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; } +static inline int +pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset) +{ + return 0; +} + static inline int pinctrl_gpio_set_config(unsigned gpio, unsigned long config) { return 0; } +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; From patchwork Wed Oct 11 12:07:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732986 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 7A6CBCD6E5D for ; Wed, 11 Oct 2023 12:09:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346396AbjJKMJP (ORCPT ); Wed, 11 Oct 2023 08:09:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346311AbjJKMJM (ORCPT ); Wed, 11 Oct 2023 08:09:12 -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 715E89E for ; Wed, 11 Oct 2023 05:09:10 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4066241289bso63786185e9.0 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=PMoKheEOGYk6IctfjjDwJcO7tZq3tO9NoXih0wmOG7Jzo6pUmrkrVo9hNHVhDl24UG V9pRo0kFVE/460HtAMW6pp0oqLUT6sjicpQ84IuXFf9ah2f2vvIh91sPJuLZzjnMl9Mj pHu5e0rkQiGBaHai6Tloj4DfNpyZ2AB5naXDD4z4j9kiK7ESEQkI0nOZ2kW1kP5KMSLT ZvC34O4ihexpasiVyui9iwXVdIJzyy1nnOxo2R9mg+8nCMFVr64TCbD/zKSVbGL28jqf wp3D25cGMSClRDDe07aNNKbfLJXWTYdqtxaT6o4eEPOpBOpOnYH/DANnu2V6S3EeYXui 6Ugg== X-Gm-Message-State: AOJu0YwDJMJvY55ITBiaJVaDkxdtYVoO1kWuscXTFVOO5DRxMO+SJEoT qUb2aP49wZiz7/lS80SreH7JcCCEdM4hzQBX0rY= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: 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, unsigned int offset) return 0; #endif - return pinctrl_gpio_request(gc->gpiodev->base + offset); + return pinctrl_gpio_request_new(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_request); @@ -1981,7 +1981,7 @@ void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset) return; #endif - pinctrl_gpio_free(gc->gpiodev->base + offset); + pinctrl_gpio_free_new(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_free); @@ -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); From patchwork Wed Oct 11 12:07:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732259 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 7F823CD6E5D for ; Wed, 11 Oct 2023 12:09:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346465AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346387AbjJKMJO (ORCPT ); Wed, 11 Oct 2023 08:09:14 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA5DBA for ; Wed, 11 Oct 2023 05:09:12 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-5041d6d8b10so8910576e87.2 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=Z/ilgn15TwZK2+cKmwANQ3MZPQpEw3zGYCEBVs57dvYjXCfxmU64p658E5LVUpT+6M NQej/xtepDDL1uGLdsJqTIke6zrbFL2lwAK+DOmLRMBYjxWCusRvWXla/Y7Z8mv7Q2/9 Wkicrj0jnj9FlFhqKLZB1NNlAMAzhn42CWeRBJ1dee1SVQvSGyUzmyNDVxpjO+wScal7 sFI8h6zlR4/RkojAa7nYF7GIn7jtS+QGh34DtTmDH0p9SrMawGmpqSWkyItx2nsUuzv7 QY+Kdyv1BxnH71/rMIvHWHsYpiKJxRufRQR9yxHlScHr/pl9DhT6u924wAODtltuy8vD uYyw== X-Gm-Message-State: AOJu0YxjgLBKPX7491stJ/5Ynt8ZpkLuxJezgQXSNt9W3uBfqQHJG/6D 09aCdBjaPFXUifJ6W/bz/c78omHvoPfTBvMhKtk= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 *desc, * FIXME: find a non-racy way to retrieve this information. Maybe a * lock common to both frameworks? */ - ok_for_pinctrl = - pinctrl_gpio_can_use_line(gc->base + info->offset); + ok_for_pinctrl = pinctrl_gpio_can_use_line_new(gc, info->offset); spin_lock_irqsave(&gpio_lock, flags); From patchwork Wed Oct 11 12:07:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732985 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 01C34CD6E60 for ; Wed, 11 Oct 2023 12:09:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346434AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346422AbjJKMJR (ORCPT ); Wed, 11 Oct 2023 08:09:17 -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 76127C6 for ; Wed, 11 Oct 2023 05:09:13 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40684f53bfcso62658445e9.0 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=rCp6GABytuON6u05YeolkZXe1e5ckUeJZvsuwznj/E4LMBZ46SlXw79h8NVv4l3WfG 18inZuHC1+DnGQCEDqsQSCWI0wDfV0QZGv9IzdsHgs7Mq0br9QEFe//vE7zbfl5gbTqt tqzm24XWSSlUNuwd3TJt7oGhfvJUPqNFXCYaGQJCu5T8mQydnFHANVNxZgQ+KsN8xC9D 7396djuQMljYkoOWAmeijIy+9Ar14maMtGvgDNKA2WBnz2nSYGiMP3crnawLth7SKJqw Do3DxQtrkWG0E3HjqzinagoFGZ+fxausTUOOO5ipDxjMpvkhfFRElna3z6gTMAXpj6mt FWZA== X-Gm-Message-State: AOJu0YyZCJ438d8AVz2U2Cb6h7Mzo09Lohe1lWS4pXwVcpcI45NjpW4V 3DDxTE9A9BSt/ti35P53689FEw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- 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, unsigned offset) return error; } - error = pinctrl_gpio_request(chip->base + offset); + error = pinctrl_gpio_request_new(chip, offset); if (error) pm_runtime_put(p->dev); @@ -286,7 +286,7 @@ static void gpio_rcar_free(struct gpio_chip *chip, unsigned offset) { struct gpio_rcar_priv *p = gpiochip_get_data(chip); - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); /* * Set the GPIO as an input to ensure that the next GPIO request won't From patchwork Wed Oct 11 12:07:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732257 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 862F0CD6E60 for ; Wed, 11 Oct 2023 12:09:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346441AbjJKMJV (ORCPT ); Wed, 11 Oct 2023 08:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346367AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -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 5BF75C9 for ; Wed, 11 Oct 2023 05:09:14 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-405524e6768so65064825e9.2 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=LWBjWjHdSlW7xAUYpvRzBS+PW1hNNj6R6rcuXzGmQEvl+NnmvzC9iscdvzBsnPz9Pb bwDzzi+OeolthlQaYff3C6B8Pqi+CBWAS7YJHnEeCBYUiU4MqLe5oATkVDV98J95uLk+ PZ20d0Gbi4Mi51umjLPAemoj+CiPtLYITSShrpUMGItHSIbpFq8M7EMd1wye6Z2o3Bo4 IRjLygoGpdX+yGkygWH7lVX5CHfU+8P3g95YCcYv4p8EqOWaB5HPMALXRRaGF8367JWi NOFe0HzM8K5XfuXo1Nxd9/KGrkEtpHyvtDFFI3YurVJ3PMkyUh2AYRqjAsrRk81Ix81g bezw== X-Gm-Message-State: AOJu0YzqGQElYpBSLfpIKJl47K/OCuzaREJPd8XN48DicJPAL9vXS+nm m6pWJU9oWsGxGg/hg3lkCqaMD6VqYqcU8C0GzOo= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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) 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); } static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset) { struct tegra_gpio_info *tgi = gpiochip_get_data(chip); - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); tegra_gpio_disable(tgi, offset); } @@ -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); - ret = pinctrl_gpio_direction_input(chip->base + offset); + ret = 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); - ret = pinctrl_gpio_direction_output(chip->base + offset); + ret = pinctrl_gpio_direction_output_new(chip, offset); if (ret < 0) dev_err(tgi->dev, "Failed to set pinctrl output direction of GPIO %d: %d", From patchwork Wed Oct 11 12:07:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732258 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 4F9B2CD6E61 for ; Wed, 11 Oct 2023 12:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346355AbjJKMJU (ORCPT ); Wed, 11 Oct 2023 08:09:20 -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 S1346360AbjJKMJS (ORCPT ); Wed, 11 Oct 2023 08:09:18 -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 D98B0CF for ; Wed, 11 Oct 2023 05:09:15 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-405361bb9f7so63084235e9.2 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=rlu2ANbdjgYoannHcOxhDxzQwsYyGntN7Bbu4iFHgWfIf4UuBvLQTYg0FEYswKJ4ow dmiF3UW/n0WXq9WmTNIrEQS1ZGKCc4nQPRNBGF4m5c5P+oZQwbUSs+QTPKMxV8c1z5w0 gx+xze/VCs+G7ME/Imn37O730YScqH8Xz62uqDNS5v6kDtpMk/3dztI84wF9D2fovFj3 T8SqUB2Yemw8pS6c+mru7Fy0yaOCU+AdC3oV72ixumgWcy9Mch4tZgAVeKHJV2EQe9Lh Z00WM3cPhACaPqwWxtNg1gZCa6bth4iCGIxlghm8AzDqfQsFaYKp9y2oG2EOnHtYiJ85 EQbQ== X-Gm-Message-State: AOJu0YxC37HBJ9KIqc+h/VGPsSuweGrJH2EqIovvCDL9d8tWKTf6MYsv dZQXKHVkHqviMRv/+Iky2nkm/LfTkNN5ItVDeLg= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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, unsigned offset) 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); } static void em_gio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); /* Set the GPIO as an input to ensure that the next GPIO request won't * drive the GPIO pin as an output. From patchwork Wed Oct 11 12:07:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732983 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 708A8CD6E60 for ; Wed, 11 Oct 2023 12:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346709AbjJKMJY (ORCPT ); Wed, 11 Oct 2023 08:09:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346516AbjJKMJS (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 58873DA for ; Wed, 11 Oct 2023 05:09:16 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c3ca6ff5a7so57280791fa.1 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=tYnRQiry0hZVStsTci4Hnj+5AQAJ4Z/tsScg2WgFiwPR+ohCiK/uDET4Wl8r9DacLp ml6SSxonxQBtVmrGVGp/CKF4W7nANNxEmQ7AAtNiiTHBIsBWnw9KIwuRfOuwjVHfAJ7t gy3SfhKCV1B+Hky6qdGkY1SF4tHYpnsM/ZAJoHYi92ynK5XZRH1EmH+5jV5lvZ8guStW N2c5hI9Vt2NmS3tAurWPyCk1/XfcPJL4rfQDP72+VUFIRVeN+xirJ/3gSiIkU3GC+5l9 I7Wm1ARYOoYWveSQcIj3UT0dddSO5XNyCvJPWEeZ64DyutEg1TVtasqij+Na20KUtIaV ffYg== X-Gm-Message-State: AOJu0YwH6S6IIQ8m3DgLbeTQd6tLwC1Q9qnOJ97kUzKg63I+kea5vODd 11XiNEO7Df8QOEF+AFZ6HTnIKtdKbobKsotSzXk= 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_Kleine-K=C3=B6n?= =?utf-8?q?ig?= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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önig --- 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; - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); } 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 *chip, unsigned int offset, else if (param == PIN_CONFIG_BIAS_DISABLE || param == PIN_CONFIG_BIAS_PULL_DOWN || param == 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 == PIN_CONFIG_DRIVE_OPEN_DRAIN || param == PIN_CONFIG_DRIVE_OPEN_SOURCE) /* Return -ENOTSUPP to trigger emulation, as per datasheet */ From patchwork Wed Oct 11 12:07:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732256 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 E20CACD6E62 for ; Wed, 11 Oct 2023 12:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346618AbjJKMJX (ORCPT ); Wed, 11 Oct 2023 08:09:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346459AbjJKMJT (ORCPT ); Wed, 11 Oct 2023 08:09:19 -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 2DD51DD for ; Wed, 11 Oct 2023 05:09:17 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-406618d080eso64748125e9.2 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=wLN/CPVyDnOxmyw/OVaswBOGmojYPANcokzpH4Cn56zwbdrB/h39k/kkFeVSwoE+Jd plMPTXBTi3cmbBUYGAVLhAdejCUR2BKDphp8fJnOr+4hPPvY7D8HTW/ifb13TNqYtRcP A2zUPzBCTJ3vzEGUluUbZzDZqnbeDn0iWtQlaxgjJMrrmzqXZhNMWD56K9+jep9B4ziD 8pX2BSlKxZkQwIzED3Oz6Rn97Nhn/6ijA+jrU9MBw17Gzd6WXklwM8HRNibmEj2uqnlY rHDLkWzWgE6LWZcifGTHk5fqPwE/8lE0OeYC/nCY500hyk1IZix7w7ryq1+1POSaf1FD AlZQ== X-Gm-Message-State: AOJu0Yz/2NYQZyjQpW63nCUhCp8yL+SRGDToRTRmoXIW1Nhm8ma49wyX FRVG4AERt7YYSJ0lZgq3JQwqnCTo9SbKDto26R8= 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_Kleine-?= =?utf-8?q?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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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önig --- 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 = pinctrl_gpio_direction_input(chip->base + pin); + ret = pinctrl_gpio_direction_input_new(chip, pin); if (ret) return ret; @@ -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 = pinctrl_gpio_direction_output(chip->base + pin); + ret = pinctrl_gpio_direction_output_new(chip, pin); if (ret) return ret; From patchwork Wed Oct 11 12:07:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732984 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 4210BCD6E5D for ; Wed, 11 Oct 2023 12:09:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346727AbjJKMJW (ORCPT ); Wed, 11 Oct 2023 08:09:22 -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 S1346709AbjJKMJU (ORCPT ); Wed, 11 Oct 2023 08:09:20 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D802FA7 for ; Wed, 11 Oct 2023 05:09:17 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4054f790190so66592385e9.2 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=GrT+C5Ne8czQv/Q3y1sb9hmZgc5izlOc/RtVv2z0a6oJUaHpeGfOmXmp+DusVr8dcD 0jEHAle5IqZTI7OsxSCgaZSuQ/YxVb9P0a1yab5gG5nXEi+2CKA0EIrgw0093vE3U2cg 9jlCCcjsLyPUpeQjdt8H/PgEtJU0uCNmlVT1Aq+S4cL4tJaxabb9j48dZNX1PWhFS/jx bboQr+sdqNDvlvMzO+DdE8MklQKqayyuuNbcQiKugB9UuDEANrpRakbKC7CM9AMEzG2U MeJezqNoXQn7wdTwdRH94dClUBayw0PiiV/4VKFpjFC5VomjrAUKXTBeEVt1NkqZ0/Rm GElg== X-Gm-Message-State: AOJu0Yw9XW/fFzLTKxcpTe2HloJU5FN9TfwRfZLIf/VLeBScYO4Z3MNJ MWS5E7CnB+0f5GNyXt4OvgXMTg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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 *chip, unsigned offset) int ret; if (pxa_gpio_has_pinctrl()) { - ret = pinctrl_gpio_direction_input(chip->base + offset); + ret = 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)); if (pxa_gpio_has_pinctrl()) { - ret = pinctrl_gpio_direction_output(chip->base + offset); + ret = pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; } From patchwork Wed Oct 11 12:07:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732255 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 5E8DBCD6E60 for ; Wed, 11 Oct 2023 12:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346765AbjJKMJb (ORCPT ); Wed, 11 Oct 2023 08:09:31 -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 S1346728AbjJKMJW (ORCPT ); Wed, 11 Oct 2023 08:09:22 -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 3476FE6 for ; Wed, 11 Oct 2023 05:09:18 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4064867903cso68963615e9.2 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=YpqQ9wnkVppy5sy+2BYjQvkRhu8XNbPYeWZnGtobYuluBeIgOunjhv6RJaDSDoB5mx wIZuBJkvZbPPfAuqpOIELDZayMVf2+qjj5tiywrsHSFMYdYnxBO0RjIpQTzmnVm+oroe p3dVupR+9Tsx1PORZlqAtol5KIkTq/b/L7K3LWQuO13pb0FXOiiEVSNPNifLiCnsko7V 3Rg07wOjjKoAFJIX+GxJRLFOfdKJ0VZ3odg7s1DNJO5pegUAEVEQBPsNy7MbSpV38cG4 ag2dTIo1CkdbHJ0uuxkNhTAQ+mnCL9UQoQMLxX/tXgnwm5ocEcTat1kDOkfe3FqgQCWj AWQw== X-Gm-Message-State: AOJu0Yya7X0YLRcwlC5+yRZRCZolvkCrEu0NaJo2GVVKBGit6xJesYPk n9eYNN6aK0uuBc8fP6VHnahvCNk75m3czGQNwCo= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: Heiko Stuebner --- 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, 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); raw_spin_lock_irqsave(&bank->slock, flags); rockchip_gpio_writel_bit(bank, offset, data, bank->gpio_regs->port_ddr); From patchwork Wed Oct 11 12:07:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732254 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 9C12ACD6E61 for ; Wed, 11 Oct 2023 12:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346734AbjJKMJc (ORCPT ); Wed, 11 Oct 2023 08:09:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346226AbjJKMJX (ORCPT ); Wed, 11 Oct 2023 08:09:23 -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 5A994AF for ; Wed, 11 Oct 2023 05:09:19 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-406618d0991so62397615e9.2 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=AobAq1ytBuETwFzJ9StsE/df+lVJ3Xde7RoggWI9RCcOoXxEYCfJqjrxqP0jksWhS1 a1zfW/irOjBRi2VLxEl/AfwuTaZtpMejwoCL3QewcUscoI6UUJ6zF9lQQVn2yAR/yaJv et9w6ZF3IMoPE/sEigMlMgHAujd545xC1TGl4MeD6Ua0N/nG/H8Xak739nX0B7AJbKz0 +s+rcV7cHTTqhK5gJA5UzRBFptv0Nh7GW6RLsECwbGW5XkdEW6M2MrtX1vr0ZQP4srY5 cGTKCCgvHGm17izrQFw7p+JYKWdYh6Z3UjTbCJQ39ZTuWBv8q/14f4sa+9slZRmVI92Z 2NIw== X-Gm-Message-State: AOJu0YwQLnKat/qRD+NHy9w1w2xazsusThapwNcFbVRFbTqp/cJTCxo2 +/lE/wjC76scfuPOPwRJMK7p3g== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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); } - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, @@ -148,7 +148,7 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, vf610_gpio_set(chip, gpio, value); - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } static void vf610_gpio_irq_handler(struct irq_desc *desc) From patchwork Wed Oct 11 12:07:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732982 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 5CC51CD6E63 for ; Wed, 11 Oct 2023 12:09:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346774AbjJKMJd (ORCPT ); Wed, 11 Oct 2023 08:09:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346616AbjJKMJY (ORCPT ); Wed, 11 Oct 2023 08:09:24 -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 9E83FA7 for ; Wed, 11 Oct 2023 05:09:20 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4065dea9a33so64900655e9.3 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=rFspRQ5bhVrcHSM00Wuo3i4JdTBtz5ZsKrSD9vRIT+w7K/brId2UTOFkl85WbvzZoe 51sRLwQzhQQs/v8XviDXFYcGdb+PDg+N5l74ptjJV7O+/AZqLMSUCg2Wu8Flvxo6ugTO k5Gkm+5oXDRXkhOo9PbI5KuwVgjOHEGZEO/gdV/ScQHvMzwck30nye1SG/1wEtWOPUgE H5y/5HC/9BV3owd3usJ2iy0+FsLfyXdBYYyCKf5S84jgDBfmBBl8XmkYv7LUJeRRFLO5 WbKWwedp4IKmo1gLSVNYAT0Mt4BH4F7YDQMqtnY/bRtu3NhpCBiTgMeYzT2evXoRMCWR c+jQ== X-Gm-Message-State: AOJu0YxW45GhyvMZT2sgvnJIc7GLgYS4f3oUfyz4j2pX619qcCUGrwrH B7qSKl7cUkOjAkLzV6aVT+bVPw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 8 ++++---- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c index 8bdd0124e2eb..62134a7f0b4e 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -171,7 +171,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset) struct npcm7xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_input(offset + chip->base); + ret = pinctrl_gpio_direction_input_new(chip, offset); if (ret) return ret; @@ -188,7 +188,7 @@ static int npcmgpio_direction_output(struct gpio_chip *chip, dev_dbg(chip->parent, "gpio_direction_output: offset%d = %x\n", offset, value); - ret = pinctrl_gpio_direction_output(offset + chip->base); + ret = pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; @@ -201,7 +201,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) int ret; dev_dbg(chip->parent, "gpio_request: offset%d\n", offset); - ret = pinctrl_gpio_request(offset + chip->base); + ret = pinctrl_gpio_request_new(chip, offset); if (ret) return ret; @@ -211,7 +211,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) { dev_dbg(chip->parent, "gpio_free: offset%d\n", offset); - pinctrl_gpio_free(offset + chip->base); + pinctrl_gpio_free_new(chip, offset); } static void npcmgpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c index da21f6a45888..0b6d6964087e 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -173,7 +173,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset) struct npcm8xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_input(offset + chip->base); + ret = pinctrl_gpio_direction_input_new(chip, offset); if (ret) return ret; @@ -186,7 +186,7 @@ static int npcmgpio_direction_output(struct gpio_chip *chip, struct npcm8xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_output(offset + chip->base); + ret = pinctrl_gpio_direction_output_new(chip, offset); if (ret) return ret; @@ -198,7 +198,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) struct npcm8xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_request(offset + chip->base); + ret = pinctrl_gpio_request_new(chip, offset); if (ret) return ret; @@ -207,7 +207,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset) static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free(offset + chip->base); + pinctrl_gpio_free_new(chip, offset); } static void npcmgpio_irq_handler(struct irq_desc *desc) From patchwork Wed Oct 11 12:07:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732981 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 3C237CD6E60 for ; Wed, 11 Oct 2023 12:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346745AbjJKMJf (ORCPT ); Wed, 11 Oct 2023 08:09:35 -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 S1346743AbjJKMJ1 (ORCPT ); Wed, 11 Oct 2023 08:09:27 -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 D3D75C9 for ; Wed, 11 Oct 2023 05:09:21 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4056ce55e7eso63198195e9.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=rduh9pM+B83vdmWWpKKctbmKZxxq8F6No2jJaJldwNPzenQjjj6M8dQBYlUsFPVskt gBXWcBNawqzEI2417LmkSQlxdStH94d+YZ31L4WSM/NtetPWP8i1s1Q7PgH3gmEBvalR Is8CvPvUx4PUskCSfDioQfUxk319s6oMGW+6EumW5Y1s0CvraBaacz/9MySNtdnSno8N QilvwHC9yDcjLA1aO/QRFnevmVJS4B6CD+9YOPVQHAuJemwjTukO8NAs6q4Mw+fhsE7X V0MEw5vtRMWCvAMpUFuocRQmxEVRn3TAsep1rSRm6jN7hoCwXojbMQZAo7N1rU6h5t/S uYvw== X-Gm-Message-State: AOJu0YzHV9TThHXURorOQbDkOxC82/oPxHHNdZnSa2hjxdqEwMs8AaTj sf49AADnqnGUeSBruQrqdrcSFQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- 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, unsigned offset) if (idx < 0 || pfc->info->pins[idx].enum_id == 0) return -EINVAL; - return pinctrl_gpio_request(gc->base + offset); + return pinctrl_gpio_request_new(gc, offset); } 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); } 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, 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); } 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); - return pinctrl_gpio_direction_output(gc->base + offset); + return pinctrl_gpio_direction_output_new(gc, offset); } static int gpio_pin_get(struct gpio_chip *gc, unsigned offset) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/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; - ret = pinctrl_gpio_request(chip->base + offset); + ret = pinctrl_gpio_request_new(chip, offset); if (ret) return ret; @@ -1181,7 +1181,7 @@ static void rzg2l_gpio_free(struct gpio_chip *chip, unsigned int offset) { unsigned int virq; - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); virq = irq_find_mapping(chip->irq.domain, offset); if (virq) diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/renesas/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, unsigned int offset) u8 bit = RZV2M_PIN_ID_TO_PIN(offset); int ret; - ret = pinctrl_gpio_request(chip->base + offset); + ret = pinctrl_gpio_request_new(chip, offset); if (ret) return ret; @@ -832,7 +832,7 @@ static int rzv2m_gpio_get(struct gpio_chip *chip, unsigned int offset) static void rzv2m_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); /* * Set the GPIO as an input to ensure that the next GPIO request won't From patchwork Wed Oct 11 12:07:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732253 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 A6374CD6E5D for ; Wed, 11 Oct 2023 12:09:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346472AbjJKMJt (ORCPT ); Wed, 11 Oct 2023 08:09:49 -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 S1346726AbjJKMJa (ORCPT ); Wed, 11 Oct 2023 08:09:30 -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 5B92DD7 for ; Wed, 11 Oct 2023 05:09:23 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-406619b53caso63174215e9.1 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=LBqCuyXKq2fNsF9fB5maGJAL6NFgWqaHDZlwe4oSIbMRt0ZXJw4dlddR0ouvUD+VgU TyoCtLyqFAApMewxQi5TSvyn6QUrr8rLCk6LjHVf/hPZXzTKktGJRcKPWKTk38Ylwd6m bks0SRwYpBUWgLvaRoqrluapVpXGKPdmCaQ3rQs+rqXOiNnVRwgOJE8MtNL2ILkYx6NH Z7IFzJ3jYrCpnvJc9H5sTRYZIJIfgPo5ziV69iHhq0ge5RSrLbwhsGwiNm8LajGS1q/d PczTfRGOpXSIv5Hsb1F/F1ZWRoKONEs7jVKYEVcWeluWC5V1VnVnD3+ayEfrtUP77xzP y3ww== X-Gm-Message-State: AOJu0YyDDtd7+h8tPLwYoQHnVlVrZIp1iB4MwQbstjYwxxbCX6HC+McV MM5LZlIqh+LyVqygm+HfmZxruw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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 = { static int iproc_gpio_request(struct gpio_chip *gc, unsigned offset) { struct iproc_gpio *chip = gpiochip_get_data(gc); - unsigned gpio = gc->base + offset; /* not all Iproc GPIO pins can be muxed individually */ if (!chip->pinmux_is_supported) return 0; - return pinctrl_gpio_request(gpio); + return pinctrl_gpio_request_new(gc, offset); } static void iproc_gpio_free(struct gpio_chip *gc, unsigned offset) { struct iproc_gpio *chip = gpiochip_get_data(gc); - unsigned gpio = gc->base + offset; if (!chip->pinmux_is_supported) return; - pinctrl_gpio_free(gpio); + pinctrl_gpio_free_new(gc, offset); } static int iproc_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) From patchwork Wed Oct 11 12:07:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732979 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 4A04FCD6E62 for ; Wed, 11 Oct 2023 12:09:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346581AbjJKMJ4 (ORCPT ); Wed, 11 Oct 2023 08:09:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346768AbjJKMJc (ORCPT ); Wed, 11 Oct 2023 08:09:32 -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 15923101 for ; Wed, 11 Oct 2023 05:09:24 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-406650da82bso62486655e9.3 for ; Wed, 11 Oct 2023 05:09:24 -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=tAOkxJEze69loASy3FH2WyVQYzzo0Xzo6ROa7fxoghrJaYuK8Il3M115R9uMKUVXM/ qi9zlWmUrb5ZH5G8rjTNVytW6zy5/tK5iCgPJWTsTiOJNaBMx6Rqcr3h9rJd2CdiKKsQ YziBOaRA3ouAME71Ha7eh0wwlFeXXnirfs+AHRYjSc4svgEW9qa+yAOazTnKsZrpjL+2 iSzqATANW5+HPuAj2V5a1OmnJaycxgR4xww2z3sKBYAk2osWSc9WRfcXZseZ+UoSL8xW yFInVZ6iwNk2Hblmy4p8p3/fXuXbtO3WIQ/oUcfN4VNtT+4Q1CMh47vXSBl6YhwIr7Rt DH+A== X-Gm-Message-State: AOJu0YzmIltB0UvVnL0DbtobixvzwFGoLvSHPWzfPvwWfJvok9aujNyt s3gVZWllJ8cTpMAySUQQhd0YmA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- drivers/pinctrl/stm32/pinctrl-stm32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index a73385a431de..11d9f07934bd 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -217,12 +217,12 @@ static int stm32_gpio_request(struct gpio_chip *chip, unsigned offset) return -EINVAL; } - return pinctrl_gpio_request(chip->base + offset); + return pinctrl_gpio_request_new(chip, offset); } static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free(chip->base + offset); + pinctrl_gpio_free_new(chip, offset); } static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset) @@ -241,7 +241,7 @@ static void stm32_gpio_set(struct gpio_chip *chip, unsigned offset, int value) static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } static int stm32_gpio_direction_output(struct gpio_chip *chip, @@ -250,7 +250,7 @@ static int stm32_gpio_direction_output(struct gpio_chip *chip, struct stm32_gpio_bank *bank = gpiochip_get_data(chip); __stm32_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output(chip->base + offset); + pinctrl_gpio_direction_output_new(chip, offset); return 0; } From patchwork Wed Oct 11 12:07:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732252 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 8E28DCD6E61 for ; Wed, 11 Oct 2023 12:09:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346743AbjJKMJz (ORCPT ); Wed, 11 Oct 2023 08:09:55 -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 S1346581AbjJKMJf (ORCPT ); Wed, 11 Oct 2023 08:09:35 -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 E5D9B10B for ; Wed, 11 Oct 2023 05:09:25 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-405497850dbso62559605e9.0 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=xAM0vZ0Fqd8KyPrV5peZbY3jeJRBZEk5tPRpA+jXHxSweCBNxTg5Xl5HOZSl4tsFQT OIKfJnN538fPUEPRCVN8KpcdZu2iELzms81O4ufjonOATOm3Klmd75Em4Y3PDCIMNUHt iA5Ti+fVHZgzR5lkppBB8c4PutRxwRS1x3szA9QW46F3RqFHtCWngN8e5GIqbCQ/sl4d 6YUwhpgwlMTKFhKnLSlmfso0nopc55TKNviwAyMxiV85vO3wp9Ux6C/Tp88YuXaNyF1H 9rSVidzko44UCBWP4bVy1DZhdZEt4QN/S9VDOtUStpYa8At736vNXcaD9E8Jy1vL6Au4 aR3g== X-Gm-Message-State: AOJu0YwAqu146sx8tX6TbMfNWwKAh5qZqhpUP/kH9HY+3qWUT/JPKXQa 9In2Ed5dOhWj9NkTJurETX6zWw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: Viresh Kumar --- 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 = gpiochip_get_data(chip); - int gpio = chip->base + offset; unsigned long flags; int ret = 0; if (offset >= chip->ngpio) return -EINVAL; - ret = pinctrl_gpio_request(gpio); + ret = pinctrl_gpio_request_new(chip, offset); if (ret) return ret; @@ -249,14 +248,13 @@ static int plgpio_request(struct gpio_chip *chip, unsigned offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); err0: - pinctrl_gpio_free(gpio); + pinctrl_gpio_free_new(chip, offset); return ret; } static void plgpio_free(struct gpio_chip *chip, unsigned offset) { struct plgpio *plgpio = gpiochip_get_data(chip); - int gpio = chip->base + offset; unsigned long flags; if (offset >= chip->ngpio) @@ -280,7 +278,7 @@ static void plgpio_free(struct gpio_chip *chip, unsigned offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); - pinctrl_gpio_free(gpio); + pinctrl_gpio_free_new(chip, offset); } /* PLGPIO IRQ */ From patchwork Wed Oct 11 12:07:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732980 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 D1647CD6E5D for ; Wed, 11 Oct 2023 12:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346782AbjJKMJx (ORCPT ); Wed, 11 Oct 2023 08:09:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346781AbjJKMJg (ORCPT ); Wed, 11 Oct 2023 08:09:36 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71581115 for ; Wed, 11 Oct 2023 05:09:27 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4064867903cso68964765e9.2 for ; Wed, 11 Oct 2023 05:09:27 -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=VpGhb1LAZsVlWj2h2qg3V2RoSqiHULujNvB5OrAmPjyc1c97iF/cyJy9hmJvAUqK3s YK7vB78WeCiUJ3GCKX+H/TLM1FFkaolDvwr8yFj/jwQkQiboYw05axbQvvexQxtV1f1t OhB09lAcqwxbqGHeYZixd8puZksRoUVYu8/rTIOKudpC1ZzTEzOTNnJTB4rtYQXHG/6n qyDv2fl3EPMgYtoEGw61OS1QqvU5jN5Ge//0agtfKlYbK7cQ1xZBXqH37dLu3ph7L231 DY5c+NS3Ka2cRadbtzocZixdFs5Ln0lWeEmi8Q9pvNqBcBqW41EUImurAoZyJ9ncZCj0 6l/w== X-Gm-Message-State: AOJu0YyX4QZvASHBXXm3HIryvJjPXgrXaqnkmMYhbdp0k1px/2+jhAfr +GRX+7c15w+QDXL71dNBNhe6CQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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/pinctrl/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 = { 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); } static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free(gc->base + gpio); + pinctrl_gpio_free_new(gc, gpio); } 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/pinctrl/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 = { 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); } static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free(gc->base + gpio); + pinctrl_gpio_free_new(gc, gpio); } static int jh7110_gpio_get_direction(struct gpio_chip *gc, From patchwork Wed Oct 11 12:07:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732251 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 98702CD6E5D for ; Wed, 11 Oct 2023 12:10:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346820AbjJKMKP (ORCPT ); Wed, 11 Oct 2023 08:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346766AbjJKMJu (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 711EE130 for ; Wed, 11 Oct 2023 05:09:31 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40535597f01so63261365e9.3 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=Bu2KhfAPvUDEZvEY/shnC6hfudGbgkaJm/rNn/IK3vRUWStdkMJjbT0puiMzhkp3eZ dxDgFi4XjTinbqGJIMGSXZ3auhpyeWNhpve4kMv/QbrvGbttTQeWSWnfbFaeJx2aw8gA eQ3ee+7Mp2J777iqyuXC2X9y9K/I1RCMsnyTVTSZBZfmYZV/Hn1SCRTSrTHGbRYTIBXv ZbTWae8KfIkgVopqIm94gQQtqIV+ipOiII3AnlF3tIA0Ea3i+EbSEH69OjGTLxhaaIsv 7ts2OKPW8vt7BMATnP7NwQ1VGFlshwsIj0sVAnxQOhiJaz9BeGGgjjCEyNs+p/7+JjpB NYtg== X-Gm-Message-State: AOJu0Yz0xfm6TOYm5O+VNDpDpWhewJKNHCl579e2wIHblPG89iAFe8d3 kMtpDeJ9dK6F37IcMC93SuQT5g== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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-ocelot.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); } static int ocelot_gpio_direction_output(struct gpio_chip *chip, @@ -1795,7 +1795,7 @@ static int ocelot_gpio_direction_output(struct gpio_chip *chip, regmap_write(info->map, REG(OCELOT_GPIO_OUT_CLR, info, offset), pin); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static const struct gpio_chip ocelot_gpiolib_chip = { From patchwork Wed Oct 11 12:07:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732978 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 DFD45CD6E5D for ; Wed, 11 Oct 2023 12:10:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346889AbjJKMKV (ORCPT ); Wed, 11 Oct 2023 08:10:21 -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 S1346356AbjJKMJv (ORCPT ); Wed, 11 Oct 2023 08:09:51 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28AE6EA for ; Wed, 11 Oct 2023 05:09:35 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5068dab8c00so5694404e87.0 for ; Wed, 11 Oct 2023 05:09:34 -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=qrlW4JvioYH6DMb0NOi/vYjC0STzKjAlFOiTL0Cxn9RmmYSRicbsXYLh7CVm9iFL3O /ciBiuD9IqcWLbrnc1R2NfrChapYmuXhYvvxMKVWOHfag1id+SlTuxztKsntMN2tql4x FuCigj9Ge+qP1x3WZVb0qw8xFR/qJo8BAGLep9F2ptQ2Gy0CfOAXfL1PVSF7tbyNHQCI OceaHpzZUNWrKKpBwAxysRiOpvLbeFqnY9Z17h73YnIerkxAD7Fc2ZPeZZlbuVeTJC1h gp+ItRpan9Xu1MjnC5hnwcT0GzUAwapL4Ytyd/KfLJpcURqZnJHjv20IVQTD8A6vMUBE AXTw== X-Gm-Message-State: AOJu0YxLWLtiLUtDJ2C9EX/OeI4XvLWp6HHNjjg24a/gTtgs8pFEc1LX uLUgW8drLfooTy8z9bcPk33rk5wxOrk6FxdhqKU= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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-rk805.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); } 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); } static int rk805_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) From patchwork Wed Oct 11 12:07:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732250 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 DE238CD6E60 for ; Wed, 11 Oct 2023 12:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346780AbjJKMKa (ORCPT ); Wed, 11 Oct 2023 08:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346586AbjJKMJy (ORCPT ); Wed, 11 Oct 2023 08:09:54 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05281183 for ; Wed, 11 Oct 2023 05:09:35 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3248ac76acbso5945719f8f.1 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=CSfQA+vHujvCgijoh+ol1U80cF64TB80WFzBICqzSA6logA4FR8BIRNthqYxXTzgBW b29Hg+Y/1pax2eXoLqYRu8DgachOsfja8Bzh4dBH9/5hzPo9a8IyKh6NpoS4s1+Zm9RH Wq+BfKt7a0ScMVR0C3HBGPdbNtx+hLMAMNzizZWkKvKsIR4vZ5TD73QI5xI/5nIk24vb tUHGxVw5+jSDsMJgslAx+J8nxCVFlfPcO4ktXt7YFLescQF7jCSV3ZsXwfi5Dqm3DZIV B/AQlPOJ6dasL5e2+9+7u26pjtditA3XnofpWbEH0znMjwWnQmastE/BmyVWDnhL5m4Q MWtw== X-Gm-Message-State: AOJu0Yza9uY/uTxDbcafTq6RtlvDEggi71rki+2vC0lrDcMXkQtrv8F+ 5P81Y2yFZOdnrqUKJmUVuqo60w== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: Charles Keepax --- 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/cirrus/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, unsigned int offset, int va 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); } 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); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static int cs42l43_gpio_add_pin_ranges(struct gpio_chip *chip) diff --git a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c b/drivers/pinctrl/cirrus/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_chip *chip, { lochnagar_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static int lochnagar_fill_func_groups(struct lochnagar_pin_priv *priv) From patchwork Wed Oct 11 12:07:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732977 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 BB6BACD6E5D for ; Wed, 11 Oct 2023 12:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346812AbjJKMKl (ORCPT ); Wed, 11 Oct 2023 08:10:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346864AbjJKMKF (ORCPT ); Wed, 11 Oct 2023 08:10:05 -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 60B3C1A4 for ; Wed, 11 Oct 2023 05:09:38 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-405361bb9f7so63086305e9.2 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=LwvUbhJYya6meg0GioYKjcreosMKS4O9Q8P7ZYuH5sW5N5D0GctRhQsDQG30Ok0srr sp3dsEk/05DLNmeke5O+jouVlvPqy9BMZ2PrZKYLh3yqTKyazi0sUMcvEl1aeqguQkEU Hie/XDQiJviNI3m6f4apCbzSfZNESgauXPoR9/TtP3pLvKqnwA9iUhreIiSf16VXX85X Fpc7sAFJ6f5bC6BoZmNhCxHAHKrSrjPJpRPkcHfttctHKmMzy9eoaCkwzOeGdeJAsCG9 tI94Mj0YZvGiZhVMwiuR1LydCZZlp61XW1yqpCkM3I5t7WfEqQzCmQ1OeWBF1cv7uYrh aijA== X-Gm-Message-State: AOJu0Yy/gnnl/m63nqQqLdbBu9wqYIIHmEXtVB/ZRwp9VzUpnZOq4J7p ryJ7BzTpbed44wi1UweIjufE6w== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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/mediatek/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, unsigned int gpio, int value) static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio) { - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } 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); - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } 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/pinctrl/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 = { 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); } 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); } static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/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 *chip, unsigned int gpio) if (gpio >= hw->soc->npins) return -EINVAL; - return pinctrl_gpio_direction_input(chip->base + gpio); + return pinctrl_gpio_direction_input_new(chip, gpio); } 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, mtk_gpio_set(chip, gpio, value); - return pinctrl_gpio_direction_output(chip->base + gpio); + return pinctrl_gpio_direction_output_new(chip, gpio); } static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) From patchwork Wed Oct 11 12:07:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732249 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 72B98CD6E5D for ; Wed, 11 Oct 2023 12:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232075AbjJKMKs (ORCPT ); Wed, 11 Oct 2023 08:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234922AbjJKMKF (ORCPT ); Wed, 11 Oct 2023 08:10:05 -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 8C3F11AE for ; Wed, 11 Oct 2023 05:09:40 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-405361bb9f7so63086405e9.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=TqNYrk8kI/WHi8O97uwhXBgH+JJ3gmeVU4QXpNB3wqrGeI1rOxPSdAn/1xC2ju/nlv c14eP306bzdBidMZX/Y3mUO3vYaNm50daof+RB1GklEIwHlP9WI/0VcQvfpOY+RX6Iaf 5wCYrZt2wVHyBmEGDwynZ4sb+mAyNVZl5qYJQu2cro1Sou+NgeGYjFaWdAtJnpmuuqRK L5sPtweUy2QDyA/GNs+ZhBGvLHzRpvS3CqruNeKNohIZHFIeM1eRNurn6Kbb/B/071eJ QbSsuzERLUaW0bfkcYfLL68qSR2erAi2441OBwUSBAGxiAfAhzymu6lJ8YY2XOaonucC sv5A== X-Gm-Message-State: AOJu0YwEcwqEX8CT74V9gCNdN7fiAkH54I7LShMmzPsQydSllidxDqQr Q4yVTFVgdML17LP7H1dWCl85lg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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-axp209.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) 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); } static int axp20x_gpio_get(struct gpio_chip *chip, unsigned int offset) From patchwork Wed Oct 11 12:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732247 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 12383CD6E5D for ; Wed, 11 Oct 2023 12:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346422AbjJKMLG (ORCPT ); Wed, 11 Oct 2023 08:11:06 -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 S1346728AbjJKMKN (ORCPT ); Wed, 11 Oct 2023 08:10:13 -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 3015AD41 for ; Wed, 11 Oct 2023 05:09:41 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40651a726acso62579315e9.1 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=AI9+vr3QSb2H6+ipCtZqk+yDWcC3TxoVweHdIU0eE8zuEbmMEDkPUb0lEBOCfeeqgm WqGndUwdfOtmyVOHkZvI1NfJUggk6rOUPvrDkiXOANIBxELLlEv+2ffMH4IYUfh0+SCi GGkHeTozvpRYo77g5fEPxpdVI/Oifc7wNnoqOzyAqCV9Z4puyQaPGUvaZGmLK3UF4Cec hoef756RpirLVhlCFjKFRwb1mHVdzOnhE0KgT2L7tjWLuf3ATo59cHP6V5lzJ/SXMhrT EpHsw0aAQf8+0qgrDP/oRRPiIjY62YCI8nDyudgEFxQKODOL7YeeoUmy8Il2U6T6jb4r 3QXw== X-Gm-Message-State: AOJu0YxD0kdXSrmD7MXloUGDlbh4uUc4pj7iI7vUPMJmJ5uB7/wGJoPh 5bmtWoKJpsnbWL5WCPoP7fc+zg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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, static int wmt_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } static int wmt_gpio_direction_output(struct gpio_chip *chip, unsigned offset, 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); } static const struct gpio_chip wmt_gpio_chip = { From patchwork Wed Oct 11 12:07:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732976 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 B866CCD6E61 for ; Wed, 11 Oct 2023 12:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346951AbjJKMK7 (ORCPT ); Wed, 11 Oct 2023 08:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346816AbjJKMKN (ORCPT ); Wed, 11 Oct 2023 08:10:13 -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 AEBDED44 for ; Wed, 11 Oct 2023 05:09:42 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-406650da82bso62487865e9.3 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=ZJYYtMyTNNmwqZfj1ecRkBP26dV157QvMTKHFMPtaD1fCyCZLEfhP51FVPq0q4e9tF rwk+5vbAFjAvTCDwOqy/Yer5x+JqQuneYkn3WInespytT7/mHwZMxC1oTd880jU0F8XC Yxk/0w3RPLp36v5RKK7DcqeO/+ou1klVQDGBYpy1YqyIGoFtR4MGKbQzsAeXY6a8nF6C p+Xq5l2xTuIKMmGSdwxxTVrNNPlYaFU6udxz5eF/CwIDe2rMqUZqMMMHZ3oOGltOR8or uL6dU12plYOfnjmbiT7HAaEUWU4M73CbxwWY765nBUtNOLc3IIl/JUoeXX9mj2P2NyDx N/Ug== X-Gm-Message-State: AOJu0Yx9kPq/ORciWdZWBQ6xS00p3UzA1UXEsV1sn7ouVH3QlUs7QBei /o13N5uVB+foUyHXrLL+V+HoPw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: 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-cy8c95x0.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_pinctrl *chip, int reg, static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off) { - return pinctrl_gpio_direction_input(gc->base + off); + return pinctrl_gpio_direction_input_new(gc, off); } static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, @@ -571,7 +571,7 @@ static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, if (ret) return ret; - return pinctrl_gpio_direction_output(gc->base + off); + return pinctrl_gpio_direction_output_new(gc, off); } static int cy8c95x0_gpio_get_value(struct gpio_chip *gc, unsigned int off) From patchwork Wed Oct 11 12:07:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732975 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 2D00CCD6E60 for ; Wed, 11 Oct 2023 12:11:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346821AbjJKMLF (ORCPT ); Wed, 11 Oct 2023 08:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346707AbjJKMKP (ORCPT ); Wed, 11 Oct 2023 08:10:15 -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 4C648D4E for ; Wed, 11 Oct 2023 05:09:42 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40651a726acso62579545e9.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=brLQnoaX73j0VLXd4irABNNBW3LGNiHoFITWAzPdreFPDg1Fb1+vgEuMqCzE5A3264 K5jo/csOn51vlI0udIPb9PDfeocNs/sNDopWEpakWtcyXv6JPHjk518yPdvT53cabYNw DO9+tBDf2s8nSLM9ow6M6xXUqn+8pFA1iz1woP322KYqY4GXNHmFztwBAvnoD/yMSXGm WtlGU8s2bR3T8ikX1ISHG383eB3yKrBtWaF4ERAg+0+KPhYsZ+njJVdGt5DWDHfOfGFU YJNMgp44Z/kDwZh6udJCtRoqCWfiLmijqXD8vNcqfZKH47qSmlFaiFbWabhEe4h28m5V NvFQ== X-Gm-Message-State: AOJu0YwGo7WUh4m7BMkD2Pe7jB6RwnltdsKlS51cBi5wkEivO6mslozQ Y+QuBtUJhubT4kj9MNNwGUdwiA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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-as3722.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, unsigned offset, static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input(chip->base + offset); + return pinctrl_gpio_direction_input_new(chip, offset); } static int 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); } static int as3722_gpio_to_irq(struct gpio_chip *chip, unsigned offset) From patchwork Wed Oct 11 12:07:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732248 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 3B201CD6E5D for ; Wed, 11 Oct 2023 12:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346888AbjJKMLD (ORCPT ); Wed, 11 Oct 2023 08:11:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346897AbjJKMKY (ORCPT ); Wed, 11 Oct 2023 08:10:24 -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 136D2D68 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40537481094so63316915e9.0 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=Yi/pxr6Fe1vw160I9yYB6zK6R/a3XOLN15EgtSnafpvJ8JxmGKd+SpG+lm7hFN1wai /ruSEBWWZoiEiEu4pudlwDHlWTWEenbloG0y4xq7SlEYGnMAvTy3Uo5FQh/RLga4xGxx wysICkxwEIEXfIk5H2SHl8CDoZrfsEnPF0w1NCXL6hEZsUJzUrAXzOUZv5IGq6tzsLag POXnmKotremqF/83XtnoDuMQLjx18Db224U/ZiWrJiWEkvza5W9yLusl4HmvsEGLl2Q0 +EcnEmUSGrnpWGepF7Q3xEIieOt1v21xr4oknU25+rgudKpGnK2Lup+CgOQJaEDweG9x TdDg== X-Gm-Message-State: AOJu0YxCluoLAGzHnhfonMVMrqHBBqkMm9Mw2pwSHSylGXkBRAY7/p9e bn0M24sh+vGOrBw+ZCO+m7XZWzXnzH1T6yfxL5A= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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 --- 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-ingenic.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; const struct ingenic_chip_info *info; + + struct gpio_chip *gc; }; struct ingenic_gpio_chip { @@ -3561,14 +3563,14 @@ static int ingenic_gpio_get(struct gpio_chip *gc, unsigned 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); } 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); } static inline void ingenic_config_pin(struct ingenic_pinctrl *jzpc, @@ -4052,7 +4054,8 @@ static int ingenic_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, break; case PIN_CONFIG_OUTPUT: - ret = pinctrl_gpio_direction_output(pin); + ret = pinctrl_gpio_direction_output_new(jzpc->gc, + pin - jzpc->gc->base); if (ret) return ret; @@ -4172,6 +4175,8 @@ static int __init ingenic_gpio_probe(struct ingenic_pinctrl *jzpc, if (!jzgc) return -ENOMEM; + jzpc->gc = &jzgc->gc; + jzgc->jzpc = jzpc; jzgc->reg_base = bank * jzpc->info->reg_offset; From patchwork Wed Oct 11 12:07:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732974 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 185CACD6E60 for ; Wed, 11 Oct 2023 12:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346905AbjJKMLR (ORCPT ); Wed, 11 Oct 2023 08:11:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346387AbjJKMK1 (ORCPT ); Wed, 11 Oct 2023 08:10:27 -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 EA12DD66 for ; Wed, 11 Oct 2023 05:09:45 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40675f06f1fso5249595e9.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=9sX7KISk194rgY041xTg7tvrdqgP+qimN3AJxbjYr+Y=; b=kiY+s1Q9xQSIiaAilZYcIrynguQgrP4taXSJqCzyrMm4H8SjpRErEdkt6PAa29wG4d T/Oia4IJj3aO1irVkG32ONaUKk8O/TeqwfQw9mY6s/a6mDbhxsjmbdHx5joWfTT4n0FL H6Sq/NP477mANb2rTqLO9lro0Oo5oUvljUJLpfxKUVHm8Zy0UoHe0d6SpLro7Os8Lpb1 Cbe2BA9VSvHOzdkHwPZklcXc3OnAZMPzTROf0a5NDj7CYENFitBhCLzW1Uof9WPoxs0I V31LBXpiXlshvOTeafYDUAvwO2NpukRGoifyifW1XNiD2eARPk+2iMok4jbqK0KqUzLU jkuA== 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=9sX7KISk194rgY041xTg7tvrdqgP+qimN3AJxbjYr+Y=; b=N2Ued9/H8AChlrgdurGLZkVmRIUh7jbS5ucxCNxNpc8KPND8DAscMoVw5QoGsrCw9B 8SQsttJjp3Hs9gP9qFECVfDhLg5quA+qSgHycW/XaCA2NhOmaNTSr//n5KRzLQZO0RE5 2C8MTgr/8NceED2R81LSkybd/h+HbQjsSsNx9XXPJMPBlb1XB5me/cEGNfVOGgGSIves 0JoLff7EFh5jRCzRlk+nJ5meUcJ/gmUvWpnq41VuqqZoQkbl++h4lT1C15pugq70ERjR VvtSxPHDiIVoOjOgjNIjsV7tuRNCoYzuN5jWPRb6y4mmJDeQmJqoHxyZvBLHtXjzphHT /yDQ== X-Gm-Message-State: AOJu0YwY1Bxeup8AewhQJpiLKeXrinuR6bpu0I+jbVymcYSKWdpm8rsV y7VuuWfq0i1OmZ1UWB918yCdTg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: Andy Shevchenko Acked-by: Mika Westerberg --- 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/intel/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) static int chv_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); } 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); } static const struct gpio_chip chv_gpio_chip = { 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) 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); } static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned int 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); } static const struct gpio_chip intel_gpio_chip = { diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/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, unsigned int offset, int value) static int lp_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); } static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, @@ -549,7 +549,7 @@ static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, { lp_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output(chip->base + offset); + return pinctrl_gpio_direction_output_new(chip, offset); } static int lp_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) From patchwork Wed Oct 11 12:07:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732246 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 D2E7FCD6E60 for ; Wed, 11 Oct 2023 12:11:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346789AbjJKML1 (ORCPT ); Wed, 11 Oct 2023 08:11:27 -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 S1346913AbjJKMK3 (ORCPT ); Wed, 11 Oct 2023 08:10:29 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01208A4 for ; Wed, 11 Oct 2023 05:09:47 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5044dd5b561so8236316e87.1 for ; Wed, 11 Oct 2023 05:09:47 -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=Gtqzh1IMFYjND91xvXFNKk03s0G/p5pdcDDtACHjJtLcZdzFdfj3iaWNq5rGahLkrU 3pFofJYhmVCUpq+kdnzWPsiqfItcTECh56YHAuvl+hMV0xPJSvEkDrE/NzcwVpKzClMT uJZqXE+X08vyDg952PCEfPNcpAPeu4bp2QzX/K0moxnSVj7ZQgU95OrHzEgKOZ97r9ed mWKxUnTIVwmxe6qlqJdPXQJ31t00fKDPHs12VVuQNhL/E5mSylb5JpB7DQ+I5RmaCvQP o+I9uEiVov+JNgIPxN9YHoQkv/aza2qrDnz3U47/oW+8CKAmAhA8lIjuDXC9k6w9Vun9 OZGw== X-Gm-Message-State: AOJu0YwhDA6b7KwOrqkMY5bkq3OtcymhHT0isFlJk0aTsXFyfelqej6+ WLs+OiL2YsA3iasd4LyFUnaZOA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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: Patrice Chotard --- 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, unsigned offset, int value) 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); return 0; } @@ -730,7 +730,7 @@ static int st_gpio_direction_output(struct gpio_chip *chip, struct st_gpio_bank *bank = gpiochip_get_data(chip); __st_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output(chip->base + offset); + pinctrl_gpio_direction_output_new(chip, offset); return 0; } From patchwork Wed Oct 11 12:07:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732973 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 D1D21CD6E62 for ; Wed, 11 Oct 2023 12:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346795AbjJKML2 (ORCPT ); Wed, 11 Oct 2023 08:11:28 -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 S1346262AbjJKMKi (ORCPT ); Wed, 11 Oct 2023 08:10:38 -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 CE659F7 for ; Wed, 11 Oct 2023 05:09:48 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4065dea9a33so64903205e9.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=IN3L42FxRS1gntTXQXfNqqu97K+XkRbS19F/rZsFQklXzk6NgV2Z6tfxjsRmMOJNqz Mw6jlyp44uJ9JobwN4Kfj+welI6hUZFRhwV8YJaa33qtijvHsU+qCX841G76nsvzg2BU eiZenZhO6iAdKR9xU9qc2yjCUBbIO55bYIjg5fmO8zB6LRLtrWED5IjIvtn5IohrDcy1 T4H7B7ZRR7zZJbRaXK4RljFv3eDwiZhmURI5mHQiw56Ok49sCeBNQTJ30MjOd2vb1YzI WU0ozGmKDz/9zDM5wd4py++6FPhbyG9HoJkfWPg2KCK5r+YHoNuopEGhzm3N2sFEwS7N YrsA== X-Gm-Message-State: AOJu0YzxygDW9xkyzeqn0qeqpiyGUTMbq7V0PzebdVIJmH7QvJBkCU1P mMvoifoIOAD5WJyeiIYOt4jYg/QvZUKsNzang2s= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bartosz Golaszewski There are no more users of pinctrl_gpio_can_use_line() so remove it. Signed-off-by: Bartosz Golaszewski --- 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 *pctldev, return -EINVAL; } -bool pinctrl_gpio_can_use_line(unsigned gpio) +bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset) { 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; mutex_lock(&pctldev->mutex); /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gpio); + pin = gpio_to_pin(range, gc->base + offset); result = pinmux_can_be_used_for_gpio(pctldev, pin); @@ -781,12 +781,6 @@ bool pinctrl_gpio_can_use_line(unsigned gpio) return result; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); - -bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset) -{ - 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. */ diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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 /* 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 offset); int pinctrl_gpio_request(unsigned gpio); int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset); From patchwork Wed Oct 11 12:07:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732958 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 A2713CD6E60 for ; Wed, 11 Oct 2023 12:23:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231969AbjJKMXM (ORCPT ); Wed, 11 Oct 2023 08:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234955AbjJKMWy (ORCPT ); Wed, 11 Oct 2023 08:22:54 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB244D7B for ; Wed, 11 Oct 2023 05:09:52 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50337b43ee6so8904767e87.3 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=R5evrjFzUpGnDiRf7q7Gi+WmUIdSh1zimW+cRZXWn+Em1EqF0Sljv8ENdZvgPAVVdF 0LpXln5pQiEXeogVwk2/dBrXzcKsOJwvSlqh85iGsRq60qxIY241cvaZ7uANSrisYNmh c7ibQ8z+iRRc+ks8rloupurm3+aulMNpfAJb8oa+PNOeNVNrddNGEfSqzOpVGMOGxxfD dkapBdti5DOWIQ5A7+IEoe0s8I91pXqGJyKRDuJ+wEcfG9txTPLko0Hp6T3sY3r5+jta EAryUKb7krGNdXf6Yi+Id23bEJogbnCenBHNGvEgWN1XTZfN9lvxdlyk9Z1p+4UFQyYq 19nw== X-Gm-Message-State: AOJu0Yyplv+/WxKperGqpa4/EzO5GRii54DXs8lZcLhZxiNFwvYUCxFz ToLz/TExy/MY5oveOn7xz0+Z3A== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bartosz Golaszewski There are no more users of pinctrl_gpio_request() so remove it. Signed-off-by: Bartosz Golaszewski --- 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 *gc, unsigned int 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; - struct pinctrl_gpio_range *range; - int ret; - int pin; - - ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) { - if (pinctrl_ready_for_gpio_range(gpio)) - ret = 0; - return ret; - } - - mutex_lock(&pctldev->mutex); - - /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gpio); - - ret = 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 = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, + &range); + if (ret) { + if (pinctrl_ready_for_gpio_range(gc->base + offset)) + ret = 0; + return ret; + } + + mutex_lock(&pctldev->mutex); + + /* Convert to the pin controllers number space */ + pin = gpio_to_pin(range, gc->base + offset); + + ret = pinmux_request_gpio(pctldev, range, pin, gc->base + offset); + + mutex_unlock(&pctldev->mutex); + + return ret; } EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new); diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 105a4b0c1c14..ffce8d7dd0d3 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -27,7 +27,6 @@ struct pinctrl_state; /* External interface to pin control */ bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset); -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); From patchwork Wed Oct 11 12:08:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732241 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 561A3CD6E5D for ; Wed, 11 Oct 2023 12:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346387AbjJKMND (ORCPT ); Wed, 11 Oct 2023 08:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346882AbjJKMMl (ORCPT ); Wed, 11 Oct 2023 08:12:41 -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 6FB6410C8 for ; Wed, 11 Oct 2023 05:09:54 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4060b623e64so5627005e9.0 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=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=Dci3Md8rAdtSRgHyd00EFhdozZLvpzBQawGZK5RKAIlvzts/VlEmUFja2uDURMYOes Y1YJc9k5cIJnsyiGNaWMl+8PWUOs5yjO2PrcxHqLuo6QU6myN4o2pW4YafbK5BSMV8eE XtK6/Y184z00sjryQmaDYg/1NlG6B6PQyeoH5pd+3qskkNLRyVjIziiuXVWdyP2asEB3 Kr3AOMaIxRusl0hOPDM3mSNkBJEpwHkBSND35q79MVyeLiGUoLiixZ65kuz+yMpx6JL4 E2Cyk6G9vpOaB7m5a/gIrJJV5mtJCbewh1wDH/CFBJdKW9hED4IeGBdWKe9RefGocBnq RgLw== X-Gm-Message-State: AOJu0YzdS070BPFoARsYqOpLUCcQsLC6MZf4ZtGbQs4pxkZAR+V3weEE x7sUPWEeu0EuMMp73pwKGX/2ZA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bartosz Golaszewski There are no more users of pinctrl_gpio_free() so remove it. Signed-off-by: Bartosz Golaszewski --- 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, unsigned int 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; - struct pinctrl_gpio_range *range; - int ret; - int pin; - - ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) { - return; - } - mutex_lock(&pctldev->mutex); - - /* Convert to the pin controllers number space */ - pin = 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 = 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 = gpio_to_pin(range, gc->base + offset); + + pinmux_free_gpio(pctldev, pin, range); + + mutex_unlock(&pctldev->mutex); } EXPORT_SYMBOL_GPL(pinctrl_gpio_free_new); diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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 offset); 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, From patchwork Wed Oct 11 12:08:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732245 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 3A988CD6E5D for ; Wed, 11 Oct 2023 12:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346404AbjJKMLk (ORCPT ); Wed, 11 Oct 2023 08:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346871AbjJKMK6 (ORCPT ); Wed, 11 Oct 2023 08:10:58 -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 86D7210C9 for ; Wed, 11 Oct 2023 05:09:54 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40572aeb6d0so63417145e9.1 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=J6O3NDDYgzE+SJJ6sO0J02XAhgR4JSwzdltNffrGGhM/0elSUJCIlX9MjCPS4WoHou eBap1ZYTNP4jqeyLiDDNX8RPX7rNfExNzmVpK8myCyHT6KdsEhfiErZpgbjudIuHAvae JxuVNza9+ULxcIcieYzSDoNgjXRat0cxE7NDSBuIcNRjLb+cd3qD3GGc9q9D+GnTw3MM bBc1b/UFLjC9bt7LMYMZMoKWb1QfZw+NEscz52j55fIl+Rkq3SBzTK+N1GWAMHoyd3GN eqiF0q2F8hI8NkC3Y5kkmddk0kU8NcuOKvs8QCvEpPcUYJchBmzVOqBULyNgk9ETwe/5 0Xzw== X-Gm-Message-State: AOJu0Ywc1Tiwp2GzGDKw+WMeUm6ZOFiKgoQ6qv/zPZm5GTUw8+S5dmMG qLy7XRRAIW8+B6xu76rsSI+5jw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bartosz Golaszewski There are no more users of pinctrl_gpio_direction_input() so remove it. Signed-off-by: Bartosz Golaszewski --- 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; } -/* 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 input 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 offset) { - return pinctrl_gpio_direction_input(gc->base + offset); + return pinctrl_gpio_direction(gc->base + offset, true); } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input_new); diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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 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(unsigned gpio); int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset); int pinctrl_gpio_direction_output(unsigned gpio); From patchwork Wed Oct 11 12:08:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732244 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 71FEACD6E61 for ; Wed, 11 Oct 2023 12:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346772AbjJKMMA (ORCPT ); Wed, 11 Oct 2023 08:12:00 -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 S1346435AbjJKMK7 (ORCPT ); Wed, 11 Oct 2023 08:10:59 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F359410D0 for ; Wed, 11 Oct 2023 05:09:55 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-31c5cac3ae2so6117610f8f.3 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=Z+ViLPqlQMWtNSLZkqdiCAj6K7vBYv3/BoQuKvvQ6pvggVIZHvHBAM4GRQY7oqdcIK e/JtAvhg2W9B0gU0jV3jprDK6Hy+2zdCIo/InYuWrsaXds5v6BdwmQdIMnKRD3gU0obO J8AmPaYwS1HcGLOccEsGg/3eIMzyrq3F7zfFsv22/gfRokHHMVheEF6mAjvZF/r98Nbs pgjwzKwO4T9+OAhrbNr9aPkbgf3Abw6JSL01A84+1DfONw9s+8XQ/5THso52yJdtKmFB Tq8wyf4d5ojZrollmLRRY8DlyaP61VxFWN+7ic0aDnN8dh6Uj8ivHzLovymrsuGBTDAh u63w== X-Gm-Message-State: AOJu0YxuK8n0p1cBD/q1bthYMfnX8s1TGQLhKI/Ij1jSEAhNDeScytFL VNZnHVRP3bR7BOMI+BLkENIquw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bartosz Golaszewski There are no more users of pinctrl_gpio_direction_output() so remove it. Signed-off-by: Bartosz Golaszewski --- 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); -/* 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 output * mode @@ -907,7 +900,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); */ int pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_direction_output(gc->base + offset); + return pinctrl_gpio_direction(gc->base + offset, false); } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output_new); diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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, 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); -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); From patchwork Wed Oct 11 12:08:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732972 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 C0979CD6E60 for ; Wed, 11 Oct 2023 12:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346770AbjJKML7 (ORCPT ); Wed, 11 Oct 2023 08:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346881AbjJKMLB (ORCPT ); Wed, 11 Oct 2023 08:11:01 -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 E34BF10F3 for ; Wed, 11 Oct 2023 05:09:59 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4064867903cso68967555e9.2 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=ReK6rR7CE486hCN2e1U3MEYnLyqJaGFb+0SLtKUho8Slx2ZHYFxcM8d0kWGgkNDsOV QR0zu23IfOW86TWoHUwwbgSjhmLDWg5YtR1pKSU/Ofs8J+xra8+sxetFDwzJA+TDClmb m+F2gJJh/sOkgT3Ubae1lIR3SJQ+mGyowjuAoi8WIMFyt2bqD33Q/2LqZapmQknCydFK rSdxe/YITY26PDXc0g8Kk7k8IyP6GCEywVQP/ckGXhN/hEDZYYiAL2HtCcUuqLpPMl6d j3wUk/VMkpG2h9dBqwUTr6vLKy0QKcdfjyzX69JzOL2rguyqDu6utQJC8q5wV3Bvj8dF jvWA== X-Gm-Message-State: AOJu0YwDvV+xvBEaq86EepcH6LkZd2iN7O+coJMbuCNnMA5v9RUyv8ZO nSObCgeHq8gFRIhxyvZ66hqgGw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bartosz Golaszewski There are no more users of pinctrl_gpio_set_config() so remove it. Signed-off-by: Bartosz Golaszewski --- 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); -/* This function is deprecated and will be removed. Don't use. */ -int pinctrl_gpio_set_config(unsigned gpio, unsigned long config) -{ - unsigned long configs[] = { config }; - struct pinctrl_gpio_range *range; - struct pinctrl_dev *pctldev; - int ret, pin; - - ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); - if (ret) - return ret; - - mutex_lock(&pctldev->mutex); - pin = gpio_to_pin(range, gpio); - ret = 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[] = { config }; + struct pinctrl_gpio_range *range; + struct pinctrl_dev *pctldev; + int ret, pin; + + ret = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, + &range); + if (ret) + return ret; + + mutex_lock(&pctldev->mutex); + pin = gpio_to_pin(range, gc->base + offset); + ret = pinconf_set_config(pctldev, pin, configs, ARRAY_SIZE(configs)); + mutex_unlock(&pctldev->mutex); + + return ret; } EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config_new); diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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); From patchwork Wed Oct 11 12:08:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732230 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 CFF62CD6E5D for ; Wed, 11 Oct 2023 12:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234979AbjJKMXL (ORCPT ); Wed, 11 Oct 2023 08:23:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235039AbjJKMWv (ORCPT ); Wed, 11 Oct 2023 08:22:51 -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 BE9B511C for ; Wed, 11 Oct 2023 05:10:01 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-405524e6769so5547155e9.1 for ; Wed, 11 Oct 2023 05:10:01 -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=p+Celb7V5okZbpF16UyclPEfaLBG3F0buobR1uq9vx6rL6/yoQ7f3UVa29sHBM14hE IwnH53lW9XkR5xjLLqwfnNN0+BOqIjcm4BNwqFgNj+ItiHuS7p/vAXU5w/Z28O0nLkiK ZafkTUh/8vNcdexQmh2Yg+tuXkRqqs596bp08aj1OsaIM+teI2650hMeOyic59u+6S/l NPRryX8a6zUzx/LEssJGhmpjL/QftfvOh13chOmzo21wSVbuteLPU3Ztb08YYqMnqJHP fGweGlcbTVXh6ONKhnQMptAROp2FQzscjKioL735HSr/mWXx+zEnz6kWdmf+aySvEGJu paSw== X-Gm-Message-State: AOJu0Yz8imPAskCL7UGxA37WbqajNd8ZmM/D5sBM7xY5TOHsUtV8JQUv CY5c+uAlNSXZJJLm2k2mmRNayg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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 *desc, * FIXME: find a non-racy way to retrieve this information. Maybe a * lock common to both frameworks? */ - ok_for_pinctrl = pinctrl_gpio_can_use_line_new(gc, info->offset); + ok_for_pinctrl = pinctrl_gpio_can_use_line(gc, info->offset); spin_lock_irqsave(&gpio_lock, flags); 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 *pctldev, return -EINVAL; } -bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset) +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) return result; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); /** * 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/consumer.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 /* External interface to pin control */ -bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset); +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 gpio) } 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; } From patchwork Wed Oct 11 12:08:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732962 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 03A2BCD6E60 for ; Wed, 11 Oct 2023 12:22:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346927AbjJKMWO (ORCPT ); Wed, 11 Oct 2023 08:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346826AbjJKMVl (ORCPT ); Wed, 11 Oct 2023 08:21:41 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ABDB1709 for ; Wed, 11 Oct 2023 05:10:04 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-323ef9a8b59so6391448f8f.3 for ; Wed, 11 Oct 2023 05:10:04 -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=idKNNSNHe3uU+6l+w5SVM2MDEPtPQD3HUqoTJxx/uXfcnKH7TU8YH0XGHC3E7YItWx m/M7TsjS4HACVqWymf7Mh71GVcg5dmah/ac0wRN3bt8EMnsRhsw+Oc3j9Fi/Tddtbp4C hAOnZSnVx/84Zo+37JHR60RstddhtBzkLpz0l/pJL//7AeZqe0dR4fDw11amC4rxRHO4 wWmXcwndrB9Yx9m0y8OktNO2m10diOHvXSjBoNA/PGB1gW6CEqBfJ99cI00MGjw6MFQi XPcuhFWJBuXbKlI2PDEGzKWbrp7lR+uJ+RvxoMiDdQQh1hmSfFZP/1ozMxNZHdmHvcOt TgMA== X-Gm-Message-State: AOJu0YwGei+g18A8pwaMHuTS7cd+GoBaMcAxlmZBs9KWOx8xy+qYPVJo DWA+ELbk8Kv6NljvMmMKx0i5sQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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; - return pinctrl_gpio_request_new(chip, offset); + return pinctrl_gpio_request(chip, offset); } 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, unsigned offset) static int em_gio_request(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_request_new(chip, offset); + return pinctrl_gpio_request(chip, offset); } 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, unsigned offset) return error; } - error = pinctrl_gpio_request_new(chip, offset); + error = pinctrl_gpio_request(chip, offset); if (error) pm_runtime_put(p->dev); 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) 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); } 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, unsigned int offset) return 0; #endif - return pinctrl_gpio_request_new(gc, offset); + return pinctrl_gpio_request(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_request); 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, unsigned offset) if (!chip->pinmux_is_supported) return 0; - return pinctrl_gpio_request_new(gc, offset); + return pinctrl_gpio_request(gc, offset); } 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, unsigned int offset) EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line); /** - * 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 drivers * 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, unsigned int offset) return ret; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_request); /** * 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/nuvoton/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; dev_dbg(chip->parent, "gpio_request: offset%d\n", offset); - ret = pinctrl_gpio_request_new(chip, offset); + ret = pinctrl_gpio_request(chip, offset); if (ret) return ret; diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/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 = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_request_new(chip, offset); + ret = pinctrl_gpio_request(chip, offset); if (ret) return ret; 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, unsigned offset) if (idx < 0 || pfc->info->pins[idx].enum_id == 0) return -EINVAL; - return pinctrl_gpio_request_new(gc, offset); + return pinctrl_gpio_request(gc, offset); } static void gpio_pin_free(struct gpio_chip *gc, unsigned offset) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/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; - ret = pinctrl_gpio_request_new(chip, offset); + ret = pinctrl_gpio_request(chip, offset); if (ret) return ret; diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/renesas/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, unsigned int offset) u8 bit = RZV2M_PIN_ID_TO_PIN(offset); int ret; - ret = pinctrl_gpio_request_new(chip, offset); + ret = pinctrl_gpio_request(chip, offset); if (ret) return ret; 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, unsigned offset) if (offset >= chip->ngpio) return -EINVAL; - ret = pinctrl_gpio_request_new(chip, offset); + ret = pinctrl_gpio_request(chip, offset); if (ret) return ret; diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/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 = { 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); } static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/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 = { 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); } 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, unsigned offset) return -EINVAL; } - return pinctrl_gpio_request_new(chip, offset); + return pinctrl_gpio_request(chip, offset); } static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 220f69f342e1..4aa22af8e4e4 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h @@ -27,7 +27,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_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) } 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; } From patchwork Wed Oct 11 12:08:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732964 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 F118DCD6E62 for ; Wed, 11 Oct 2023 12:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234980AbjJKMUm (ORCPT ); Wed, 11 Oct 2023 08:20:42 -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 S235012AbjJKMUd (ORCPT ); Wed, 11 Oct 2023 08:20:33 -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 2BF3E1719 for ; Wed, 11 Oct 2023 05:10:05 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4064876e8b8so66735395e9.0 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=lkK61/lqKJvZvYJiDEPbSDBzKKsLq3/uMbZgGmdvXAQOW7EhTsDzsIFXj+BudgE9z0 ZMFXJvGEu8fOBus+dwHCJCnSWpDD5u1pwhyZ3oqc7nSIBsk02WzrUEYLpGMZ0XCMsLZJ L0dqEXUMIQcTtraYH458Y/VurfGkQGrashiCwkrXw7TAfW5TmrhrFzutV86NoCPv/WD3 Y+Ww69CdLwQa8BmG0B1RzbJ4c+s+z8HU1yn4b+Rg5skPDqniMbAILYw9ZAJwvjuVrFBq AlmMoGMSG8SZf6htFXDF2NQR8OfIxK8eaN1G1EdYZp71gvVJLL9d2NBoCL3/vNKNLxoj ts0w== X-Gm-Message-State: AOJu0YydFWItwu4RR+cQDBbqu+TNEr3UUgZkBZHEIeqG/L1TDmOwNmgV rpmyC6UxVsm9oldga4fDRGBjrA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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) static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } 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, unsigned offset) static void em_gio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); /* 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, unsigned offset) { struct gpio_rcar_priv *p = gpiochip_get_data(chip); - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); /* * 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, unsigned int offset) { struct tegra_gpio_info *tgi = gpiochip_get_data(chip); - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); tegra_gpio_disable(tgi, offset); } 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, unsigned int offset) return; #endif - pinctrl_gpio_free_new(gc, offset); + pinctrl_gpio_free(gc, offset); } EXPORT_SYMBOL_GPL(gpiochip_generic_free); 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, unsigned offset) if (!chip->pinmux_is_supported) return; - pinctrl_gpio_free_new(gc, offset); + pinctrl_gpio_free(gc, offset); } 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); /** - * 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 GPIO * @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 drivers * 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, unsigned int offset) mutex_unlock(&pctldev->mutex); } -EXPORT_SYMBOL_GPL(pinctrl_gpio_free_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_free); static int pinctrl_gpio_direction(unsigned gpio, bool input) { diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/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); } static void npcmgpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c index 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) static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } 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, unsigned offset) static void gpio_pin_free(struct gpio_chip *gc, unsigned offset) { - return pinctrl_gpio_free_new(gc, offset); + return pinctrl_gpio_free(gc, offset); } 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/renesas/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, unsigned int offset) { unsigned int virq; - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); virq = irq_find_mapping(chip->irq.domain, offset); if (virq) diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/renesas/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, unsigned int offset) static void rzv2m_gpio_free(struct gpio_chip *chip, unsigned int offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); /* * 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, unsigned offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); err0: - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); return ret; } @@ -278,7 +278,7 @@ static void plgpio_free(struct gpio_chip *chip, unsigned offset) if (!IS_ERR(plgpio->clk)) clk_disable(plgpio->clk); - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } /* PLGPIO IRQ */ diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/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) static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free_new(gc, gpio); + pinctrl_gpio_free(gc, gpio); } 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/pinctrl/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, unsigned int gpio) static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio) { - pinctrl_gpio_free_new(gc, gpio); + pinctrl_gpio_free(gc, gpio); } 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, unsigned offset) static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset) { - pinctrl_gpio_free_new(chip, offset); + pinctrl_gpio_free(chip, offset); } static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset) diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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) } static inline void -pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset) +pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset) { } From patchwork Wed Oct 11 12:08:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732229 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 AD7CFCD6E63 for ; Wed, 11 Oct 2023 12:23:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346972AbjJKMXN (ORCPT ); Wed, 11 Oct 2023 08:23:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234966AbjJKMWy (ORCPT ); Wed, 11 Oct 2023 08:22:54 -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 C63BC171F for ; Wed, 11 Oct 2023 05:10:07 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40651a72807so65201745e9.1 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=R5Z1TMt063sAJtBrS+1S1A7vHDjbfKoGgnuBWy/izCBtgc9mEOh93mY7kvWbQBle2s IO0Ted/RLwzeSRLmLS5wfcNk5PGezOnhuo+SfgrSq3AlHiKq2548yilbLZn2IR6WpCQY sTJ4uwoWPVxeZv6xYvRUq3k3X/LTJ02g8hIpVhN5n/VsJrJJ5IAuSEagKJ/8KDCSS8qa 0mYgJagUFWDDPCTeANhYFb/9lO/FzC313+ckCpfqriAghBpnZNzl9iHfcWFFHMAv+Wd3 XYfa4FrIuiAcukHXh9npl1Zox2I+Lm9oiRceyB5gu3DfHMM68wf+bHtoef3LZm/hafy2 KxtQ== X-Gm-Message-State: AOJu0YyA0wg7EfUbjBC1jVYnvEMe8ikvuy3RY8aZifd8voC+BDYe0zFN +w7touD4nDYAaN6lt5M6nJbwKI8MGW0ymd6Pwk8= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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 = pinctrl_gpio_direction_input_new(chip, pin); + ret = pinctrl_gpio_direction_input(chip, pin); if (ret) return ret; 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 *chip, unsigned offset) int ret; if (pxa_gpio_has_pinctrl()) { - ret = pinctrl_gpio_direction_input_new(chip, offset); + ret = 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, if (input) - pinctrl_gpio_direction_input_new(chip, offset); + pinctrl_gpio_direction_input(chip, offset); else pinctrl_gpio_direction_output_new(chip, offset); 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); - ret = pinctrl_gpio_direction_input_new(chip, offset); + ret = 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); } - return pinctrl_gpio_direction_input_new(chip, gpio); + return pinctrl_gpio_direction_input(chip, gpio); } static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/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, unsigned int offset, int va 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); } 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 input) } /** - * pinctrl_gpio_direction_input_new() - request a GPIO pin to go into input mode + * pinctrl_gpio_direction_input() - request a GPIO pin to go into input mode * @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 individual * drivers shall *NOT* touch pin control GPIO calls. */ -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) { return pinctrl_gpio_direction(gc->base + offset, true); } -EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); /** * pinctrl_gpio_direction_output_new() - request a GPIO pin to go into output diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/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 *chip, unsigned int offset) static int chv_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); } 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 *chip, unsigned int offset) 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); } static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/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, unsigned int offset, int value) static int lp_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); } static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/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, unsigned int gpio, int value) static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio) { - return pinctrl_gpio_direction_input_new(chip, gpio); + return pinctrl_gpio_direction_input(chip, gpio); } 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/pinctrl/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 = { 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); } static int mtk_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/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 *chip, unsigned int gpio) if (gpio >= hw->soc->npins) return -EINVAL; - return pinctrl_gpio_direction_input_new(chip, gpio); + return pinctrl_gpio_direction_input(chip, gpio); } 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/nuvoton/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 *chip, unsigned int offset) struct npcm7xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_input_new(chip, offset); + ret = pinctrl_gpio_direction_input(chip, offset); if (ret) return ret; diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/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 *chip, unsigned int offset) struct npcm8xx_gpio *bank = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_input_new(chip, offset); + ret = pinctrl_gpio_direction_input(chip, offset); if (ret) return ret; diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3722.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, unsigned offset, static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } static int as3722_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.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) 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); } static int axp20x_gpio_get(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.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_pinctrl *chip, int reg, static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off) { - return pinctrl_gpio_direction_input_new(gc, off); + return pinctrl_gpio_direction_input(gc, off); } static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc, diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.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, unsigned 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); } static int ingenic_gpio_direction_output(struct gpio_chip *gc, diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.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); } static int ocelot_gpio_direction_output(struct gpio_chip *chip, diff --git a/drivers/pinctrl/pinctrl-rk805.c b/drivers/pinctrl/pinctrl-rk805.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); } 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, unsigned offset, int value) 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); 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, 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); } 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, unsigned offset, int value) static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } 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, static int wmt_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { - return pinctrl_gpio_direction_input_new(chip, offset); + return pinctrl_gpio_direction_input(chip, offset); } static int wmt_gpio_direction_output(struct gpio_chip *chip, unsigned offset, diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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) } 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; } From patchwork Wed Oct 11 12:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732227 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 A3F2FCD6E5D for ; Wed, 11 Oct 2023 12:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232213AbjJKMXY (ORCPT ); Wed, 11 Oct 2023 08:23:24 -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 S234658AbjJKMXG (ORCPT ); Wed, 11 Oct 2023 08:23:06 -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 D05889E for ; Wed, 11 Oct 2023 05:10:11 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-405497850dbso62562625e9.0 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=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=j0tDZOZjsXT8HZkCDhmqjGncZTyKBf5lqBfhFd/kX9VcFl/Qu2CEFlOD5XgyuSgOgi 3zfvJONfEM7/F+ftZnZLqy6oC+DYI9pWxveGZzHCrC898ijmlf+C12Kk5Ikj4v84Gdvv dQCgoeEQO03EV8T3p1SLONGFX3Ex4phbjSfu+fd859kXwZ0rTQeyyr+KnoOOB22Au8SW F5CM+KzA2su0CiC9dEh07w83a5DhiaTrTnvfD4lWbc7G9TiNeAjuRRSErXu8KUHLRUKu 9Yp8Y+I0Pa1ed7aFMb4PfJrSqyIYub0HFhmDxczpl9iaGBW/QcN7I6UZe/wrhCrvQJ8M m2Kw== X-Gm-Message-State: AOJu0YyQLK85ctKeiYAJzS/goK7R0za/A08rS1g5SUMx6635mf9orpqG Z8bBvrfcxIE4blbphQn3uTZOyg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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 = pinctrl_gpio_direction_output_new(chip, pin); + ret = pinctrl_gpio_direction_output(chip, pin); if (ret) return ret; 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)); if (pxa_gpio_has_pinctrl()) { - ret = pinctrl_gpio_direction_output_new(chip, offset); + ret = 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); 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); - ret = pinctrl_gpio_direction_output_new(chip, offset); + ret = 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, vf610_gpio_set(chip, gpio, value); - return pinctrl_gpio_direction_output_new(chip, gpio); + return pinctrl_gpio_direction_output(chip, gpio); } static void vf610_gpio_irq_handler(struct irq_desc *desc) diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/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); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } static int cs42l43_gpio_add_pin_ranges(struct gpio_chip *chip) diff --git a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c b/drivers/pinctrl/cirrus/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_chip *chip, { lochnagar_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } 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); /** - * pinctrl_gpio_direction_output_new() - request a GPIO pin to go into output - * 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 individual * drivers shall *NOT* touch pin control GPIO calls. */ -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) { return pinctrl_gpio_direction(gc->base + offset, false); } -EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); /** * pinctrl_gpio_set_config_new() - Apply config to given GPIO pin diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/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); } static const struct gpio_chip chv_gpio_chip = { 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); } static const struct gpio_chip intel_gpio_chip = { diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/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 *chip, unsigned int offset, { lp_gpio_set(chip, offset, value); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } static int lp_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/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); - return pinctrl_gpio_direction_output_new(chip, gpio); + return pinctrl_gpio_direction_output(chip, gpio); } 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/pinctrl/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); } static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/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, mtk_gpio_set(chip, gpio, value); - return pinctrl_gpio_direction_output_new(chip, gpio); + return pinctrl_gpio_direction_output(chip, gpio); } 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/nuvoton/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 = %x\n", offset, value); - ret = pinctrl_gpio_direction_output_new(chip, offset); + ret = pinctrl_gpio_direction_output(chip, offset); if (ret) return ret; diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/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 = gpiochip_get_data(chip); int ret; - ret = pinctrl_gpio_direction_output_new(chip, offset); + ret = pinctrl_gpio_direction_output(chip, offset); if (ret) return ret; diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3722.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_chip *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); } static int as3722_gpio_to_irq(struct gpio_chip *chip, unsigned offset) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.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_chip *gc, if (ret) return ret; - return pinctrl_gpio_direction_output_new(gc, off); + return pinctrl_gpio_direction_output(gc, off); } 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-ingenic.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); } static inline void ingenic_config_pin(struct ingenic_pinctrl *jzpc, @@ -4054,7 +4054,7 @@ static int ingenic_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, break; case PIN_CONFIG_OUTPUT: - ret = pinctrl_gpio_direction_output_new(jzpc->gc, + ret = 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-ocelot.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_chip *chip, regmap_write(info->map, REG(OCELOT_GPIO_OUT_CLR, info, offset), pin); - return pinctrl_gpio_direction_output_new(chip, offset); + return pinctrl_gpio_direction_output(chip, offset); } static const struct gpio_chip ocelot_gpiolib_chip = { diff --git a/drivers/pinctrl/pinctrl-rk805.c b/drivers/pinctrl/pinctrl-rk805.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); } static int rk805_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) 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 *chip, struct st_gpio_bank *bank = gpiochip_get_data(chip); __st_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output_new(chip, offset); + pinctrl_gpio_direction_output(chip, offset); 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); - return pinctrl_gpio_direction_output_new(gc, offset); + return pinctrl_gpio_direction_output(gc, offset); } 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 = gpiochip_get_data(chip); __stm32_gpio_set(bank, offset, value); - pinctrl_gpio_direction_output_new(chip, offset); + pinctrl_gpio_direction_output(chip, offset); 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); } static const struct gpio_chip wmt_gpio_chip = { diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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 int 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); @@ -115,7 +115,7 @@ static inline int pinctrl_gpio_direction_output(unsigned gpio) } static inline int -pinctrl_gpio_direction_output_new(struct gpio_chip *gc, unsigned int offset) +pinctrl_gpio_direction_output(struct gpio_chip *gc, unsigned int offset) { return 0; } From patchwork Wed Oct 11 12:08:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732959 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 7121ECD6E62 for ; Wed, 11 Oct 2023 12:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346313AbjJKMWt (ORCPT ); Wed, 11 Oct 2023 08:22:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346945AbjJKMWS (ORCPT ); Wed, 11 Oct 2023 08:22:18 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F3EF121 for ; Wed, 11 Oct 2023 05:10:12 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50435a9f800so8832562e87.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=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=PyTqFYkOFNFtTssY0YbDjtHNwMDsyJwWy7AXd6CkdzKjh+r0RpqFYCc1tx8fdsolFc /6g1+1UoBPvnqpn93KI5si0a/o+mYPyWpJPlkhOuvCjvg0yLTaxFM41+AL98fyR7XKdd ouxI3V7SWX31jMF4odsPKyziHrkvQu2XPZgsNd4dlA0Y4xDYkMU93vkP8IvzwC+HQVnb FXwZ8BYe2p+w6LToN9BVr3kFAo0iAdsqvKo+TavV6DGm3Oyz/OWYtItN3daKyvDHm0g5 1teeXjHyHwtssltllu+M1xygauLVbmCvEzo3JN/55gGAfPhzhh5Lzj8GLRfdIpOIPK5l a5kw== X-Gm-Message-State: AOJu0YwCcyqN7tAWkQWZ2y3lqWWVHM/2cispm345kKE08xIM9cC6KOyO ik+KSd9XL5+Qm87SJFBtzHLonnV1ECLg+GpttHM= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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 *chip, unsigned int offset, else if (param == PIN_CONFIG_BIAS_DISABLE || param == PIN_CONFIG_BIAS_PULL_DOWN || param == PIN_CONFIG_DRIVE_STRENGTH) - return pinctrl_gpio_set_config_new(chip, offset, config); + return pinctrl_gpio_set_config(chip, offset, config); else if (param == PIN_CONFIG_DRIVE_OPEN_DRAIN || param == 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); 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); /** - * 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[] = { config }; @@ -933,7 +933,7 @@ int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset, return ret; } -EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config_new); +EXPORT_SYMBOL_GPL(pinctrl_gpio_set_config); static struct pinctrl_state *find_state(struct pinctrl *p, const char *name) diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.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); 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) } 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; From patchwork Wed Oct 11 12:08:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732228 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 4D578CD6E62 for ; Wed, 11 Oct 2023 12:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346904AbjJKMXQ (ORCPT ); Wed, 11 Oct 2023 08:23:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235051AbjJKMW4 (ORCPT ); Wed, 11 Oct 2023 08:22:56 -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 C5191122 for ; Wed, 11 Oct 2023 05:10:12 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40651a72807so65202435e9.1 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=nNe6slCpEJJNOfivo9VVq4KSr9nuOxTqxKDublIXD1UdMogkNja2JJ/opRxLXSLwgO k6LBqJdvy8m4XwhWRbHc7r20t/RYNai5VAuaee/dCUjkeSPE6dzAHLtVMAVMSJPOKa6e byeWSLDGYZbvPG2c6m3S3B+ZvCdd0cMveu5ilF+zHKv3yfJUvOqe7d26lhfkLQDo5aUN q2Sd4d/jyTLQjWf/YT+nfpp8zgdYJumvNVPGGUgmGexyaX9JiAGkAA4nAHI+NFpeMgTX HPXsN56sknwT7RwgTWBWwN5/MQgoP+jzeVHsBf88DK7ftjBCoKcdjBkHaxk6od932zD6 25qw== X-Gm-Message-State: AOJu0YyJ+YPQOymy+qd3JncPxXcOX4Ni8206bQB6VhAXpbSiCl73bBZb EAr7IF5vk/x5rXze+MEQrlwgJA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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); -static int pinctrl_gpio_direction(unsigned gpio, bool input) +static int pinctrl_gpio_direction(struct gpio_chip *gc, unsigned int offset, + bool input) { struct pinctrl_dev *pctldev; struct pinctrl_gpio_range *range; int ret; int pin; - ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); + ret = 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 input) mutex_lock(&pctldev->mutex); /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gpio); + pin = gpio_to_pin(range, gc->base + offset); ret = pinmux_gpio_direction(pctldev, range, pin, input); mutex_unlock(&pctldev->mutex); @@ -884,7 +886,7 @@ static int pinctrl_gpio_direction(unsigned gpio, bool input) */ 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); @@ -899,7 +901,7 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input); */ int pinctrl_gpio_direction_output(struct gpio_chip *gc, unsigned int offset) { - return pinctrl_gpio_direction(gc->base + offset, false); + return pinctrl_gpio_direction(gc, offset, false); } EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_output); From patchwork Wed Oct 11 12:08:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732234 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 0548CCD6E62 for ; Wed, 11 Oct 2023 12:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346849AbjJKMVl (ORCPT ); Wed, 11 Oct 2023 08:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346898AbjJKMVM (ORCPT ); Wed, 11 Oct 2023 08:21:12 -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 5C597131 for ; Wed, 11 Oct 2023 05:10:13 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4075c58ac39so11618515e9.3 for ; Wed, 11 Oct 2023 05:10:13 -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=JXK0L+T+M9AvXvqiRaxNti0kxlbyh5o7MhW49hHGXUyaQLN84Dms6/TTYCStZ8JhyP MQRWIdwzVy5FTSykAJ2YZ/oVjhCamlp1GnoFWswqnYKCVf4zb91LGgHhQP5Pynhhd42e DYv/nVQC/WBVM+bpdqObpYAS5mnbDLCdtHgQ8Io/AG46f/Chbh6mOODHhHj6mpTsRFzU t6OyQvwEcUxp1/6/qVzjLkiSXjNNVoatKbODj22kCgSUw6tMUGSfKy04B0KuBQ7Arhh/ y75SdYL3R1Q7mQkzP4KJ34PrDw6JjiBM+s9U4jk7Iu7hR+TWG6r9QdtvTzT3xlA1Q60W CCIA== X-Gm-Message-State: AOJu0YzG4pBj2PZ/HucgQBNSqGyoND3oXYlBChlX7BfJxxk9Iu9wwQ1U rxihYPh2Px/0+MZWMLqyhjPFVECORLyl9tt0eFQ= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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; } /** * 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; - range = pinctrl_match_gpio_range(pctldev, gpio); + range = pinctrl_match_gpio_range(pctldev, gc->base + offset); if (range) { *outdev = pctldev; *outrange = range; @@ -767,7 +769,7 @@ bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned 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; 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; - ret = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret = pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) { if (pinctrl_ready_for_gpio_range(gc->base + offset)) ret = 0; @@ -834,8 +835,7 @@ void pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset) struct pinctrl_dev *pctldev; int ret, pin; - ret = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret = pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) return; @@ -858,8 +858,7 @@ static int pinctrl_gpio_direction(struct gpio_chip *gc, unsigned int offset, int ret; int pin; - ret = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret = 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, unsigned int offset, struct pinctrl_dev *pctldev; int ret, pin; - ret = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, - &range); + ret = pinctrl_get_device_gpio_range(gc, offset, &pctldev, &range); if (ret) return ret; From patchwork Wed Oct 11 12:08:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732969 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 46099CD6E5D for ; Wed, 11 Oct 2023 12:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346799AbjJKMM4 (ORCPT ); Wed, 11 Oct 2023 08:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234988AbjJKMMo (ORCPT ); Wed, 11 Oct 2023 08:12:44 -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 BAB341994 for ; Wed, 11 Oct 2023 05:10:17 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40537481094so63319545e9.0 for ; Wed, 11 Oct 2023 05:10:16 -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=vWfvBhVPXnkMxH3pU7tzI0I1HujHgAD0cZhT0G27khbjEhhgjbGNqWWo8Cm21fgQFC WGfwbCn1fOBZc71BJnCxjkfdPj4sk2detO1L0Gh2tiC+3uQ1bua1njiiT1tP/DJUe0Iw RDp0ntFeMtDDL3UKVkE6NGraev5ldPXjCnJnj0F6Jd4Q7K3Obb1deYZjS1uquiNrMV3Z vqaH26VKkutmAZAPqbb8kwJa0JF+bh+c1E7QKcrs75NfGLcpv/h2nTWr1RTGqFuz3M8R 88QO1aq9T9iaR88uMftw3ILieRMDHr8Ljcf9EZvh458UJR3KoqFOfS5w4wikR9TzUkW5 sDIg== X-Gm-Message-State: AOJu0YzImdq9oNJCLT/TeukSreAEnRu0Zd2GBmfLaZw8TTIRiy8gMa8U A0k93WF9iLHcXsaANoQq6KG1EQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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_range *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; @@ -306,8 +308,8 @@ pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, unsigned gpio) /* Loop over the ranges */ list_for_each_entry(range, &pctldev->gpio_ranges, node) { /* Check if we're in the valid range */ - if (gpio >= range->base && - gpio < range->base + range->npins) { + if ((gc->base + offset) >= 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_chip *gc, list_for_each_entry(pctldev, &pinctrldev_list, node) { struct pinctrl_gpio_range *range; - range = pinctrl_match_gpio_range(pctldev, gc->base + offset); + range = pinctrl_match_gpio_range(pctldev, gc, offset); if (range) { *outdev = pctldev; *outrange = range; From patchwork Wed Oct 11 12:08:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732965 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 9B169CD6E63 for ; Wed, 11 Oct 2023 12:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235076AbjJKMUi (ORCPT ); Wed, 11 Oct 2023 08:20:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235000AbjJKMU3 (ORCPT ); Wed, 11 Oct 2023 08:20:29 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2896819A2 for ; Wed, 11 Oct 2023 05:10:18 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-405361bba99so62448195e9.2 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=I2gYVMTFAD2atFv/NL522VsK3/MDhVMQ+WmsO9uGwSnK2jJadwupbPUj6AHHx3gD4r Vne/EPyvocbmyxjdqW3fNlW2l7mzDMTedgkQeVooVWxbwfCE5aSADLtqbctWrr1jyTN4 kwg+fqdUezbYkMAvVu8jOcZsEA6k9VRj29dKbI9chRyzBL03xNpPfW+QRAxBbxU7mz/C s+D+7LWdP/LsOtm+nhyeJ+7EGk0BTF0bpUXrInJb+T9lVQoLUemd/4NR+By4W3bq3quF cs/muf9Auzx0R9xT7pN1Ani6YF/nFezi9yel5HPmqurg+p4kYoy++4NzkfEO6GZ7wah9 qbEQ== X-Gm-Message-State: AOJu0YzW/EGqxaHstBNbtvCOOK6FQ32QThilvTDSApMeqwJalBktSFwk niKF5tXHfhh4QEbsWQSHBIhwAg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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 *pctldev, /** * 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 = gpio - range->base; + unsigned int pin = 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; } /** @@ -777,7 +778,7 @@ bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset) mutex_lock(&pctldev->mutex); /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gc->base + offset); + pin = gpio_to_pin(range, gc, offset); result = pinmux_can_be_used_for_gpio(pctldev, pin); @@ -812,7 +813,7 @@ int pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset) mutex_lock(&pctldev->mutex); /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gc->base + offset); + pin = gpio_to_pin(range, gc, offset); ret = pinmux_request_gpio(pctldev, range, pin, gc->base + offset); @@ -844,7 +845,7 @@ void pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset) mutex_lock(&pctldev->mutex); /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gc->base + offset); + pin = gpio_to_pin(range, gc, offset); pinmux_free_gpio(pctldev, pin, range); @@ -868,7 +869,7 @@ static int pinctrl_gpio_direction(struct gpio_chip *gc, unsigned int offset, mutex_lock(&pctldev->mutex); /* Convert to the pin controllers number space */ - pin = gpio_to_pin(range, gc->base + offset); + pin = gpio_to_pin(range, gc, offset); ret = pinmux_gpio_direction(pctldev, range, pin, input); mutex_unlock(&pctldev->mutex); @@ -929,7 +930,7 @@ int pinctrl_gpio_set_config(struct gpio_chip *gc, unsigned int offset, return ret; mutex_lock(&pctldev->mutex); - pin = gpio_to_pin(range, gc->base + offset); + pin = gpio_to_pin(range, gc, offset); ret = pinconf_set_config(pctldev, pin, configs, ARRAY_SIZE(configs)); mutex_unlock(&pctldev->mutex); From patchwork Wed Oct 11 12:08:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732957 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 262A0CD6E60 for ; Wed, 11 Oct 2023 12:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346715AbjJKMXW (ORCPT ); Wed, 11 Oct 2023 08:23:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346843AbjJKMXJ (ORCPT ); Wed, 11 Oct 2023 08:23:09 -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 DB30E19A6 for ; Wed, 11 Oct 2023 05:10:20 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40684f53d11so69020765e9.1 for ; Wed, 11 Oct 2023 05:10:19 -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=JsFiJwOUxtQoRIqNFZzeUp7TCgj/vltKx0gjUkl1M5T9e750aTnCz8Ist3ItTJ8DFf fDPN52GubqfPMPByjw7kgkfRnFQr/lX1I+717tSmbIaIkdYe0Z/RWVxBMJ8hHJm+AueR OVR4leh7DAOKERx6WpGMebdj+PVRJFy2ncUs5go3+Md22BW1UcKdc5J53Gm4QJN2c33Y HR/2yG/e87TknECg3Qoysw38/Nbrzxoe/dxouKRpUm4aXiA3YkmIwqvGqNudKXRoJ9nQ CNdvsJziVZH3w6y6JF4zfn9rKIVVeLI2ewUqPNtx1zSmlnwkBjeXQHtJOvdyTLRrxb8z Z1cA== X-Gm-Message-State: AOJu0Yzt5bu4ej8WfjremCX5jqQlMd8wAgMUcAO/+GdNGc8dPupLq8+d qaFFEQlvAzbUcFxBMnLpH81n4w== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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, struct 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 = 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 = gpiod_to_chip(gpio_to_desc(gpio)); - - if (WARN(!chip, "no gpio_chip for gpio%i?", gpio)) - return false; mutex_lock(&pinctrldev_list_mutex); @@ -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 /** @@ -805,7 +802,7 @@ int pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset) ret = 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 = 0; return ret; } From patchwork Wed Oct 11 12:08:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732235 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 ACC93CD6E60 for ; Wed, 11 Oct 2023 12:21:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346917AbjJKMVN (ORCPT ); Wed, 11 Oct 2023 08:21:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235046AbjJKMUg (ORCPT ); Wed, 11 Oct 2023 08:20:36 -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 3C5CB19BF for ; Wed, 11 Oct 2023 05:10:23 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4065f29e933so66606955e9.1 for ; Wed, 11 Oct 2023 05:10:23 -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=c/3LBillapePrSy3Hv04t+kpb3vQPA7FKo8F2m3TaWbbg4gLO21iiOr/c9A9d5gGDb asBQ7qSg0dBUYShZWIP1NtDW77jGetp4f3UrEP22nLo7Z38Ei/KiBUHNafRJpyvJz8qV 9eL2W+QpDuPvD+F1PinptO2+MkGT7NLZiUSl6cwoSBmvzzPI9OEoF1ix3YP+sGmgqAc+ wbAt2VpfQF0LQXbUJrSo3e3mafM6e769XTO/3yJs6mBfCu3KbRIA+9zAG+7EbDNuwYkH x3MpgMKOSgANS/V4tU9RfAcFS546NPqWeLUXmbWk5/b7wQGejRK9jUV4ufaZAB2+jFZ7 RX7w== X-Gm-Message-State: AOJu0YxGBoF86HdzREiSYk+rfoOA+nl76FG6AOkY1i/JtbMg3Mq3UxwD L2f/ZNb65/wQi+En5C3qusHArA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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/intel/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; } -static int chv_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) -{ - 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 = { .request = gpiochip_generic_request, .free = gpiochip_generic_free, .get_direction = chv_gpio_get_direction, - .direction_input = chv_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = chv_gpio_direction_output, .get = chv_gpio_get, .set = 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; } -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 int offset, int value) { @@ -1006,7 +1001,7 @@ static const struct gpio_chip intel_gpio_chip = { .request = gpiochip_generic_request, .free = gpiochip_generic_free, .get_direction = intel_gpio_get_direction, - .direction_input = intel_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = intel_gpio_direction_output, .get = intel_gpio_get, .set = intel_gpio_set, diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/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, unsigned int offset, int value) raw_spin_unlock_irqrestore(&lg->lock, flags); } -static int lp_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset, int value) { @@ -799,7 +794,7 @@ static int lp_gpio_probe(struct platform_device *pdev) gc->owner = THIS_MODULE; gc->request = gpiochip_generic_request; gc->free = gpiochip_generic_free; - gc->direction_input = lp_gpio_direction_input; + gc->direction_input = pinctrl_gpio_direction_input; gc->direction_output = lp_gpio_direction_output; gc->get = lp_gpio_get; gc->set = lp_gpio_set; From patchwork Wed Oct 11 12:08:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732960 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 20506CD6E5D for ; Wed, 11 Oct 2023 12:22:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346135AbjJKMWs (ORCPT ); Wed, 11 Oct 2023 08:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346942AbjJKMWS (ORCPT ); Wed, 11 Oct 2023 08:22:18 -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 937D21BC8 for ; Wed, 11 Oct 2023 05:10:24 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-405524e6769so5548215e9.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=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=sDMeABwchpF5D7H0hzcXRyp8GR1rYfhLDIDsG8WCVdTaF4usBy0y8wt+f55lRP9QjG XyV6b2pL4hXucz7xk/aaxlNGELpwERQ7sdrCTU6Dte3XijfpnEmT9V6V7MSbUbMZjkaE 4LrZ2KYfbgkOo2h/O0qd0JSpaPFtxu4JoSp2UUHpQYm6QwqxQYThfouVPqmxPaUdEMp0 fsq9FEpQP96fiH53fGRgt8rMALuX1pL7oqz5W6uzYFBxYO778spilNlmEHW+wP/EAyoO zw86/kIXNdpjdXcC7GdmVtdNJjUY55agAS+9r27yJ4w5mLYOZjaTZhduZHFyE/vpTzHv YmfQ== X-Gm-Message-State: AOJu0Yz/V2f23Wy6os6X+WnUy9vZK+oSVtuXPVUpQUXtSdTC+W+KiTod hTal8iV4XZTarhxnXYh/cj4GaA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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, unsigned offset, int value) __st_gpio_set(bank, offset, value); } -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 = { .free = gpiochip_generic_free, .get = st_gpio_get, .set = st_gpio_set, - .direction_input = st_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = st_gpio_direction_output, .get_direction = st_gpio_get_direction, .ngpio = ST_GPIO_PINS_PER_BANK, From patchwork Wed Oct 11 12:08:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732233 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 69F78CD6E5D for ; Wed, 11 Oct 2023 12:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346874AbjJKMWU (ORCPT ); Wed, 11 Oct 2023 08:22:20 -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 S1346313AbjJKMV4 (ORCPT ); Wed, 11 Oct 2023 08:21:56 -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 744E91BC7 for ; Wed, 11 Oct 2023 05:10:24 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40566f8a093so62356005e9.3 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=GhSG3pbifE1/Ulr0fD78/RKWMyT23xLdPiD9tYJXRfEi+y0D9asmPvdG8bgie3uoPB XDKU5b0bUWxMlBwjKgpO2qyc+nlm6r8eXBYu6RStesPNaoED2aynwTSgziaZDVfOKkeI +sx911C8TsZw3Xj30zAfYEnLy6ByJQQxAhhpUtu1am2ecXmZI9wotQmitf8R2WefJLP+ prIoi8qwU/REi+hhs3wE62KmmB+sbGSjt58mvBHptTBXHVygTyNRnMZmrlFoHXGOtlhV 6J1OWUVD9lj9QJfwrWUiWGHLh+ooKrroLowcGcdBnfj7TltqAdKNe4Z63Dgx3gwPohrU FE6Q== X-Gm-Message-State: AOJu0YyCXCkfLsVWFx12cgUW8oovy5bc/TIpqYEjRDMn6QifyboSen4g d6WYmMPBSNGt/dHjTdOis6ku2g== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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-ingenic.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, unsigned int offset) return (int) ingenic_gpio_get_value(jzgc, offset); } -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 = irqd_to_hwirq(data); int ret; - ret = ingenic_gpio_direction_input(gpio_chip, irq); + ret = pinctrl_gpio_direction_input(gpio_chip, irq); if (ret) return ret; @@ -4197,7 +4191,7 @@ static int __init ingenic_gpio_probe(struct ingenic_pinctrl *jzpc, jzgc->gc.set = ingenic_gpio_set; jzgc->gc.get = ingenic_gpio_get; - jzgc->gc.direction_input = ingenic_gpio_direction_input; + jzgc->gc.direction_input = pinctrl_gpio_direction_input; jzgc->gc.direction_output = ingenic_gpio_direction_output; jzgc->gc.get_direction = ingenic_gpio_get_direction; jzgc->gc.request = gpiochip_generic_request; From patchwork Wed Oct 11 12:08:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732240 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 7D960CD6E5D for ; Wed, 11 Oct 2023 12:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346902AbjJKMOF (ORCPT ); Wed, 11 Oct 2023 08:14:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346949AbjJKMN7 (ORCPT ); Wed, 11 Oct 2023 08:13:59 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BF9138 for ; Wed, 11 Oct 2023 05:10:26 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50435ad51bbso8297711e87.2 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=RvyLKkSHRxQSa/UsBf1c/FdbMC2br1QCdPG1A4n+/Rm4ql/Kk+urs7bGchjO5bOOCh QR0JAeqc8MHvie4wV4mtjMWxANGolhhx2nuXrrfqz29qbktIckoiXyrgUZ2Z4Va37f7z AIqQF6yw3Fvxoicv4cwZLNVUDxvRj1nnX9uZnk1tWbzX6ttvhVuKEZwb4qBn5Y0BPWiV MwBMxhlilsreF1wn/GvVHEcA0kkb64WrU5BI+g2JJ3nr6rBf3yLz62kqvfy2qY1uPD25 D+PVaPXzuBNnHE+Y02v123ydduGiPScrvGIDB80UL618bdQEmDT/2aKOV4idtwRvLNmH OMGA== X-Gm-Message-State: AOJu0YwDbE4ugiC7fbsVrPMi3ekxAfJ63Nv5DKVKlD7SBigNes6+xOhD mROf7BBaNsva1gowJH9efrn7bw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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-as3722.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, unsigned offset, "GPIO_SIGNAL_OUT_REG update failed: %d\n", ret); } -static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned offset) -{ - 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 = { .free = gpiochip_generic_free, .get = as3722_gpio_get, .set = as3722_gpio_set, - .direction_input = as3722_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = as3722_gpio_direction_output, .to_irq = as3722_gpio_to_irq, .can_sleep = true, From patchwork Wed Oct 11 12:08:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732968 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 C67A8CD6E61 for ; Wed, 11 Oct 2023 12:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346791AbjJKMOH (ORCPT ); Wed, 11 Oct 2023 08:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346959AbjJKMOA (ORCPT ); Wed, 11 Oct 2023 08:14:00 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD1FBA for ; Wed, 11 Oct 2023 05:10:28 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50567477b29so8835789e87.3 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=MjKh417o0/0ZZQLySLXrHTlM3nNqIIdlVEN5ZU7qlQBLWe5g5FBvUf3F/3cQ695Sct 6mQaC5NPNJBzbGsOju2Ml5qp2ECaJ8at6yToThj1z0hOenp2I4beI0L9eyHH3mqddplb OkyqbDnZtMMDhUVyDHLPPcMfdTHla8nj1baSo4/L1DkJoB7zpWRLLv4eITnoDdP3UPj5 qzl+bkLd0Y4mo8oASLra8CpOfJoTqCqGQAWp/fcXxXGx237EIzgxKjkCLmBUPzQD+6+m Y9OPUCIEkgdnxlDjRDVtC8lPi5rTGVkt2Wa8rxGU3enNdwXCYCJhIHFKOfPCyWd1i1c8 uYiw== X-Gm-Message-State: AOJu0YyuYFDCi31CitN2BMDaVpEXyYL8il8sWjUQhAkXkPSVXacxtzXk 2ttHzA3HplEiS6r+lwDxNAJzlg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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-cy8c95x0.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_pinctrl *chip, int reg, return ret; } -static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int 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_pinctrl *chip) gc->request = gpiochip_generic_request; gc->free = gpiochip_generic_free; - gc->direction_input = cy8c95x0_gpio_direction_input; + gc->direction_input = pinctrl_gpio_direction_input; gc->direction_output = cy8c95x0_gpio_direction_output; gc->get = cy8c95x0_gpio_get_value; gc->set = cy8c95x0_gpio_set_value; From patchwork Wed Oct 11 12:08:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732243 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 36646CD6E60 for ; Wed, 11 Oct 2023 12:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346262AbjJKMMY (ORCPT ); Wed, 11 Oct 2023 08:12:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232155AbjJKMMU (ORCPT ); Wed, 11 Oct 2023 08:12:20 -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 2D9E5184 for ; Wed, 11 Oct 2023 05:10:28 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4066692ad35so63434055e9.1 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=YR9+tAn+oVuX925OLMhmFwwT195ilO7084xtZJD3WLH1+9sYvoLiAY7ZBeDwcP12np pS7uig8Y9csu6jsYJukMmQ10Epi3vzha/VqGYd+xUNJeq5+AYXjJZS/9c2E8UbeFNRFY oGk880ArI/9KaspvmWGCrepCX2R2d2vvOMCUqpv0/Dpj2i8RRSER2O08k4sl2qZrIptv H3HJLX0YBymUYWBVt7fQzK3GnjAQyCz3B6KOMGtqqBmT/0d71LUU+qxDjZd/SN7uhIop gmSdZtDRLeR02otoPWXxx1AZPRSEVJKtxBOSW+HXkvgAaHC+Mi2fE4Lwn8ghXCsbiYyA 4InA== X-Gm-Message-State: AOJu0YyF+wbcxXNEOjzHOxa8RXwenaTesRWSWZ4fd0jwTkh9hZQL1eY4 xiGEW1V17F5P7zIZKf9lJjE+Jw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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)); } -static int wmt_gpio_direction_input(struct gpio_chip *chip, unsigned offset) -{ - return pinctrl_gpio_direction_input(chip, offset); -} - static int wmt_gpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) { @@ -544,7 +539,7 @@ static const struct gpio_chip wmt_gpio_chip = { .request = gpiochip_generic_request, .free = gpiochip_generic_free, .get_direction = wmt_gpio_get_direction, - .direction_input = wmt_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = wmt_gpio_direction_output, .get = wmt_gpio_get_value, .set = wmt_gpio_set_value, From patchwork Wed Oct 11 12:08:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732961 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 7BB31CD6E62 for ; Wed, 11 Oct 2023 12:22:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346769AbjJKMWV (ORCPT ); Wed, 11 Oct 2023 08:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346883AbjJKMV5 (ORCPT ); Wed, 11 Oct 2023 08:21:57 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 787F31BD8 for ; Wed, 11 Oct 2023 05:10:30 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5046bf37daeso8853223e87.1 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=IvXwJuYI34xKY4nV0a+NfCJt18NMr5Obef2fjXLtkrh1G+7/4fQnsOmBJ8nKQDwZm9 jHXatLC2GMofcD7nc2LwrA/LofNoYHGqn2d8KJdPq/2WkDqp5wJMxELlkHWDoChw/2sV Sd//gLX1ymkcJmlMVGT7GOwWabTahCws2MpUsE2poe9die+sWZA70RV+C1jnEH1uGfTg Jch06mGnpWnVWnvXlrhi6PiGsHYR+0aMWXov1payiYxp9xBG1FrgwK9dkeuJh4Mgoen2 dWV1/vpfxCBUgDaX/OIZoeaTY2+68CBIXv5YThHPYNp6quVcdRNWUW9enZRMU/NNXpmg ueXA== X-Gm-Message-State: AOJu0YwdLoxaCD+4KCpoFNsSixCrUCRckaxWhjbPC12XUSAYt+z+j+sP W5uB/qMzZz8H1F3KFItebRnshLvJ4RSgnacgZos= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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-axp209.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; } -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 = gpiochip_get_data(chip); @@ -474,7 +469,7 @@ static int axp20x_pctl_probe(struct platform_device *pdev) pctl->chip.get = axp20x_gpio_get; pctl->chip.get_direction = axp20x_gpio_get_direction; pctl->chip.set = axp20x_gpio_set; - pctl->chip.direction_input = axp20x_gpio_input; + pctl->chip.direction_input = pinctrl_gpio_direction_input; pctl->chip.direction_output = axp20x_gpio_output; pctl->desc = of_device_get_match_data(dev); From patchwork Wed Oct 11 12:08:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732236 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 71431CD6E60 for ; Wed, 11 Oct 2023 12:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234961AbjJKMUl (ORCPT ); Wed, 11 Oct 2023 08:20:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234658AbjJKMUc (ORCPT ); Wed, 11 Oct 2023 08:20:32 -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 21F351BE2 for ; Wed, 11 Oct 2023 05:10:31 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-405417465aaso64894415e9.1 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=jTucYXnD9XpkyogAavdj3eH30zTxwtjp4/GNgaC+HRyWP6A2HPpGDd91rvqEsioL01 F0Cid0ov2oOXuus1qlyZARCYu9i7NYFhAQDzdfVn0lTWDuyVqva+psXpa0lRxRobU5GO F0sP1sRiErQYORk39Ia2gm6+QVpFIoY5ZArYgVdePqWpvqVax6p+aCzCUyMK5nYYRpmS gkxJ7CvsQZ+4m82xydiuNKPibccVL1uAhyXPLT83rqXOhHl2+uTyJDmzWGN/pG1jkwkY EMnDhXTkMZAIdwXQ5Hm8Vdo/WOl9zOU9Pq4qiTVXseNWKpd/QlpHWJ9qeRPPYuJ7HGEZ +BYg== X-Gm-Message-State: AOJu0Yx3jugNvRT2dQ1Smzhrdck4t/tER5sM1oQNIrUriXZSKpeEoAkN reEqCRGTJuMXyxnqRigl0ovLZQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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-rk805.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); } -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 = { .get_direction = rk805_gpio_get_direction, .get = rk805_gpio_get, .set = rk805_gpio_set, - .direction_input = rk805_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = rk805_gpio_direction_output, .can_sleep = true, .base = -1, From patchwork Wed Oct 11 12:08:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732231 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 C1F58CD6E63 for ; Wed, 11 Oct 2023 12:22:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346898AbjJKMWs (ORCPT ); Wed, 11 Oct 2023 08:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346901AbjJKMWT (ORCPT ); Wed, 11 Oct 2023 08:22:19 -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 9D1321BE4 for ; Wed, 11 Oct 2023 05:10:31 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-406650da82bso62491555e9.3 for ; Wed, 11 Oct 2023 05:10:31 -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=S8bLhjGL3crs9zFVjjH5evDMVF7XyLWWcTyV3FtC02AOPU+3HXwH8DgFUJrpmIPGs5 7T4up8XHAW/800rReCyinwY570yxHkFrpK5EmMYAzcXCWh1HeiuEtxsOL3uw8VwEhCqF NW7QnsVDa5UCiVMg52CDIq6du0rt48LVgRfs/wk+pLwaCerRZ/eMLasOrRuSK4Lb0l05 TwbfMf/+oDM8poYKF5atTwBmdaqnYNgM/XmDBbnrp0oJyr3g2kGvq8sU4RiG0XNXHUuz Wl9PIdkGCZnSIey2tH0BztgonDUXMAXX/2InZOXSZbDLVfgwspBFQVBWzugP3sY+pg/K qPVQ== X-Gm-Message-State: AOJu0Ywlyaxgq+Q29Yl9Vmh1m+IWwJsCVgX5n9iBjZBQgW698nzlszEU +mEEUwMfXcXvvV9inHt81T8qcA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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/mediatek/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, unsigned int gpio, int value) mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, !!value); } -static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio) -{ - 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 = hw->dev; chip->request = gpiochip_generic_request; chip->free = gpiochip_generic_free; - chip->direction_input = mtk_gpio_direction_input; + chip->direction_input = pinctrl_gpio_direction_input; chip->direction_output = mtk_gpio_direction_output; chip->get = mtk_gpio_get; chip->set = mtk_gpio_set; diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/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 = { .gpio_request_enable = mtk_pmx_gpio_request_enable, }; -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 = { .request = gpiochip_generic_request, .free = gpiochip_generic_free, .get_direction = mtk_gpio_get_direction, - .direction_input = mtk_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = mtk_gpio_direction_output, .get = mtk_gpio_get, .set = mtk_gpio_set, From patchwork Wed Oct 11 12:08:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732963 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 42751CD6E5D for ; Wed, 11 Oct 2023 12:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234997AbjJKMVg (ORCPT ); Wed, 11 Oct 2023 08:21:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232140AbjJKMUj (ORCPT ); Wed, 11 Oct 2023 08:20:39 -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 432341BF6 for ; Wed, 11 Oct 2023 05:10:33 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40666aa674fso63481245e9.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=ALhr5zck5IETfeK7sbOUUkrbM99ChMocqgBwxLIlTh51ymy8djMyuLVcDaZF6w/8qG W25k7ZgCAArbYUeMSHKW7Rn7dmYLIJb5Qp4Du519byvWUpypUcgwvx5XXCVhEeNYih2F CIpzcPO33ibGERrMjoI86DPcw/IL6n3H5GLYIcuUKwPJGh/K10s5/CI9TECGp9gHob2o pRKkM2/CWgN2npY9A7XFPW6bIcZ3vJLYvZ1wkN9uBYxcULSznyudmuiSozJNnf9TzIga ai3pxcWQ5IYHkw1mjEo5NH95JPB+WrIa8Efutq6F1IDEeLs7qWdG97KC2kjLm7ocFHdv 55IA== X-Gm-Message-State: AOJu0YxcDbL0sCjQC4Oezp4Pc0UYy5ZG++WHSLJXOFHrvCz9D/3BXJ5t hZYafn8D8whkeZFQpW15Y8Rvaw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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/cirrus/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, unsigned int offset, int va pm_runtime_put(priv->dev); } -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 *pdev) priv->gpio_chip.request = gpiochip_generic_request; priv->gpio_chip.free = gpiochip_generic_free; - priv->gpio_chip.direction_input = cs42l43_gpio_direction_in; + priv->gpio_chip.direction_input = pinctrl_gpio_direction_input; priv->gpio_chip.direction_output = cs42l43_gpio_direction_out; priv->gpio_chip.add_pin_ranges = cs42l43_gpio_add_pin_ranges; priv->gpio_chip.get = cs42l43_gpio_get; From patchwork Wed Oct 11 12:08:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732971 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 99B5FCD6E60 for ; Wed, 11 Oct 2023 12:12:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234947AbjJKMMT (ORCPT ); Wed, 11 Oct 2023 08:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234922AbjJKMMR (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 191D21FC0 for ; Wed, 11 Oct 2023 05:10:35 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-406619b53caso63180035e9.1 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=GRacVVGMy0hbHwMImRJ8iUO7ogtCHZYtbXtdbF/3U7RX//pL9GLI7qwa3eqKCSyI4n aemuyxbW/qg2ESYiA0E+7j82GDBc3gqOwHvb2Hp2zye+4vOHvQXSE0VZoT5Vek/bQzO1 fN0e2xp3URLm84iXAlhDaTUycGBZtM2HFEj62Y1UyAcPLWPE/C8XSAll2YwRDKY85Q38 FyNnPkmjIYG1i57SBTHHkuaM+frj7guZHttbjM5+jJtlCWi0p4agc7vjCbz9s633cwHw 15JW/UuaTS6SorGffDAT83NKC3wN6wxdPJzF3ZE/dV4R+upvicBakl5KND50FgySCAPf KS6Q== X-Gm-Message-State: AOJu0YwbyqrQa3z0knlVXsxM0Pn99hluyW8TSxpS7rOBYhRUKFxqbIR3 Bn8pPaJjmasGniY5JJFWvcBL3cZ3f0I5MQnnvOI= 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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-ocelot.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_chip *chip, return GPIO_LINE_DIRECTION_IN; } -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 = { .set = ocelot_gpio_set, .get = ocelot_gpio_get, .get_direction = ocelot_gpio_get_direction, - .direction_input = ocelot_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = ocelot_gpio_direction_output, .owner = THIS_MODULE, }; From patchwork Wed Oct 11 12:08:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732239 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 BFA9FCD6E60 for ; Wed, 11 Oct 2023 12:14:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346860AbjJKMOI (ORCPT ); Wed, 11 Oct 2023 08:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346857AbjJKMOA (ORCPT ); Wed, 11 Oct 2023 08:14:00 -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 B23501FD3 for ; Wed, 11 Oct 2023 05:10:38 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40566f8a093so62357115e9.3 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=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=EFUFfmwABC7oGuCRAMY34Fec74X6/DA4LkxEgVoeSKnK2jMu7kwFYKSncbdFQmRbrS QdM217BjFkftpMo9rfFFHaXj0MH6IrhomZi3y1DrUHdfa0RA68V06ymBv7He7KQul0F8 vuy22iAGAl3wP0a/Uz4bAuVUd+K+glcfT3CyUCXa80App2bj/jvekqWTUTli8gCZwUi/ AXfLkIMYOrc63Z5xLZ+ls50tpoaVzABYNOMYXsE7gOZgKkmKVrp7s+j1u3NahaEWZgK1 3LyEqdu0A6SxPVqEj91yuUFaTSloIi/BKC64JW6MgO7nRVZhDh1qWIrIgf3J1TU4B9Nr BYrA== X-Gm-Message-State: AOJu0YxHhvN7xIioign2hDFGsKRPt+xcSU/WZGL07g3M7fyr0V6gcubz r8iRKvzFVji4WPEHM1Sj87JoCg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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/pinctrl/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 = { .custom_conf_items = starfive_pinconf_custom_conf_items, }; -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 = container_of(gc, struct starfive_pinctrl, gc); @@ -1309,8 +1299,8 @@ static int starfive_probe(struct platform_device *pdev) sfp->gc.label = dev_name(dev); sfp->gc.owner = THIS_MODULE; - sfp->gc.request = starfive_gpio_request; - sfp->gc.free = starfive_gpio_free; + sfp->gc.request = pinctrl_gpio_request; + sfp->gc.free = pinctrl_gpio_free; sfp->gc.get_direction = starfive_gpio_get_direction; sfp->gc.direction_input = starfive_gpio_direction_input; sfp->gc.direction_output = starfive_gpio_direction_output; diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/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 = { .is_generic = true, }; -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) sfp->gc.label = dev_name(dev); sfp->gc.owner = THIS_MODULE; - sfp->gc.request = jh7110_gpio_request; - sfp->gc.free = jh7110_gpio_free; + sfp->gc.request = pinctrl_gpio_request; + sfp->gc.free = pinctrl_gpio_free; sfp->gc.get_direction = jh7110_gpio_get_direction; sfp->gc.direction_input = jh7110_gpio_direction_input; sfp->gc.direction_output = jh7110_gpio_direction_output; From patchwork Wed Oct 11 12:08:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732242 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 992A1CD6E5D for ; Wed, 11 Oct 2023 12:12:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343588AbjJKMMr (ORCPT ); Wed, 11 Oct 2023 08:12:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234952AbjJKMM2 (ORCPT ); Wed, 11 Oct 2023 08:12:28 -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 1EBA7189 for ; Wed, 11 Oct 2023 05:10:38 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40572aeb673so65241435e9.0 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=FhYr8xLFt0Hwv8lSRMw3dxPBKYNGU9KleJg3JjJafXHjgvLq1i4uy7Ud4HhjDbDDGa UuohL4kBhwMmbAafW/qLjdgxFO9N/BEjtBAd+sx7Hn0KzmC5+IMN7VDAzSFb+ywSoXsN FssfORpLXRgLaBwUxWFa2Ns1jNqf69XJMMdCLOVMY8ysG3lcCQQxBpIDEEeAgGCAfdLr +lOw4CICoCHKe1vhUzH2dtk//jItIm3luMJ1RlQD3KWqEhkVgo6PDBqDM2b5p3KKN/6q OvEk9HZXrcGl5RSpZWQiUT6E9yRE6y+AjMAccURl/pqbEJDlGJGJpyKP6clAZVVO1lmd z3jg== X-Gm-Message-State: AOJu0Yyy9QHxSF+r/Bs+eS+eJS03lUyj4WMmCC21kVG5zZsZXsqaFzCe zgQ9fn6WC4YC3FFX0gMFy+4n9w== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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); } -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 = gpiochip_get_data(chip); @@ -239,11 +234,6 @@ static void stm32_gpio_set(struct gpio_chip *chip, unsigned offset, int value) __stm32_gpio_set(bank, offset, value); } -static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned offset) -{ - 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_chip *chip, static const struct gpio_chip stm32_gpio_template = { .request = stm32_gpio_request, - .free = stm32_gpio_free, + .free = pinctrl_gpio_free, .get = stm32_gpio_get, .set = stm32_gpio_set, - .direction_input = stm32_gpio_direction_input, + .direction_input = pinctrl_gpio_direction_input, .direction_output = stm32_gpio_direction_output, .to_irq = stm32_gpio_to_irq, .get_direction = stm32_gpio_get_direction, @@ -381,7 +371,7 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data) struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); int ret; - ret = stm32_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq); + ret = pinctrl_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq); if (ret) return ret; From patchwork Wed Oct 11 12:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732232 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 AB6A5CD6E5D for ; Wed, 11 Oct 2023 12:22:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346929AbjJKMWa (ORCPT ); Wed, 11 Oct 2023 08:22:30 -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 S235036AbjJKMWK (ORCPT ); Wed, 11 Oct 2023 08:22:10 -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 891B91A4 for ; Wed, 11 Oct 2023 05:10:40 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4060b623e64so5630425e9.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=k6L34+Ppz3x1vXZN0+eocY6SBA8PUIN8o5FMJLx/jawFT9Jd3tcnNQmdwhoddEy6L2 +L5pJE8sMwdb7xKT695F77whutst0fKqSSYootHbaoguuZb65kz1EU2eh9HSV9fVWszr AQjawFcI4A5UVxzoemAqs21sGPQSmDVL7y6bJFzwZcJOXgubg3ozTaJEaT0XK9/gsg6X 4+HiIt46BMKral+1e5P6Qrwf0d/GV6EPiN6M6FXC7oZyy/FF+yfiCdFLZxc0vEVpFiPO D+6JGscsG3mJ/Vd7d6z8ZXazF7i5uGJPpUhpmcVyAp5GZ2d2wxjJt39g6PMdgyJptPKS TKsw== X-Gm-Message-State: AOJu0YyqxebxGYLCL9a0ZoBguO3LFmKAV3gWFOBw3yh1lu3c2ltsQ0UD UOMHLCWYJC95ydNtFOm5P17T0A== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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/nuvoton/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 *chip, unsigned int offset) return bank->request(chip, 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(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 *pctrl) pctrl->gpio_bank[id].gc.direction_output = npcmgpio_direction_output; pctrl->gpio_bank[id].request = pctrl->gpio_bank[id].gc.request; pctrl->gpio_bank[id].gc.request = npcmgpio_gpio_request; - pctrl->gpio_bank[id].gc.free = npcmgpio_gpio_free; + pctrl->gpio_bank[id].gc.free = pinctrl_gpio_free; id++; } diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/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 *chip, unsigned int offset) return bank->request(chip, offset); } -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 *pctrl) pctrl->gpio_bank[id].gc.direction_output = npcmgpio_direction_output; pctrl->gpio_bank[id].request = pctrl->gpio_bank[id].gc.request; pctrl->gpio_bank[id].gc.request = npcmgpio_gpio_request; - pctrl->gpio_bank[id].gc.free = npcmgpio_gpio_free; + pctrl->gpio_bank[id].gc.free = pinctrl_gpio_free; for (i = 0 ; i < NPCM8XX_DEBOUNCE_MAX ; i++) pctrl->gpio_bank[id].debounce.set_val[i] = false; pctrl->gpio_bank[id].gc.add_pin_ranges = npcmgpio_add_pin_ranges; From patchwork Wed Oct 11 12:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732970 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 1C31ECD6E61 for ; Wed, 11 Oct 2023 12:12:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234946AbjJKMMo (ORCPT ); Wed, 11 Oct 2023 08:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234957AbjJKMMV (ORCPT ); Wed, 11 Oct 2023 08:12:21 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E730B1FD9 for ; Wed, 11 Oct 2023 05:10:40 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-32157c8e4c7so6642843f8f.1 for ; Wed, 11 Oct 2023 05:10:40 -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=l552n1PLA/tfreadxRw5CdqcZR3cDJHYyiRKKNdFwtHCS6RqdB3EJN7YLwvfjAyXyq G6eRWYSqmutedRxGO7+c/nIPWRSA3HwitMlMPGuPxz/g9yuKeeLnndSsN1SFtObloaoM uDZYM9YTjrw95YNTRE2ib4+/eGJn9ECYP2b8BK/YYD9qDfxaUxLTKuVqlg8WQ9T45Hki E8dhpmp6p67TIXZNScA5Y6DZ2Sxi8MfuY/0IukWCuwXncamoo0ENcc6cyiBQtlsovoAI KWx5gehosMjYvFYgJnSN/oe1gJWdUDviFqeDquVd+2hkvI7j9MkJWQPnKtBeeP3hpE2v lXzw== X-Gm-Message-State: AOJu0YyrSvy8BYE+8C36Hd2fnZC4QP9yT0c5lBOMKowokf0gK5Mi4ezI rbN39YUMWRlsfEq88CeIyTEz8Q== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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, unsigned offset) return irq_create_mapping(gpio_to_priv(chip)->irq_domain, offset); } -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 = em_gio_direction_output; gpio_chip->set = em_gio_set; gpio_chip->to_irq = em_gio_to_irq; - gpio_chip->request = em_gio_request; + gpio_chip->request = pinctrl_gpio_request; gpio_chip->free = em_gio_free; gpio_chip->label = name; gpio_chip->parent = dev; From patchwork Wed Oct 11 12:08:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 732956 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 25D34CD6E5D for ; Wed, 11 Oct 2023 12:23:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346882AbjJKMX2 (ORCPT ); Wed, 11 Oct 2023 08:23:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346954AbjJKMXB (ORCPT ); Wed, 11 Oct 2023 08:23:01 -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 DCDCE1FE9 for ; Wed, 11 Oct 2023 05:10:42 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40572aeb6d0so63421065e9.1 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=mkhltnbxeDfvZUveOF8YaNX9Qyzg9cbD9D1POJQbuqCyBoPmLtFRtJpU3YP91GdfUL yoAdfFo4Y+WESINQrEwd/t8hIvMyTK9Ahlb4g4b8AwTGKswmf9h+u+DO9JD6VeYD3+Ww lj2RHgDMkzBKcqGrUmd82vSQlPaIChbtJ6cOvoMnjPiUOCr5+x8cwiFaFfeyhmF4WgbH KNY4uZXgrWhg3ywPnu8wd/xIs2tbffl2+3dN+GGAuXyygrMgG6LZegu+HnRAvQ+KcAfW BroWWMDod9VmFDirI1GeRD7cCThUA79pB0KANcvEMGXmHVbYT3E3R02mUJNXfd1aVsqD B1SQ== X-Gm-Message-State: AOJu0YwnLdAsAV5iJA72CH5gl3Y85aR3bwXuOiUU0ADHiqmJmSnGPR7h t/VnsFSNZgJaneBk7F5F9HwuVQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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); } -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 = gpiochip_get_data(chip); @@ -717,7 +712,7 @@ static int tegra_gpio_probe(struct platform_device *pdev) } tgi->gc.label = "tegra-gpio"; - tgi->gc.request = tegra_gpio_request; + tgi->gc.request = pinctrl_gpio_request; tgi->gc.free = tegra_gpio_free; tgi->gc.direction_input = tegra_gpio_direction_input; tgi->gc.get = tegra_gpio_get;