public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] i2c: drop class based instantiaion for selected drivers
@ 2014-07-10 11:46 Wolfram Sang
  2014-07-10 11:46 ` [PATCH 15/16] i2c: i2c-tegra: Drop class based scanning to improve bootup time Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-07-10 11:46 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Wolfram Sang,
	adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Some drivers were flagged to remove class based instantiation soon to improve
boot-up time. Originally, I was planning for a longer deprecation time so users
could switch over to some other kind of instantiation. However, the demand for
the speed up is high enough and class based instantiation is used rarely, so
the removal takes place now. To make up for the deprecation time, another
warning is added to the i2c core pointing out that the behaviour has now
changed:

+	/* Warn that the adapter lost class based instantiation */
+	if (adapter->class == I2C_CLASS_DEPRECATED) {
+		dev_dbg(&adapter->dev,
+			"This adapter dropped support for I2C classes and "
+			"won't auto-detect %s devices anymore. If you need it, check "
+			"'Documentation/i2c/instantiating-devices' for alternatives.\n",
+			driver->driver.name);
+		return 0;
+	}

A branch can be found here (with two other cleanups -> driver removals):
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/deprecate_stuff

I hope this meets all the needs. Please comment, ack, test...

Thanks,

   Wolfram


Wolfram Sang (16):
  i2c: add debug info when class instantiation was dropped
  i2c: i2c-at91: Drop class based scanning to improve bootup time
  i2c: i2c-bcm2835: Drop class based scanning to improve bootup time
  i2c: i2c-bfin-twi: Drop class based scanning to improve bootup time
  i2c: i2c-davinci: Drop class based scanning to improve bootup time
  i2c: i2c-designware-platdrv: Drop class based scanning to improve
    bootup time
  i2c: i2c-mv64xxx: Drop class based scanning to improve bootup time
  i2c: i2c-nomadik: Drop class based scanning to improve bootup time
  i2c: i2c-ocores: Drop class based scanning to improve bootup time
  i2c: i2c-omap: Drop class based scanning to improve bootup time
  i2c: i2c-rcar: Drop class based scanning to improve bootup time
  i2c: i2c-s3c2410: Drop class based scanning to improve bootup time
  i2c: i2c-sirf: Drop class based scanning to improve bootup time
  i2c: i2c-stu300: Drop class based scanning to improve bootup time
  i2c: i2c-tegra: Drop class based scanning to improve bootup time
  i2c: i2c-xiic: Drop class based scanning to improve bootup time

 drivers/i2c/busses/i2c-at91.c               |  2 +-
 drivers/i2c/busses/i2c-bcm2835.c            |  2 +-
 drivers/i2c/busses/i2c-bfin-twi.c           |  2 +-
 drivers/i2c/busses/i2c-davinci.c            |  2 +-
 drivers/i2c/busses/i2c-designware-platdrv.c |  2 +-
 drivers/i2c/busses/i2c-mv64xxx.c            |  2 +-
 drivers/i2c/busses/i2c-nomadik.c            |  8 ++++----
 drivers/i2c/busses/i2c-ocores.c             | 12 ++++++------
 drivers/i2c/busses/i2c-omap.c               |  2 +-
 drivers/i2c/busses/i2c-rcar.c               | 14 +++++++-------
 drivers/i2c/busses/i2c-s3c2410.c            |  8 ++++----
 drivers/i2c/busses/i2c-sirf.c               |  2 +-
 drivers/i2c/busses/i2c-stu300.c             |  2 +-
 drivers/i2c/busses/i2c-tegra.c              |  2 +-
 drivers/i2c/busses/i2c-xiic.c               | 12 ++++++------
 drivers/i2c/i2c-core.c                      | 10 ++++++++++
 16 files changed, 47 insertions(+), 37 deletions(-)

-- 
2.0.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 15/16] i2c: i2c-tegra: Drop class based scanning to improve bootup time
  2014-07-10 11:46 [PATCH 00/16] i2c: drop class based instantiaion for selected drivers Wolfram Sang
@ 2014-07-10 11:46 ` Wolfram Sang
       [not found]   ` <1404992799-3705-16-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
       [not found] ` <1404992799-3705-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
  2014-07-16 17:46 ` Wolfram Sang
  2 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2014-07-10 11:46 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-arm-kernel, Wolfram Sang, Laxman Dewangan, Stephen Warren,
	Thierry Reding, linux-tegra, linux-kernel

This driver has been flagged to drop class based instantiation. The removal
improves boot-up time and is unneeded for embedded controllers. Users have been
warned to switch for some time now, so we can actually do the removal. Keep the
DEPRECATED flag, so the core can inform users that the behaviour finally
changed now. After another transition period, this flag can go, too.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/i2c/busses/i2c-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index f1bb2fc06791..87d0371cebb7 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -792,7 +792,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
 
 	i2c_set_adapdata(&i2c_dev->adapter, i2c_dev);
 	i2c_dev->adapter.owner = THIS_MODULE;
-	i2c_dev->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED;
+	i2c_dev->adapter.class = I2C_CLASS_DEPRECATED;
 	strlcpy(i2c_dev->adapter.name, "Tegra I2C adapter",
 		sizeof(i2c_dev->adapter.name));
 	i2c_dev->adapter.algo = &tegra_i2c_algo;
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 15/16] i2c: i2c-tegra: Drop class based scanning to improve bootup time
       [not found]   ` <1404992799-3705-16-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
