Re: [PATCH v3 1/4] mfd: timberdale: move GPIO_NR_PINS into the driver

Lee Jones
2026-04-09T12:51:37Z

On Fri, 27 Mar 2026, Bartosz Golaszewski wrote:

> This symbol is only used inside the timberdale MFD driver. Move into
> the .c file as there's no need for it to be exposed in a header.

I'd prefer that these were all kept together, even if we are over-sharing.

> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> ---
> drivers/mfd/timberdale.c | 2 ++
> drivers/mfd/timberdale.h | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
> index a4d9c070d481a182890a58e4b8c850c4c29f7f17..d79419215cc292b705031a6432e877b94f9a1805 100644
> --- a/drivers/mfd/timberdale.c
> +++ b/drivers/mfd/timberdale.c
> @@ -37,6 +37,8 @@
>
> #define DRIVER_NAME "timberdale"
>
> +#define GPIO_NR_PINS 16
> +
> struct timberdale_device {
> resource_size_t ctl_mapbase;
> unsigned char __iomem *ctl_membase;
> diff --git a/drivers/mfd/timberdale.h b/drivers/mfd/timberdale.h
> index b01d2388e1afe59e14f77e10678bdbe599d2b90f..db7b434f766d03deb7c45ec1c8c5ded003aad087 100644
> --- a/drivers/mfd/timberdale.h
> +++ b/drivers/mfd/timberdale.h
> @@ -113,7 +113,6 @@
> #define GPIO_PIN_ASCB 8
> #define GPIO_PIN_INIC_RST 14
> #define GPIO_PIN_BT_RST 15
> -#define GPIO_NR_PINS 16
>
> /* DMA Channels */
> #define DMA_UART_RX 0
>
> --
> 2.47.3
>

--
Lee Jones [李琼斯]