Re: [PATCH v1 6/8] pinctrl: pinctrl-tac5x1x: Add TI TAC5x1x pinctrl driver
From: Krzysztof Kozlowski
Date: Sat Mar 14 2026 - 06:11:53 EST
On Fri, Mar 13, 2026 at 12:18:31AM +0530, Niranjan H Y wrote:
> Add the Texas Instruments TAC5x1x pin controller driver. This driver
> provides GPIO control for 5 configurable pins (GPIO1, GPIO2, GPO1, GPI1,
> GPI2A) with support for GPIO, PDM, and IRQ functions.
>
> The pinctrl driver handles:
> - GPIO input/output operations
> - Pin multiplexing between GPIO, PDM, and IRQ functions
>
> Signed-off-by: Niranjan H Y <niranjan.hy@xxxxxx>
> ---
> drivers/pinctrl/Kconfig | 11 +
> drivers/pinctrl/Makefile | 1 +
> drivers/pinctrl/pinctrl-tac5x1x.c | 889 ++++++++++++++++++++++++++++++
> 3 files changed, 901 insertions(+)
> create mode 100644 drivers/pinctrl/pinctrl-tac5x1x.c
>
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index afecd9407f53..2054e9998880 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -585,6 +585,17 @@ config PINCTRL_SX150X
> - 8 bits: sx1508q, sx1502q
> - 16 bits: sx1509q, sx1506q
>
> +config PINCTRL_TI_TAC5X1X
> + tristate "TAC5X1X pin control driver"
> + depends on OF && (MFD_TAC5X1X || COMPILE_TEST)
> + select GENERIC_PINCTRL_GROUPS
> + select GENERIC_PINMUX_FUNCTIONS
> + select GENERIC_PINCONF
> + help
> + TAC5X1X family may have 1 or more configurable GPIO pins
> + which can be grouped and configured to function as PDM, GPIOs
> + or interrupt outputs.
> +
> config PINCTRL_TB10X
> bool "Pinctrl for TB10X" if COMPILE_TEST
> depends on OF && ARC_PLAT_TB10X || COMPILE_TEST
> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
> index f7d5d5f76d0c..1fe6b0e8a666 100644
> --- a/drivers/pinctrl/Makefile
> +++ b/drivers/pinctrl/Makefile
> @@ -58,6 +58,7 @@ obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o
> obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o
> obj-$(CONFIG_PINCTRL_STMFX) += pinctrl-stmfx.o
> obj-$(CONFIG_PINCTRL_SX150X) += pinctrl-sx150x.o
> +obj-$(CONFIG_PINCTRL_TI_TAC5X1X)+= pinctrl-tac5x1x.o
> obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o
> obj-$(CONFIG_PINCTRL_TPS6594) += pinctrl-tps6594.o
> obj-$(CONFIG_PINCTRL_TH1520) += pinctrl-th1520.o
> diff --git a/drivers/pinctrl/pinctrl-tac5x1x.c b/drivers/pinctrl/pinctrl-tac5x1x.c
> new file mode 100644
> index 000000000000..4e59501f3f78
> --- /dev/null
> +++ b/drivers/pinctrl/pinctrl-tac5x1x.c
> @@ -0,0 +1,889 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * TAC5X1X Pinctrl and GPIO driver
> + *
> + * Copyright (C) 2023-2025 Texas Instruments Incorporated - https://www.ti.com
> + */
> +
> +#include <linux/array_size.h>
> +#include <linux/bits.h>
> +#include <linux/bitfield.h>
> +#include <linux/build_bug.h>
> +#include <linux/err.h>
> +#include <linux/gpio/driver.h>
> +#include <linux/mfd/tac5x1x/registers.h>
> +#include <linux/mfd/tac5x1x/core.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/regmap.h>
> +#include <linux/string_choices.h>
> +
> +#include <linux/pinctrl/consumer.h>
> +#include <linux/pinctrl/pinctrl.h>
> +#include <linux/pinctrl/pinconf.h>
> +#include <linux/pinctrl/pinconf-generic.h>
> +#include <linux/pinctrl/pinmux.h>
So where is the include for bindings? How do you use them if you claim
these are bindings?
> +
> +#include "pinctrl-utils.h"
> +
> +/* 2 pins can be gpio */
> +#define TAC5X1X_NUM_GPIO_PINS 5
> +#define TAC5X1X_MAX_PINS 5
...
> +
> +static const struct platform_device_id tac5x1x_pin_id_table[] = {
> + { "tac5x1x-pinctrl", },
> + {}
> +};
> +MODULE_DEVICE_TABLE(platform, tac5x1x_pin_id_table);
> +
> +static struct platform_driver tac5x1x_pin_driver = {
> + .driver = {
> + .name = "tac5x1x-pinctrl",
> + },
> + .probe = tac5x1x_pin_probe,
> + .id_table = tac5x1x_pin_id_table,
What is the point of compatible which is not used. That's another
completely unused thing from your bindings.
Best regards,
Krzysztof