@ 2014-07-10 12:34     ` Mikko Perttunen
  2014-07-10 13:43     ` Thierry Reding
  1 sibling, 0 replies; 7+ messages in thread
From: Mikko Perttunen @ 2014-07-10 12:34 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Laxman Dewangan, Stephen Warren, Thierry Reding,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Reviewed-by: Mikko Perttunen <mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Tested-by: Mikko Perttunen <mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 10/07/14 14:46, Wolfram Sang wrote:
> This driver has been flagged to drop class based instantiation. The removal
> improves boot-up time and is unneeded for embedded controllers. Users have been
> warned to switch for some time now, so we can actually do the removal. Keep the
> DEPRECATED flag, so the core can inform users that the behaviour finally
> changed now. After another transition period, this flag can go, too.
>
> Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> ---
>   drivers/i2c/busses/i2c-tegra.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index f1bb2fc06791..87d0371cebb7 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -792,7 +792,7 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>
>   	i2c_set_adapdata(&i2c_dev->adapter, i2c_dev);
>   	i2c_dev->adapter.owner = THIS_MODULE;
> -	i2c_dev->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED;
> +	i2c_dev->adapter.class = I2C_CLASS_DEPRECATED;
>   	strlcpy(i2c_dev->adapter.name, "Tegra I2C adapter",
>   		sizeof(i2c_dev->adapter.name));
>   	i2c_dev->adapter.algo = &tegra_i2c_algo;
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 00/16] i2c: drop class based instantiaion for selected drivers
       [not found] ` <1404992799-3705-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
@ 2014-07-10 12:38   ` Lothar Waßmann
       [not found]     ` <20140710143837.558c1d07-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Lothar Waßmann @ 2014-07-10 12:38 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi,

Wolfram Sang wrote:
> Some drivers were flagged to remove class based instantiation soon to improve
> boot-up time. Originally, I was planning for a longer deprecation time so users
> could switch over to some other kind of instantiation. However, the demand for
> the speed up is high enough and class based instantiation is used rarely, so
> the removal takes place now. To make up for the deprecation time, another
> warning is added to the i2c core pointing out that the behaviour has now
> changed:
> 
> +	/* Warn that the adapter lost class based instantiation */
> +	if (adapter->class == I2C_CLASS_DEPRECATED) {
> +		dev_dbg(&adapter->dev,
> +			"This adapter dropped support for I2C classes and "
> +			"won't auto-detect %s devices anymore. If you need it, check "
> +			"'Documentation/i2c/instantiating-devices' for alternatives.\n",
>
It's usually a bad idea to split kernel messages across source lines
because it makes searching for the corresponding source line for a
message found in the log difficult.
You could at least do the split at the sentence boundary.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info-AvR2QvxeiV7DiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org
___________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 00/16] i2c: drop class based instantiaion for selected drivers
       [not found]     ` <20140710143837.558c1d07-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
@ 2014-07-10 13:13       ` Wolfram Sang
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-07-10 13:13 UTC (permalink / raw)
  To: Lothar Waßmann
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]


> > +	/* Warn that the adapter lost class based instantiation */
> > +	if (adapter->class == I2C_CLASS_DEPRECATED) {
> > +		dev_dbg(&adapter->dev,
> > +			"This adapter dropped support for I2C classes and "
> > +			"won't auto-detect %s devices anymore. If you need it, check "
> > +			"'Documentation/i2c/instantiating-devices' for alternatives.\n",
> >
> It's usually a bad idea to split kernel messages across source lines

Yes, "usually". Not for this message, though, it's specific. The lines
would have been quite long.

> You could at least do the split at the sentence boundary.

OK, this would have been a compromise.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 15/16] i2c: i2c-tegra: Drop class based scanning to improve bootup time
       [not found]   ` <1404992799-3705-16-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
  2014-07-10 12:34     ` Mikko Perttunen
@ 2014-07-10 13:43     ` Thierry Reding
  1 sibling, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2014-07-10 13:43 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Laxman Dewangan, Stephen Warren,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

