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: Samuel Ortiz <sameo@linux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org
Subject: Re: [PATCH 2/2] mfd: tc3589x: enforce device-tree only mode
Date: Fri, 20 Mar 2015 08:21:58 +0000	[thread overview]
Message-ID: <20150320082158.GD3318@x1> (raw)
In-Reply-To: <1426776765-18812-3-git-send-email-linus.walleij@linaro.org>

On Thu, 19 Mar 2015, Linus Walleij wrote:

> All systems using the TC3589x multifunction expander uses
> devicetree, so don't clutter the place with a lot of
> and assume it is there.
> 
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

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

> ---
>  drivers/gpio/Kconfig                    | 1 +
>  drivers/gpio/gpio-tc3589x.c             | 3 ---
>  drivers/input/keyboard/tc3589x-keypad.c | 9 ---------
>  drivers/mfd/Kconfig                     | 1 +
>  drivers/mfd/tc3589x.c                   | 9 ---------
>  5 files changed, 2 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index c1e2ca3d9a51..dc1aaa83a347 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -669,6 +669,7 @@ config GPIO_STP_XWAY
>  config GPIO_TC3589X
>  	bool "TC3589X GPIOs"
>  	depends on MFD_TC3589X
> +	depends on OF_GPIO
>  	select GPIOLIB_IRQCHIP
>  	help
>  	  This enables support for the GPIOs found on the TC3589X
> diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c
> index 11aed2671065..31b244cffabb 100644
> --- a/drivers/gpio/gpio-tc3589x.c
> +++ b/drivers/gpio/gpio-tc3589x.c
> @@ -260,10 +260,7 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
>  	tc3589x_gpio->chip.ngpio = tc3589x->num_gpio;
>  	tc3589x_gpio->chip.dev = &pdev->dev;
>  	tc3589x_gpio->chip.base = -1;
> -
> -#ifdef CONFIG_OF_GPIO
>  	tc3589x_gpio->chip.of_node = np;
> -#endif
>  
>  	/* Bring the GPIO module out of reset */
>  	ret = tc3589x_set_bits(tc3589x, TC3589x_RSTCTRL,
> diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c
> index 0ccc7de9b59d..08e62e6aeb1b 100644
> --- a/drivers/input/keyboard/tc3589x-keypad.c
> +++ b/drivers/input/keyboard/tc3589x-keypad.c
> @@ -318,7 +318,6 @@ static void tc3589x_keypad_close(struct input_dev *input)
>  	tc3589x_keypad_disable(keypad);
>  }
>  
> -#ifdef CONFIG_OF
>  static const struct tc3589x_keypad_platform_data *
>  tc3589x_keypad_of_probe(struct device *dev)
>  {
> @@ -368,14 +367,6 @@ tc3589x_keypad_of_probe(struct device *dev)
>  
>  	return plat;
>  }
> -#else
> -static inline const struct tc3589x_keypad_platform_data *
> -tc3589x_keypad_of_probe(struct device *dev)
> -{
> -	return ERR_PTR(-ENODEV);
> -}
> -#endif
> -
>  
>  static int tc3589x_keypad_probe(struct platform_device *pdev)
>  {
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 38356e39adba..476e63745742 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1210,6 +1210,7 @@ config MFD_TIMBERDALE
>  config MFD_TC3589X
>  	bool "Toshiba TC35892 and variants"
>  	depends on I2C=y
> +	depends on OF
>  	select MFD_CORE
>  	help
>  	  Support for the Toshiba TC35892 and variants I/O Expander.
> diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
> index aacb3720065c..cf356395c9e9 100644
> --- a/drivers/mfd/tc3589x.c
> +++ b/drivers/mfd/tc3589x.c
> @@ -318,7 +318,6 @@ static int tc3589x_device_init(struct tc3589x *tc3589x)
>  	return ret;
>  }
>  
> -#ifdef CONFIG_OF
>  static const struct of_device_id tc3589x_match[] = {
>  	/* Legacy compatible string */
>  	{ .compatible = "tc3589x", .data = (void *) TC3589X_UNKNOWN },
> @@ -359,14 +358,6 @@ tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
>  
>  	return pdata;
>  }
> -#else
> -static inline struct tc3589x_platform_data *
> -tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
> -{
> -	dev_err(dev, "no device tree support\n");
> -	return ERR_PTR(-ENODEV);
> -}
> -#endif
>  
>  static int tc3589x_probe(struct i2c_client *i2c,
>  				   const struct i2c_device_id *id)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] mfd: tc3589x: enforce device-tree only mode
Date: Fri, 20 Mar 2015 08:21:58 +0000	[thread overview]
Message-ID: <20150320082158.GD3318@x1> (raw)
In-Reply-To: <1426776765-18812-3-git-send-email-linus.walleij@linaro.org>

On Thu, 19 Mar 2015, Linus Walleij wrote:

> All systems using the TC3589x multifunction expander uses
> devicetree, so don't clutter the place with a lot of
> and assume it is there.
> 
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

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

