Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Niranjan H Y <niranjan.hy@ti.com>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	 linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	lee@kernel.org, linusw@kernel.org,  lgirdwood@gmail.com,
	broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
	 robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	nb@tipi-net.de,  navada@ti.com, v-hampiholi@ti.com,
	sandeepk@ti.com, baojun.xu@ti.com,  shenghao-ding@ti.com
Subject: Re: [PATCH v1 6/8] pinctrl: pinctrl-tac5x1x: Add TI TAC5x1x pinctrl driver
Date: Sat, 14 Mar 2026 11:11:41 +0100	[thread overview]
Message-ID: <20260314-radical-dazzling-mantis-13cbb0@quoll> (raw)
In-Reply-To: <20260312184833.263-7-niranjan.hy@ti.com>

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@ti.com>
> ---
>  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


  reply	other threads:[~2026-03-14 10:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 18:48 [PATCH v1 0/8] ASoC: support TI's TAC5x1x audio codec family Niranjan H Y
2026-03-12 18:48 ` [PATCH v1 1/8] dt-bindings: mfd: Add bindings for TI TAC5x1x MFD core Niranjan H Y
2026-03-13 20:43   ` Rob Herring
2026-03-14 10:13   ` Krzysztof Kozlowski
2026-03-12 18:48 ` [PATCH v1 2/8] dt-bindings: pinctrl: Add bindings for TI TAC5x1x pinctrl Niranjan H Y
2026-03-14 10:10   ` Krzysztof Kozlowski
2026-03-14 10:12   ` Krzysztof Kozlowski
2026-03-12 18:48 ` [PATCH v1 3/8] dt-bindings: sound: Add bindings for TI TAC5x1x codec Niranjan H Y
2026-03-14 10:14   ` Krzysztof Kozlowski
2026-03-12 18:48 ` [PATCH v1 4/8] dt-bindings: sound: Update ti,pcm6240.yaml to remove TAC5x1x family Niranjan H Y
2026-03-14 10:15   ` Krzysztof Kozlowski
2026-03-12 18:48 ` [PATCH v1 5/8] mfd: tac5x1x: Add TI TAC5x1x MFD core driver Niranjan H Y
2026-03-14 10:20   ` Krzysztof Kozlowski
2026-03-12 18:48 ` [PATCH v1 6/8] pinctrl: pinctrl-tac5x1x: Add TI TAC5x1x pinctrl driver Niranjan H Y
2026-03-14 10:11   ` Krzysztof Kozlowski [this message]
2026-03-12 18:48 ` [PATCH v1 7/8] ASoC: tac5x1x: Add TI TAC5x1x codec driver Niranjan H Y
2026-03-12 19:56   ` Mark Brown
2026-03-12 18:48 ` [PATCH v1 8/8] ASoC: pcm6240: remove support for taac5x1x family Niranjan H Y

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260314-radical-dazzling-mantis-13cbb0@quoll \
    --to=krzk@kernel.org \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=navada@ti.com \
    --cc=nb@tipi-net.de \
    --cc=niranjan.hy@ti.com \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=sandeepk@ti.com \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.com \
    --cc=v-hampiholi@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox