linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Matt Ranostay <mranostay@ti.com>,
	brgl@bgdev.pl, lee@kernel.org, linus.walleij@linaro.org,
	kristo@kernel.org, alexandre.belloni@bootlin.com,
	a.zummo@towertech.it, krzysztof.kozlowski+dt@linaro.org,
	robh@kernel.org, vigneshr@ti.com
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-rtc@vger.kernel.org, linux-gpio@vger.kernel.org,
	Keerthy <j-keerthy@ti.com>
Subject: Re: [PATCH v3 4/7] gpio: tps6594x: add GPIO support for TPS6594x PMIC
Date: Wed, 9 Nov 2022 09:50:38 +0100	[thread overview]
Message-ID: <b0153383-0bc4-aeda-6df4-c76d682d4cfc@linaro.org> (raw)
In-Reply-To: <20221109065546.24912-5-mranostay@ti.com>

On 09/11/2022 07:55, Matt Ranostay wrote:
> Add support for TPS6594X PMICs GPIO interface that has 11 that can be
> configured as input or outputs.
> 
> Tested-by: Keerthy <j-keerthy@ti.com>
> Signed-off-by: Matt Ranostay <mranostay@ti.com>
> ---
>  drivers/gpio/Kconfig         |   7 ++
>  drivers/gpio/Makefile        |   1 +
>  drivers/gpio/gpio-tps6594x.c | 142 +++++++++++++++++++++++++++++++++++
>  include/linux/mfd/tps6594x.h |   6 ++
>  4 files changed, 156 insertions(+)
>  create mode 100644 drivers/gpio/gpio-tps6594x.c
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 8c756cb29214..0225e6bddf0a 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -1405,6 +1405,13 @@ config GPIO_TPS65912
>  	help
>  	  This driver supports TPS65912 GPIO chip.
>  
> +config GPIO_TPS6594X
> +	tristate "TI TPS6594X GPIO driver"
> +	depends on MFD_TPS6594X

Maybe || COMPILE_TEST?

> +	help
> +	  Select this option to enable GPIO driver for the TPS6954X
> +	  PMIC chip family. There are 11 GPIOs that can be configured.
> +

(...)

> +
> +static int tps6594x_gpio_probe(struct platform_device *pdev)
> +{
> +	struct tps6594x *tps = dev_get_drvdata(pdev->dev.parent);
> +	struct tps6594x_gpio *gpio;
> +
> +	gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);

and here you did it correctly... I don't get why your two patches differ.

> +	if (!gpio)
> +		return -ENOMEM;
> +
> +	gpio->tps = dev_get_drvdata(pdev->dev.parent);
> +	gpio->gpio_chip = template_chip;
> +	gpio->gpio_chip.parent = tps->dev;
> +
> +	return devm_gpiochip_add_data(&pdev->dev, &gpio->gpio_chip, gpio);
> +}
> +
> +static const struct of_device_id of_tps6594x_gpio_match[] = {
> +	{ .compatible = "ti,tps6594x-gpio", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, of_tps6594x_gpio_match);
> +
> +static struct platform_driver tps6594x_gpio_driver = {
> +	.driver = {
> +		.name = "tps6594x-gpio",
> +		.of_match_table = of_match_ptr(of_tps6594x_gpio_match),

Drop of_match_ptr(). It comes with maybe_unused, which you do not have here.

Best regards,
Krzysztof


  reply	other threads:[~2022-11-09  8:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  6:55 [PATCH v3 0/7] mfd: add tps6594x support for Jacinto platforms Matt Ranostay
2022-11-09  6:55 ` [PATCH v3 1/7] Documentation: tps6594x: Add DT bindings for the TPS6594x PMIC Matt Ranostay
2022-11-09  8:46   ` Krzysztof Kozlowski
2022-11-09  6:55 ` [PATCH v3 2/7] MFD: TPS6594x: Add new PMIC device driver for TPS6594x chips Matt Ranostay
2022-11-09  8:52   ` Krzysztof Kozlowski
2022-11-09  6:55 ` [PATCH v3 3/7] rtc: rtc-tps6594x: Add support for TPS6594X PMIC RTC Matt Ranostay
2022-11-09  8:49   ` Krzysztof Kozlowski
2022-11-14 20:48   ` Alexandre Belloni
2022-11-09  6:55 ` [PATCH v3 4/7] gpio: tps6594x: add GPIO support for TPS6594x PMIC Matt Ranostay
2022-11-09  8:50   ` Krzysztof Kozlowski [this message]
2022-11-09  9:59   ` Linus Walleij
2022-11-10 10:12     ` Matt Ranostay
2022-11-10 10:15       ` Linus Walleij
2022-11-11  8:58         ` Matt Ranostay
2022-11-16  7:31           ` Michael Walle
2022-11-09  6:55 ` [PATCH v3 5/7] arm64: dts: ti: k3-j7200-common-proc-board: Add TPS6594x PMIC node Matt Ranostay
2022-11-09  8:52   ` Krzysztof Kozlowski
2022-11-09  6:55 ` [PATCH v3 6/7] arm64: dts: ti: k3-j721e-common-proc-board: " Matt Ranostay
2022-11-09  8:52   ` Krzysztof Kozlowski
2022-11-09  6:55 ` [PATCH v3 7/7] arm64: dts: ti: k3-j721s2-common-proc-board: " Matt Ranostay
2022-11-09  8:52   ` Krzysztof Kozlowski

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=b0153383-0bc4-aeda-6df4-c76d682d4cfc@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mranostay@ti.com \
    --cc=robh@kernel.org \
    --cc=vigneshr@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;
as well as URLs for NNTP newsgroup(s).