> ---
>  drivers/gpio/Kconfig                    | 1 +
>  drivers/gpio/gpio-tc3589x.c             | 3 ---
>  drivers/input/keyboard/tc3589x-keypad.c | 9 ---------
>  drivers/mfd/Kconfig                     | 1 +
>  drivers/mfd/tc3589x.c                   | 9 ---------
>  5 files changed, 2 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index c1e2ca3d9a51..dc1aaa83a347 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -669,6 +669,7 @@ config GPIO_STP_XWAY
>  config GPIO_TC3589X
>  	bool "TC3589X GPIOs"
>  	depends on MFD_TC3589X
> +	depends on OF_GPIO
>  	select GPIOLIB_IRQCHIP
>  	help
>  	  This enables support for the GPIOs found on the TC3589X
> diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c
> index 11aed2671065..31b244cffabb 100644
> --- a/drivers/gpio/gpio-tc3589x.c
> +++ b/drivers/gpio/gpio-tc3589x.c
> @@ -260,10 +260,7 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
>  	tc3589x_gpio->chip.ngpio = tc3589x->num_gpio;
>  	tc3589x_gpio->chip.dev = &pdev->dev;
>  	tc3589x_gpio->chip.base = -1;
> -
> -#ifdef CONFIG_OF_GPIO
>  	tc3589x_gpio->chip.of_node = np;
> -#endif
>  
>  	/* Bring the GPIO module out of reset */
>  	ret = tc3589x_set_bits(tc3589x, TC3589x_RSTCTRL,
> diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c
> index 0ccc7de9b59d..08e62e6aeb1b 100644
> --- a/drivers/input/keyboard/tc3589x-keypad.c
> +++ b/drivers/input/keyboard/tc3589x-keypad.c
> @@ -318,7 +318,6 @@ static void tc3589x_keypad_close(struct input_dev *input)
>  	tc3589x_keypad_disable(keypad);
>  }
>  
> -#ifdef CONFIG_OF
>  static const struct tc3589x_keypad_platform_data *
>  tc3589x_keypad_of_probe(struct device *dev)
>  {
> @@ -368,14 +367,6 @@ tc3589x_keypad_of_probe(struct device *dev)
>  
>  	return plat;
>  }
> -#else
> -static inline const struct tc3589x_keypad_platform_data *
> -tc3589x_keypad_of_probe(struct device *dev)
> -{
> -	return ERR_PTR(-ENODEV);
> -}
> -#endif
> -
>  
>  static int tc3589x_keypad_probe(struct platform_device *pdev)
>  {
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 38356e39adba..476e63745742 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1210,6 +1210,7 @@ config MFD_TIMBERDALE
>  config MFD_TC3589X
>  	bool "Toshiba TC35892 and variants"
>  	depends on I2C=y
> +	depends on OF
>  	select MFD_CORE
>  	help
>  	  Support for the Toshiba TC35892 and variants I/O Expander.
> diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
> index aacb3720065c..cf356395c9e9 100644
> --- a/drivers/mfd/tc3589x.c
> +++ b/drivers/mfd/tc3589x.c
> @@ -318,7 +318,6 @@ static int tc3589x_device_init(struct tc3589x *tc3589x)
>  	return ret;
>  }
>  
> -#ifdef CONFIG_OF
>  static const struct of_device_id tc3589x_match[] = {
>  	/* Legacy compatible string */
>  	{ .compatible = "tc3589x", .data = (void *) TC3589X_UNKNOWN },
> @@ -359,14 +358,6 @@ tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
>  
>  	return pdata;
>  }
> -#else
> -static inline struct tc3589x_platform_data *
> -tc3589x_of_probe(struct device *dev, enum tc3589x_version *version)
> -{
> -	dev_err(dev, "no device tree support\n");
> -	return ERR_PTR(-ENODEV);
> -}
> -#endif
>  
>  static int tc3589x_probe(struct i2c_client *i2c,
>  				   const struct i2c_device_id *id)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2015-03-20  8:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 14:52 [PATCH 0/2] tc3589x OF only enforcement Linus Walleij
2015-03-19 14:52 ` Linus Walleij
2015-03-19 14:52 ` [PATCH 1/2] input: keypad: tc3589x: localize platform data Linus Walleij
2015-03-19 14:52   ` Linus Walleij
2015-03-19 16:38   ` Dmitry Torokhov
2015-03-19 16:38     ` Dmitry Torokhov
2015-03-27 16:47     ` Dmitry Torokhov
2015-03-27 16:47       ` Dmitry Torokhov
2015-03-30  7:08       ` Lee Jones
2015-03-30  7:08         ` Lee Jones
2015-04-07 13:07       ` Linus Walleij
2015-04-07 13:07         ` Linus Walleij
2015-03-27 11:52   ` Lee Jones
2015-03-27 11:52     ` Lee Jones
2015-03-27 11:52     ` Lee Jones
2015-03-19 14:52 ` [PATCH 2/2] mfd: tc3589x: enforce device-tree only mode Linus Walleij
2015-03-19 14:52   ` Linus Walleij
2015-03-19 17:00   ` Dmitry Torokhov
2015-03-19 17:00     ` Dmitry Torokhov
2015-03-20  8:21   ` Lee Jones [this message]
2015-03-20  8:21     ` Lee Jones
2015-03-27 11:53   ` Lee Jones
2015-03-27 11:53     ` Lee Jones
2015-03-27 11:53     ` Lee Jones
2015-03-27  9:04 ` [PATCH 0/2] tc3589x OF only enforcement Linus Walleij
2015-03-27  9:04   ` Linus Walleij
2015-03-27 12:00   ` Lee Jones
2015-03-27 12:00     ` Lee Jones
2015-03-27 12:00     ` Lee Jones
2015-03-27 16:48     ` Dmitry Torokhov
2015-03-27 16:48       ` Dmitry Torokhov

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=20150320082158.GD3318@x1 \
    --to=lee.jones@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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.