On Thu, Jul 10, 2014 at 01:46:35PM +0200, Wolfram Sang wrote:
> This driver has been flagged to drop class based instantiation. The removal
> improves boot-up time and is unneeded for embedded controllers. Users have been
> warned to switch for some time now, so we can actually do the removal. Keep the
> DEPRECATED flag, so the core can inform users that the behaviour finally
> changed now. After another transition period, this flag can go, too.
> 
> Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

It looks as though this currently doesn't do anything on !X86 anyway and
I'll trust Mikko's testing, so:

Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 00/16] i2c: drop class based instantiaion for selected drivers
  2014-07-10 11:46 [PATCH 00/16] i2c: drop class based instantiaion for selected drivers Wolfram Sang
  2014-07-10 11:46 ` [PATCH 15/16] i2c: i2c-tegra: Drop class based scanning to improve bootup time Wolfram Sang
       [not found] ` <1404992799-3705-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
@ 2014-07-16 17:46 ` Wolfram Sang
  2 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-07-16 17:46 UTC (permalink / raw)
  To: linux-i2c
  Cc: davinci-linux-open-source, linux-samsung-soc, adi-buildroot-devel,
	linux-kernel, linux-tegra, linux-omap, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2766 bytes --]

On Thu, Jul 10, 2014 at 01:46:20PM +0200, Wolfram Sang wrote:
> Some drivers were flagged to remove class based instantiation soon to improve
> boot-up time. Originally, I was planning for a longer deprecation time so users
> could switch over to some other kind of instantiation. However, the demand for
> the speed up is high enough and class based instantiation is used rarely, so
> the removal takes place now. To make up for the deprecation time, another
> warning is added to the i2c core pointing out that the behaviour has now
> changed:
> 
> +	/* Warn that the adapter lost class based instantiation */
> +	if (adapter->class == I2C_CLASS_DEPRECATED) {
> +		dev_dbg(&adapter->dev,
> +			"This adapter dropped support for I2C classes and "
> +			"won't auto-detect %s devices anymore. If you need it, check "
> +			"'Documentation/i2c/instantiating-devices' for alternatives.\n",
> +			driver->driver.name);
> +		return 0;
> +	}
> 
> A branch can be found here (with two other cleanups -> driver removals):
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/deprecate_stuff
> 
> I hope this meets all the needs. Please comment, ack, test...
> 
> Thanks,
> 
>    Wolfram
> 
> 
> Wolfram Sang (16):
>   i2c: add debug info when class instantiation was dropped
>   i2c: i2c-at91: Drop class based scanning to improve bootup time
>   i2c: i2c-bcm2835: Drop class based scanning to improve bootup time
>   i2c: i2c-bfin-twi: Drop class based scanning to improve bootup time
>   i2c: i2c-davinci: Drop class based scanning to improve bootup time
>   i2c: i2c-designware-platdrv: Drop class based scanning to improve
>     bootup time
>   i2c: i2c-mv64xxx: Drop class based scanning to improve bootup time
>   i2c: i2c-nomadik: Drop class based scanning to improve bootup time
>   i2c: i2c-ocores: Drop class based scanning to improve bootup time
>   i2c: i2c-omap: Drop class based scanning to improve bootup time
>   i2c: i2c-rcar: Drop class based scanning to improve bootup time
>   i2c: i2c-s3c2410: Drop class based scanning to improve bootup time
>   i2c: i2c-sirf: Drop class based scanning to improve bootup time
>   i2c: i2c-stu300: Drop class based scanning to improve bootup time
>   i2c: i2c-tegra: Drop class based scanning to improve bootup time
>   i2c: i2c-xiic: Drop class based scanning to improve bootup time
> 
>  drivers/i2c/busses/i2c-at91.c               |  2 +-
>  drivers/i2c/busses/i2c-bcm2835.c            |  2 +-
>  drivers/i2c/busses/i2c-bfin-twi.c           |  2 +-
>  drivers/i2c/busses/i2c-davinci.c            |  2 +-
>  drivers/i2c/busses/i2c-designware-platdrv.c |  2 +-
>  drivers/i2c/busses/i2c-mv64xxx.c            |  2 +-

Applied to for-next, thanks!


[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-07-16 17:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-10 11:46 [PATCH 00/16] i2c: drop class based instantiaion for selected drivers Wolfram Sang
2014-07-10 11:46 ` [PATCH 15/16] i2c: i2c-tegra: Drop class based scanning to improve bootup time Wolfram Sang
     [not found]   ` <1404992799-3705-16-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-07-10 12:34     ` Mikko Perttunen
2014-07-10 13:43     ` Thierry Reding
     [not found] ` <1404992799-3705-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-07-10 12:38   ` [PATCH 00/16] i2c: drop class based instantiaion for selected drivers Lothar Waßmann
     [not found]     ` <20140710143837.558c1d07-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
2014-07-10 13:13       ` Wolfram Sang
2014-07-16 17:46 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox