All of lore.kernel.org
 help / color / mirror / Atom feed
* something wrong in drivers/power
@ 2009-09-26  9:55 ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2009-09-26  9:55 UTC (permalink / raw)
  To: rpurdie, lenz, kernel list, Dirk, arminlitzel, Cyril Hrubis,
	thommycheck, linux-arm-kernel, dbaryshkov, omegamoon,
	eric.y.miao, utx
  Cc: cbou


Tosa battery driver seems to be confused about its own identity.


Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
--- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
+++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
@@ -459,7 +459,7 @@
 }
 
 static struct platform_driver tosa_bat_driver = {
-	.driver.name	= "wm97xx-battery",
+	.driver.name	= "tosa-battery",
 	.driver.owner	= THIS_MODULE,
 	.probe		= tosa_bat_probe,
 	.remove		= __devexit_p(tosa_bat_remove),
@@ -483,4 +483,4 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Dmitry Baryshkov");
 MODULE_DESCRIPTION("Tosa battery driver");
-MODULE_ALIAS("platform:wm97xx-battery");
+MODULE_ALIAS("platform:tosa-battery");


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* something wrong in drivers/power
@ 2009-09-26  9:55 ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2009-09-26  9:55 UTC (permalink / raw)
  To: linux-arm-kernel


Tosa battery driver seems to be confused about its own identity.


Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
--- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
+++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
@@ -459,7 +459,7 @@
 }
 
 static struct platform_driver tosa_bat_driver = {
-	.driver.name	= "wm97xx-battery",
+	.driver.name	= "tosa-battery",
 	.driver.owner	= THIS_MODULE,
 	.probe		= tosa_bat_probe,
 	.remove		= __devexit_p(tosa_bat_remove),
@@ -483,4 +483,4 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Dmitry Baryshkov");
 MODULE_DESCRIPTION("Tosa battery driver");
-MODULE_ALIAS("platform:wm97xx-battery");
+MODULE_ALIAS("platform:tosa-battery");


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: something wrong in drivers/power
       [not found] ` <20090926120657.24b337a8@infradead.org>
@ 2009-09-26 11:38   ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2009-09-26 11:38 UTC (permalink / raw)
  To: Arjan van de Ven, kernel list

On Sat 2009-09-26 12:06:57, Arjan van de Ven wrote:
> On Sat, 26 Sep 2009 11:55:55 +0200
> Pavel Machek <pavel@ucw.cz> wrote:
> 
> > 
> > Tosa battery driver seems to be confused about its own identity.
> 
> maybe also stick in the copyright line "borrowed from the wm97xx
> driver" :)

Well, I'd prefer authors to do that one :-).

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: something wrong in drivers/power
  2009-09-26  9:55 ` Pavel Machek
@ 2009-09-26 14:55   ` Dmitry Eremin-Solenikov
  -1 siblings, 0 replies; 11+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-09-26 14:55 UTC (permalink / raw)
  To: Pavel Machek
  Cc: rpurdie, lenz, kernel list, Dirk, arminlitzel, Cyril Hrubis,
	thommycheck, linux-arm-kernel, omegamoon, eric.y.miao, utx, cbou

On Sat, Sep 26, 2009 at 11:55:55AM +0200, Pavel Machek wrote:
> 
> Tosa battery driver seems to be confused about its own identity.

NAK. Please see the drivers/input/touchscree/wm97xx-core.c

> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
> --- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
> +++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
> @@ -459,7 +459,7 @@
>  }
>  
>  static struct platform_driver tosa_bat_driver = {
> -	.driver.name	= "wm97xx-battery",
> +	.driver.name	= "tosa-battery",
>  	.driver.owner	= THIS_MODULE,
>  	.probe		= tosa_bat_probe,
>  	.remove		= __devexit_p(tosa_bat_remove),
> @@ -483,4 +483,4 @@
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Dmitry Baryshkov");
>  MODULE_DESCRIPTION("Tosa battery driver");
> -MODULE_ALIAS("platform:wm97xx-battery");
> +MODULE_ALIAS("platform:tosa-battery");
> 
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

-- 
With best wishes
Dmitry


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

* something wrong in drivers/power
@ 2009-09-26 14:55   ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-09-26 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 26, 2009 at 11:55:55AM +0200, Pavel Machek wrote:
> 
> Tosa battery driver seems to be confused about its own identity.

NAK. Please see the drivers/input/touchscree/wm97xx-core.c

> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
> --- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
> +++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
> @@ -459,7 +459,7 @@
>  }
>  
>  static struct platform_driver tosa_bat_driver = {
> -	.driver.name	= "wm97xx-battery",
> +	.driver.name	= "tosa-battery",
>  	.driver.owner	= THIS_MODULE,
>  	.probe		= tosa_bat_probe,
>  	.remove		= __devexit_p(tosa_bat_remove),
> @@ -483,4 +483,4 @@
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Dmitry Baryshkov");
>  MODULE_DESCRIPTION("Tosa battery driver");
> -MODULE_ALIAS("platform:wm97xx-battery");
> +MODULE_ALIAS("platform:tosa-battery");
> 
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

-- 
With best wishes
Dmitry

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

* Re: something wrong in drivers/power
  2009-09-26 14:55   ` Dmitry Eremin-Solenikov
@ 2009-09-27 17:35     ` Pavel Machek
  -1 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2009-09-27 17:35 UTC (permalink / raw)
  To: Dmitry Eremin-Solenikov
  Cc: rpurdie, lenz, kernel list, Dirk, arminlitzel, Cyril Hrubis,
	thommycheck, linux-arm-kernel, omegamoon, eric.y.miao, utx, cbou

On Sat 2009-09-26 18:55:36, Dmitry Eremin-Solenikov wrote:
> On Sat, Sep 26, 2009 at 11:55:55AM +0200, Pavel Machek wrote:
> > 
> > Tosa battery driver seems to be confused about its own identity.
> 
> NAK. Please see the drivers/input/touchscree/wm97xx-core.c

Could you elaborate? 

I took a look at touchscreen file, and it does not explain
anything. Having tosa_battery calling itself wm97xx-battery is at
least confusing, and there's no explaining comment. Given that we have
different wm97xx_battery.c driver calling itself "wm97xx-battery"... I
believe that's a bug.

								Pavel

> > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > 
> > diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
> > --- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
> > +++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
> > @@ -459,7 +459,7 @@
> >  }
> >  
> >  static struct platform_driver tosa_bat_driver = {
> > -	.driver.name	= "wm97xx-battery",
> > +	.driver.name	= "tosa-battery",
> >  	.driver.owner	= THIS_MODULE,
> >  	.probe		= tosa_bat_probe,
> >  	.remove		= __devexit_p(tosa_bat_remove),
> > @@ -483,4 +483,4 @@
> >  MODULE_LICENSE("GPL");
> >  MODULE_AUTHOR("Dmitry Baryshkov");
> >  MODULE_DESCRIPTION("Tosa battery driver");
> > -MODULE_ALIAS("platform:wm97xx-battery");
> > +MODULE_ALIAS("platform:tosa-battery");
> > 
> > 
> > -- 
> > (english) http://www.livejournal.com/~pavelmachek
> > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* something wrong in drivers/power
@ 2009-09-27 17:35     ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2009-09-27 17:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat 2009-09-26 18:55:36, Dmitry Eremin-Solenikov wrote:
> On Sat, Sep 26, 2009 at 11:55:55AM +0200, Pavel Machek wrote:
> > 
> > Tosa battery driver seems to be confused about its own identity.
> 
> NAK. Please see the drivers/input/touchscree/wm97xx-core.c

Could you elaborate? 

I took a look at touchscreen file, and it does not explain
anything. Having tosa_battery calling itself wm97xx-battery is at
least confusing, and there's no explaining comment. Given that we have
different wm97xx_battery.c driver calling itself "wm97xx-battery"... I
believe that's a bug.

								Pavel

> > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > 
> > diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
> > --- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
> > +++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
> > @@ -459,7 +459,7 @@
> >  }
> >  
> >  static struct platform_driver tosa_bat_driver = {
> > -	.driver.name	= "wm97xx-battery",
> > +	.driver.name	= "tosa-battery",
> >  	.driver.owner	= THIS_MODULE,
> >  	.probe		= tosa_bat_probe,
> >  	.remove		= __devexit_p(tosa_bat_remove),
> > @@ -483,4 +483,4 @@
> >  MODULE_LICENSE("GPL");
> >  MODULE_AUTHOR("Dmitry Baryshkov");
> >  MODULE_DESCRIPTION("Tosa battery driver");
> > -MODULE_ALIAS("platform:wm97xx-battery");
> > +MODULE_ALIAS("platform:tosa-battery");
> > 
> > 
> > -- 
> > (english) http://www.livejournal.com/~pavelmachek
> > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: something wrong in drivers/power
  2009-09-27 17:35     ` Pavel Machek
@ 2009-09-28  7:55       ` Dmitry Eremin-Solenikov
  -1 siblings, 0 replies; 11+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-09-28  7:55 UTC (permalink / raw)
  To: Pavel Machek
  Cc: rpurdie, lenz, kernel list, Dirk, arminlitzel, Cyril Hrubis,
	thommycheck, linux-arm-kernel, omegamoon, eric.y.miao, utx, cbou,
	Mark Brown

On Sun, Sep 27, 2009 at 07:35:16PM +0200, Pavel Machek wrote:
> On Sat 2009-09-26 18:55:36, Dmitry Eremin-Solenikov wrote:
> > On Sat, Sep 26, 2009 at 11:55:55AM +0200, Pavel Machek wrote:
> > > 
> > > Tosa battery driver seems to be confused about its own identity.
> > 
> > NAK. Please see the drivers/input/touchscree/wm97xx-core.c
> 
> Could you elaborate? 
> 
> I took a look at touchscreen file, and it does not explain
> anything. Having tosa_battery calling itself wm97xx-battery is at
> least confusing, and there's no explaining comment. Given that we have
> different wm97xx_battery.c driver calling itself "wm97xx-battery"... I
> believe that's a bug.

Tosa has a battery that is hanging on the wm97xx codec (9712 if somebody
cares). The platform device for it is registered in the wm97xx-core and
then used by tosa-battery driver. If you'd like to clean up this mess
properly, you should:

1) add a clean possibility to pass platform data via ac97 bus to wm97xx
core driver (care to check that it should be passable both via regular
ac97 driver and via ASoC).

2) add a possibility to pass device names and platform data to
wm97xx-core child devices (battery, ts , etc.)

> > > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > > 
> > > diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
> > > --- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
> > > +++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
> > > @@ -459,7 +459,7 @@
> > >  }
> > >  
> > >  static struct platform_driver tosa_bat_driver = {
> > > -	.driver.name	= "wm97xx-battery",
> > > +	.driver.name	= "tosa-battery",
> > >  	.driver.owner	= THIS_MODULE,
> > >  	.probe		= tosa_bat_probe,
> > >  	.remove		= __devexit_p(tosa_bat_remove),
> > > @@ -483,4 +483,4 @@
> > >  MODULE_LICENSE("GPL");
> > >  MODULE_AUTHOR("Dmitry Baryshkov");
> > >  MODULE_DESCRIPTION("Tosa battery driver");
> > > -MODULE_ALIAS("platform:wm97xx-battery");
> > > +MODULE_ALIAS("platform:tosa-battery");
> > > 
> > > 
> > > -- 
> > > (english) http://www.livejournal.com/~pavelmachek
> > > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> > 
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

-- 
With best wishes
Dmitry


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

* something wrong in drivers/power
@ 2009-09-28  7:55       ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-09-28  7:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Sep 27, 2009 at 07:35:16PM +0200, Pavel Machek wrote:
> On Sat 2009-09-26 18:55:36, Dmitry Eremin-Solenikov wrote:
> > On Sat, Sep 26, 2009 at 11:55:55AM +0200, Pavel Machek wrote:
> > > 
> > > Tosa battery driver seems to be confused about its own identity.
> > 
> > NAK. Please see the drivers/input/touchscree/wm97xx-core.c
> 
> Could you elaborate? 
> 
> I took a look at touchscreen file, and it does not explain
> anything. Having tosa_battery calling itself wm97xx-battery is at
> least confusing, and there's no explaining comment. Given that we have
> different wm97xx_battery.c driver calling itself "wm97xx-battery"... I
> believe that's a bug.

Tosa has a battery that is hanging on the wm97xx codec (9712 if somebody
cares). The platform device for it is registered in the wm97xx-core and
then used by tosa-battery driver. If you'd like to clean up this mess
properly, you should:

1) add a clean possibility to pass platform data via ac97 bus to wm97xx
core driver (care to check that it should be passable both via regular
ac97 driver and via ASoC).

2) add a possibility to pass device names and platform data to
wm97xx-core child devices (battery, ts , etc.)

> > > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > > 
> > > diff -ur power.ofic/tosa_battery.c power/tosa_battery.c
> > > --- linux/drivers/power.ofic/tosa_battery.c	2009-09-06 08:56:36.000000000 +0200
> > > +++ linux/drivers/power/tosa_battery.c	2009-09-15 15:14:08.000000000 +0200
> > > @@ -459,7 +459,7 @@
> > >  }
> > >  
> > >  static struct platform_driver tosa_bat_driver = {
> > > -	.driver.name	= "wm97xx-battery",
> > > +	.driver.name	= "tosa-battery",
> > >  	.driver.owner	= THIS_MODULE,
> > >  	.probe		= tosa_bat_probe,
> > >  	.remove		= __devexit_p(tosa_bat_remove),
> > > @@ -483,4 +483,4 @@
> > >  MODULE_LICENSE("GPL");
> > >  MODULE_AUTHOR("Dmitry Baryshkov");
> > >  MODULE_DESCRIPTION("Tosa battery driver");
> > > -MODULE_ALIAS("platform:wm97xx-battery");
> > > +MODULE_ALIAS("platform:tosa-battery");
> > > 
> > > 
> > > -- 
> > > (english) http://www.livejournal.com/~pavelmachek
> > > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> > 
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

-- 
With best wishes
Dmitry

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

* Re: something wrong in drivers/power
  2009-09-28  7:55       ` Dmitry Eremin-Solenikov
@ 2009-09-28 12:22         ` Mark Brown
  -1 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2009-09-28 12:22 UTC (permalink / raw)
  To: Dmitry Eremin-Solenikov
  Cc: Pavel Machek, thommycheck, cbou, Cyril Hrubis, arminlitzel,
	kernel list, Dirk, utx, lenz, rpurdie, omegamoon, eric.y.miao,
	linux-arm-kernel

On Mon, Sep 28, 2009 at 11:55:17AM +0400, Dmitry Eremin-Solenikov wrote:

> 1) add a clean possibility to pass platform data via ac97 bus to wm97xx
> core driver (care to check that it should be passable both via regular
> ac97 driver and via ASoC).

This has already been done by Marek, I think most of the bits made it
into 2.6.32-rc1 though I haven't checked.  The problem had been getting
ALSA support for using the platform data but Takashi agreeded to that so
we're fine.  It needs explict support in the AC97 controller driver to
actually set the platform data for the CODECs on the bus but that's been
done for PXA.

In any case, I'd nack the original patch too - all it will do is break
the driver since it will no longer load and the attempts to get the
wm97xx structure from the parent device of a separately registered
platform device will oops.

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

* something wrong in drivers/power
@ 2009-09-28 12:22         ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2009-09-28 12:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 28, 2009 at 11:55:17AM +0400, Dmitry Eremin-Solenikov wrote:

> 1) add a clean possibility to pass platform data via ac97 bus to wm97xx
> core driver (care to check that it should be passable both via regular
> ac97 driver and via ASoC).

This has already been done by Marek, I think most of the bits made it
into 2.6.32-rc1 though I haven't checked.  The problem had been getting
ALSA support for using the platform data but Takashi agreeded to that so
we're fine.  It needs explict support in the AC97 controller driver to
actually set the platform data for the CODECs on the bus but that's been
done for PXA.

In any case, I'd nack the original patch too - all it will do is break
the driver since it will no longer load and the attempts to get the
wm97xx structure from the parent device of a separately registered
platform device will oops.

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

end of thread, other threads:[~2009-09-28 12:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-26  9:55 something wrong in drivers/power Pavel Machek
2009-09-26  9:55 ` Pavel Machek
     [not found] ` <20090926120657.24b337a8@infradead.org>
2009-09-26 11:38   ` Pavel Machek
2009-09-26 14:55 ` Dmitry Eremin-Solenikov
2009-09-26 14:55   ` Dmitry Eremin-Solenikov
2009-09-27 17:35   ` Pavel Machek
2009-09-27 17:35     ` Pavel Machek
2009-09-28  7:55     ` Dmitry Eremin-Solenikov
2009-09-28  7:55       ` Dmitry Eremin-Solenikov
2009-09-28 12:22       ` Mark Brown
2009-09-28 12:22         ` Mark Brown

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.