All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Alexandre Courbot <acourbot@nvidia.com>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH] gpio: tc3589x: get rid of platform data
Date: Mon, 15 Dec 2014 09:59:50 +0000	[thread overview]
Message-ID: <20141215095950.GC7972@x1> (raw)
In-Reply-To: <1418636522-21296-1-git-send-email-linus.walleij@linaro.org>

On Mon, 15 Dec 2014, Linus Walleij wrote:

> This device is only used from the device tree, and the startup()
> and remove() callbacks are not used anywhere in the kernel, so
> retire them and the pdata altogether.
> 
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> MFD folks: this only considers GPIO but touches your include
> file, please ACK this so I can take it through the GPIO tree.
> ---
>  drivers/gpio/gpio-tc3589x.c | 15 ++-------------
>  include/linux/mfd/tc3589x.h | 12 ------------
>  2 files changed, 2 insertions(+), 25 deletions(-)

Looks fine.

Acked-by: Lee Jones <lee.jones@linaro.org>

> diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c
> index abdcf58935f5..11aed2671065 100644
> --- a/drivers/gpio/gpio-tc3589x.c
> +++ b/drivers/gpio/gpio-tc3589x.c
> @@ -232,16 +232,13 @@ static irqreturn_t tc3589x_gpio_irq(int irq, void *dev)
>  static int tc3589x_gpio_probe(struct platform_device *pdev)
>  {
>  	struct tc3589x *tc3589x = dev_get_drvdata(pdev->dev.parent);
> -	struct tc3589x_gpio_platform_data *pdata;
>  	struct device_node *np = pdev->dev.of_node;
>  	struct tc3589x_gpio *tc3589x_gpio;
>  	int ret;
>  	int irq;
>  
> -	pdata = tc3589x->pdata->gpio;
> -
> -	if (!(pdata || np)) {
> -		dev_err(&pdev->dev, "No platform data or Device Tree found\n");
> +	if (!np) {
> +		dev_err(&pdev->dev, "No Device Tree node found\n");
>  		return -EINVAL;
>  	}
>  
> @@ -305,9 +302,6 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
>  				     irq,
>  				     NULL);
>  
> -	if (pdata && pdata->setup)
> -		pdata->setup(tc3589x, tc3589x_gpio->chip.base);
> -
>  	platform_set_drvdata(pdev, tc3589x_gpio);
>  
>  	return 0;
> @@ -316,11 +310,6 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
>  static int tc3589x_gpio_remove(struct platform_device *pdev)
>  {
>  	struct tc3589x_gpio *tc3589x_gpio = platform_get_drvdata(pdev);
> -	struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
> -	struct tc3589x_gpio_platform_data *pdata = tc3589x->pdata->gpio;
> -
> -	if (pdata && pdata->remove)
> -		pdata->remove(tc3589x, tc3589x_gpio->chip.base);
>  
>  	gpiochip_remove(&tc3589x_gpio->chip);
>  
> diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h
> index e1c12d84c26a..c203c9c56776 100644
> --- a/include/linux/mfd/tc3589x.h
> +++ b/include/linux/mfd/tc3589x.h
> @@ -163,24 +163,12 @@ struct tc3589x_keypad_platform_data {
>  };
>  
>  /**
> - * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data
> - * @setup: callback for board-specific initialization
> - * @remove: callback for board-specific teardown
> - */
> -struct tc3589x_gpio_platform_data {
> -	void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base);
> -	void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base);
> -};
> -
> -/**
>   * struct tc3589x_platform_data - TC3589x platform data
>   * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*)
> - * @gpio: GPIO-specific platform data
>   * @keypad: keypad-specific platform data
>   */
>  struct tc3589x_platform_data {
>  	unsigned int block;
> -	struct tc3589x_gpio_platform_data *gpio;
>  	const struct tc3589x_keypad_platform_data *keypad;
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2014-12-15  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15  9:42 [PATCH] gpio: tc3589x: get rid of platform data Linus Walleij
2014-12-15  9:59 ` Lee Jones [this message]

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=20141215095950.GC7972@x1 \
    --to=lee.jones@linaro.org \
    --cc=acourbot@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sameo@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.