diff mbox series

pinctrl: core: comment that pinctrl_add_gpio_range() is deprecated

Message ID 533a7a10-c6eb-4ebe-adf1-f8dc95ae8d33@moroto.mountain
State New
Headers show
Series pinctrl: core: comment that pinctrl_add_gpio_range() is deprecated | expand

Commit Message

Dan Carpenter March 4, 2024, 7:05 a.m. UTC
The pinctrl_add_gpio_range() function is deprecated add a comment so
people don't accidentally use it in new code.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/pinctrl/core.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Linus Walleij March 5, 2024, 10:31 p.m. UTC | #1
On Mon, Mar 4, 2024 at 8:05 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:

> The pinctrl_add_gpio_range() function is deprecated add a comment so
> people don't accidentally use it in new code.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Thanks Dan,
patch applied!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index ee56856cb80c..2d4412795ea4 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -412,6 +412,10 @@  static int pinctrl_get_device_gpio_range(struct gpio_chip *gc,
  * @pctldev: pin controller device to add the range to
  * @range: the GPIO range to add
  *
+ * DEPRECATED: Don't use this function in new code.  See section 2 of
+ * Documentation/devicetree/bindings/gpio/gpio.txt on how to bind pinctrl and
+ * gpio drivers.
+ *
  * This adds a range of GPIOs to be handled by a certain pin controller. Call
  * this to register handled ranges after registering your pin controller.
  */