Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-26 Thread Greg KH
On Mon, Oct 26, 2009 at 06:48:15PM +, Mark Brown wrote:
> On Mon, Oct 26, 2009 at 09:58:52AM -0700, Greg KH wrote:
> > On Fri, Oct 23, 2009 at 11:18:06AM +0100, Russell King - ARM Linux wrote:
> > > On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
> 
> > > > A little more background: we need pxamci to be a child of SPI because
> > > > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > > > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > > > resume properly.
> 
> > > I don't think this is the right solution - and I don't know what the
> > > right solution would be given that the interfaces I suspect you need
> > > aren't public.
> 
> > Um, why not ask the SPI maintainer?  I don't know what the SPI code is
> > doing, sorry.
> 
> It's not specific to SPI - the problem is the need to express ordering
> constraints in suspend/resume that go beyond what the device tree gives.
> 
> I believe that the pm_link stuff in -next is what's needed here?  I was
> planning to look at this within the regulator API before the next merge
> window so that I can hopefully have something ready for -next after that
> (or possibly even get it in in the same merge window if the cross tree
> issues aren't too painful).

Yes, talk to Rafael about that stuff, he's responsible for it :)

thanks,

greg k-h



Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-26 Thread Greg KH
On Fri, Oct 23, 2009 at 11:18:06AM +0100, Russell King - ARM Linux wrote:
> On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
> > On Thu, 22 Oct 2009 23:57:58 +0100
> > Russell King - ARM Linux  wrote:
> > 
> > > On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> > > > Hi,
> > > > 
> > > > I get this warning on shutdown. How to fix it properly?
> > > > 
> > > > FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> > > > this patch:
> > > > http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
> > > 
> > > This sounds like it's the cause of the problem - from the backtrace, it
> > > looks like SPI expects the children of the SPI device to be its own
> > > responsibility to maintain.
> > > 
> > > Hence, because you've made pxamci a child of SPI, SPI is trying to
> > > unregister and release the pxamci device.
> > 
> > A little more background: we need pxamci to be a child of SPI because
> > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > resume properly.
> 
> I don't think this is the right solution - and I don't know what the
> right solution would be given that the interfaces I suspect you need
> aren't public.
> 
> I don't think you can reverse the order of SPI and MMC initialization
> because that'd mean MMC could try to use SPI before it exists.
> 
> Maybe the right answer is for SPI to stop thinking it owns all child
> devices, and only unregister devices which it owns (iow, are of some
> SPI bus-type.)
> 
> Adding Greg for comment.

Um, why not ask the SPI maintainer?  I don't know what the SPI code is
doing, sorry.

thanks,

greg k-h



Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-26 Thread Antonio Ospite
On Mon, 26 Oct 2009 18:48:15 +
Mark Brown  wrote:

> > > On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
> 
> > > > A little more background: we need pxamci to be a child of SPI because
> > > > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > > > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > > > resume properly.
> 
...
> I believe that the pm_link stuff in -next is what's needed here?  I was
> planning to look at this within the regulator API before the next merge
> window so that I can hopefully have something ready for -next after that
> (or possibly even get it in in the same merge window if the cross tree
> issues aren't too painful).

Ah, good to know that there is a proper solution coming.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


pgpqACrFxz97A.pgp
Description: PGP signature


Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-26 Thread Mark Brown
On Mon, Oct 26, 2009 at 09:58:52AM -0700, Greg KH wrote:
> On Fri, Oct 23, 2009 at 11:18:06AM +0100, Russell King - ARM Linux wrote:
> > On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:

> > > A little more background: we need pxamci to be a child of SPI because
> > > our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> > > powering; enforcing this hierarchy is needed to make pxamci suspend and
> > > resume properly.

> > I don't think this is the right solution - and I don't know what the
> > right solution would be given that the interfaces I suspect you need
> > aren't public.

> Um, why not ask the SPI maintainer?  I don't know what the SPI code is
> doing, sorry.

It's not specific to SPI - the problem is the need to express ordering
constraints in suspend/resume that go beyond what the device tree gives.

I believe that the pm_link stuff in -next is what's needed here?  I was
planning to look at this within the regulator API before the next merge
window so that I can hopefully have something ready for -next after that
(or possibly even get it in in the same merge window if the cross tree
issues aren't too painful).



Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-23 Thread Russell King - ARM Linux
On Fri, Oct 23, 2009 at 11:50:28AM +0200, Antonio Ospite wrote:
> On Thu, 22 Oct 2009 23:57:58 +0100
> Russell King - ARM Linux  wrote:
> 
> > On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> > > Hi,
> > > 
> > > I get this warning on shutdown. How to fix it properly?
> > > 
> > > FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> > > this patch:
> > > http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
> > 
> > This sounds like it's the cause of the problem - from the backtrace, it
> > looks like SPI expects the children of the SPI device to be its own
> > responsibility to maintain.
> > 
> > Hence, because you've made pxamci a child of SPI, SPI is trying to
> > unregister and release the pxamci device.
> 
> A little more background: we need pxamci to be a child of SPI because
> our PMIC is connected via SPI, and a PMIC regulator is used for mmc
> powering; enforcing this hierarchy is needed to make pxamci suspend and
> resume properly.

I don't think this is the right solution - and I don't know what the
right solution would be given that the interfaces I suspect you need
aren't public.

I don't think you can reverse the order of SPI and MMC initialization
because that'd mean MMC could try to use SPI before it exists.

Maybe the right answer is for SPI to stop thinking it owns all child
devices, and only unregister devices which it owns (iow, are of some
SPI bus-type.)

Adding Greg for comment.

> The board init does:
>   spi_pd = platform_device_alloc("pxa2xx-spi", 1);
>   spi_pd->dev.platform_data = &ezx_spi_masterinfo;
>   platform_device_add(spi_pd);
>   spi_register_board_info(ARRAY_AND_SIZE(a780_spi_boardinfo));
> 
>   pxa_set_mci_parent(&spi_pd->dev);
>   pxa_set_mci_info(&ezx_mci_platform_data);
> 
> Now, do you suggest to adapt pxamci so it supports the case when
> another driver wants to release it? I am not sure how to do that, tho.

Definitely not.



Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-23 Thread Antonio Ospite
On Thu, 22 Oct 2009 23:57:58 +0100
Russell King - ARM Linux  wrote:

> On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> > Hi,
> > 
> > I get this warning on shutdown. How to fix it properly?
> > 
> > FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> > this patch:
> > http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21
> 
> This sounds like it's the cause of the problem - from the backtrace, it
> looks like SPI expects the children of the SPI device to be its own
> responsibility to maintain.
> 
> Hence, because you've made pxamci a child of SPI, SPI is trying to
> unregister and release the pxamci device.

A little more background: we need pxamci to be a child of SPI because
our PMIC is connected via SPI, and a PMIC regulator is used for mmc
powering; enforcing this hierarchy is needed to make pxamci suspend and
resume properly.

The board init does:
spi_pd = platform_device_alloc("pxa2xx-spi", 1);
spi_pd->dev.platform_data = &ezx_spi_masterinfo;
platform_device_add(spi_pd);
spi_register_board_info(ARRAY_AND_SIZE(a780_spi_boardinfo));

pxa_set_mci_parent(&spi_pd->dev);
pxa_set_mci_info(&ezx_mci_platform_data);

Now, do you suggest to adapt pxamci so it supports the case when
another driver wants to release it? I am not sure how to do that, tho.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


pgp576inVzPZA.pgp
Description: PGP signature


Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-22 Thread Eric Miao
On Fri, Oct 23, 2009 at 6:36 AM, Antonio Ospite
 wrote:
> Hi,
>
> I get this warning on shutdown. How to fix it properly?
>

This is weird, as if pxa2xx_set_spi_info() is used, the pxa2xx-spi device
is actually created by platform_device_alloc(), which has a default
release function of "platform_device_release()".



Re: [WARNING] pxamci: 'pxa2xx-mci.0' does not have a release() function.

2009-10-22 Thread Russell King - ARM Linux
On Fri, Oct 23, 2009 at 12:36:31AM +0200, Antonio Ospite wrote:
> Hi,
> 
> I get this warning on shutdown. How to fix it properly?
> 
> FYI, in my setup pxa2xx_spi is the parent for pxamci, set using
> this patch:
> http://git.openezx.org/openezx.git?a=commitdiff;h=0ffd85ad8faea3456d4ecf5f63ae65aca26fff21

This sounds like it's the cause of the problem - from the backtrace, it
looks like SPI expects the children of the SPI device to be its own
responsibility to maintain.

Hence, because you've made pxamci a child of SPI, SPI is trying to
unregister and release the pxamci device.