Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Shree Ramamoorthy <s-ramamoorthy@ti.com>, <aaro.koskinen@iki.fi>,
	<andreas@kemnade.info>, <khilman@baylibre.com>,
	<rogerq@kernel.org>, <tony@atomide.com>,
	<linus.walleij@linaro.org>, <brgl@bgdev.pl>,
	<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-gpio@vger.kernel.org>
Cc: <m-leonard@ti.com>, <praneeth@ti.com>
Subject: Re: [PATCH v4 1/3] gpio: tps65219: Add TPS65215 to platform_device_id table
Date: Fri, 25 Apr 2025 17:47:09 -0500	[thread overview]
Message-ID: <313daa6d-c108-44d6-94b7-3b1005e2081c@ti.com> (raw)
In-Reply-To: <20250425203315.71497-2-s-ramamoorthy@ti.com>

On 4/25/25 3:33 PM, Shree Ramamoorthy wrote:
> Add platform_device_id struct and use the platform_get_device_id() output
> to match which PMIC device is in use. With new name options, the gpio_chip
> .label field is now assigned to the platform_device name match.
> 
> Remove MODULE_ALIAS since it is now generated by MODULE_DEVICE_TABLE.
> 
> Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
> ---
>   drivers/gpio/gpio-tps65219.c | 17 ++++++++++++-----
>   1 file changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-tps65219.c b/drivers/gpio/gpio-tps65219.c
> index 526640c39a11..996f8deaf03d 100644
> --- a/drivers/gpio/gpio-tps65219.c
> +++ b/drivers/gpio/gpio-tps65219.c
> @@ -1,8 +1,8 @@
>   // SPDX-License-Identifier: GPL-2.0
>   /*
> - * GPIO driver for TI TPS65219 PMICs
> + * GPIO driver for TI TPS65215/TPS65219 PMICs
>    *
> - * Copyright (C) 2022 Texas Instruments Incorporated - http://www.ti.com/
> + * Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
>    */
>   
>   #include <linux/bits.h>
> @@ -141,7 +141,6 @@ static int tps65219_gpio_direction_output(struct gpio_chip *gc, unsigned int off
>   }
>   
>   static const struct gpio_chip tps65219_template_chip = {
> -	.label			= "tps65219-gpio",
>   	.owner			= THIS_MODULE,
>   	.get_direction		= tps65219_gpio_get_direction,
>   	.direction_input	= tps65219_gpio_direction_input,
> @@ -164,20 +163,28 @@ static int tps65219_gpio_probe(struct platform_device *pdev)
>   
>   	gpio->tps = tps;
>   	gpio->gpio_chip = tps65219_template_chip;
> +	gpio->gpio_chip.label = dev_name(&pdev->dev);
>   	gpio->gpio_chip.parent = tps->dev;
>   
>   	return devm_gpiochip_add_data(&pdev->dev, &gpio->gpio_chip, gpio);
>   }
>   
> +static const struct platform_device_id tps6521x_gpio_id_table[] = {
> +	{ "tps65215-gpio", TPS65215 },

I would have added this TPS65215 item to this table in patch [3/3]
where it is first used, but that's nitpicking,

Reviewed-by: Andrew Davis <afd@ti.com>

> +	{ "tps65219-gpio", TPS65219 },
> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(platform, tps6521x_gpio_id_table);
> +
>   static struct platform_driver tps65219_gpio_driver = {
>   	.driver = {
>   		.name = "tps65219-gpio",
>   	},
>   	.probe = tps65219_gpio_probe,
> +	.id_table = tps6521x_gpio_id_table,
>   };
>   module_platform_driver(tps65219_gpio_driver);
>   
> -MODULE_ALIAS("platform:tps65219-gpio");
>   MODULE_AUTHOR("Jonathan Cormier <jcormier@criticallink.com>");
> -MODULE_DESCRIPTION("TPS65219 GPIO driver");
> +MODULE_DESCRIPTION("TPS65215/TPS65219 GPIO driver");
>   MODULE_LICENSE("GPL");

  reply	other threads:[~2025-04-25 22:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 20:33 [PATCH v4 0/3] Add TI TPS65215 PMIC GPIO Support Shree Ramamoorthy
2025-04-25 20:33 ` [PATCH v4 1/3] gpio: tps65219: Add TPS65215 to platform_device_id table Shree Ramamoorthy
2025-04-25 22:47   ` Andrew Davis [this message]
2025-04-25 20:33 ` [PATCH v4 2/3] gpio: tps65219: Update GPIO0_IDX macro prefix Shree Ramamoorthy
2025-04-25 20:33 ` [PATCH v4 3/3] gpio: tps65219: Add support for varying gpio/offset values Shree Ramamoorthy
2025-04-28 16:41   ` Jonathan Cormier
2025-04-29 13:17     ` Jon Cormier
2025-04-29 16:42     ` Shree Ramamoorthy
2025-04-29 19:25       ` Jon Cormier

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=313daa6d-c108-44d6-94b7-3b1005e2081c@ti.com \
    --to=afd@ti.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=andreas@kemnade.info \
    --cc=brgl@bgdev.pl \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-leonard@ti.com \
    --cc=praneeth@ti.com \
    --cc=rogerq@kernel.org \
    --cc=s-ramamoorthy@ti.com \
    --cc=tony@atomide.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