Re: [PATCH v3] mmc_spi.c: add support for the regulator framework

2011-05-30 Thread Antonio Ospite
On Mon, 30 May 2011 18:14:48 +0800 Mark Brown wrote: > On Mon, May 30, 2011 at 11:07:49AM +0200, Antonio Ospite wrote: > > On Mon, 23 May 2011 17:10:23 +0200 > > > > +#define STRUCT_FIELD(s, f) ((s) && (s)->f ? (s)->f : NULL ) > > > Any opinion on t

Re: [PATCH v3] mmc_spi.c: add support for the regulator framework

2011-05-30 Thread Antonio Ospite
On Mon, 23 May 2011 17:10:23 +0200 Antonio Ospite wrote: > On Wed, 18 May 2011 12:42:12 -0700 > Mark Brown wrote: > > > On Wed, May 18, 2011 at 07:23:20PM +0200, Antonio Ospite wrote: > > > [...] > > > 2. Add a proper function with all the needed parameters

Re: [PATCH v3] mmc_spi.c: add support for the regulator framework

2011-05-23 Thread Antonio Ospite
On Wed, 18 May 2011 12:42:12 -0700 Mark Brown wrote: > On Wed, May 18, 2011 at 07:23:20PM +0200, Antonio Ospite wrote: > [...] > > 2. Add a proper function with all the needed parameters to abstract > > the actual var names, this would be something like: > >

[PATCH] mmc: fix handling NULL returned from regulator_get()

2011-05-18 Thread Antonio Ospite
handled correctly, the ifdef on CONFIG_REGULATOR in mmci.c can go away as well. Signed-off-by: Antonio Ospite --- drivers/mmc/host/dw_mmc.c |2 +- drivers/mmc/host/mmci.c |4 +--- drivers/mmc/host/mxcmmc.c |2 +- drivers/mmc/host/omap_hsmmc.c |4 ++-- drivers/mmc/host

Re: [PATCH v3] mmc_spi.c: add support for the regulator framework

2011-05-18 Thread Antonio Ospite
On Wed, 11 May 2011 22:57:04 +0200 Mark Brown wrote: > On Wed, May 11, 2011 at 10:53:37PM +0200, Antonio Ospite wrote: > > > OK, avoiding some duplication will be good, I agree. > > > I am resending a v4 with the equivalent code: > > > > if (hos

Re: [PATCH v3] mmc_spi.c: add support for the regulator framework

2011-05-11 Thread Antonio Ospite
st->vcc) { int ret; if (power_mode == MMC_POWER_OFF) vdd = 0; ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd); if (ret) return ret; } else { host->pdata->setpower

Re: [PATCH v2 1/2] pxamci: remove the ifdef CONFIG_REGULATOR

2011-05-11 Thread Antonio Ospite
On Wed, 11 May 2011 10:41:43 -0400 Chris Ball wrote: > On Wed, May 11 2011, Antonio Ospite wrote: [...] > > drivers/mmc/host/pxamci.c |5 ++--- > > 1 files changed, 2 insertions(+), 3 deletions(-) [...] > > Thanks, I've merged this and squashed the 2/2 punct

Re: [PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR

2011-05-10 Thread Antonio Ospite
g to remove the ifdefs anyway but use IS_ERR_OR_NULL(); how does that sound? Am I still missing anything? Or changing the regulator_get() stub to return an error (-ENOSYS?) might be worth it? Thanks Russel for pointing out the issue BTW. Thanks, Antonio -- Antonio Ospite http://ao2.it PGP pu

[PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR

2011-05-09 Thread Antonio Ospite
Don't wrap regulator_get() inside an #ifdef CONFIG_REGULATOR anymore, as now (since be1a50d) it correctly degenerates and returns NULL when the regulator framework is disabled. Signed-off-by: Antonio Ospite --- This comes after the discussion at http://www.mail-archive.com/linu

Re: [PATCH v2 4/4] mmc_spi.c: add support for the regulator framework

2011-05-06 Thread Antonio Ospite
On Fri, 22 Apr 2011 14:43:11 +0200 Antonio Ospite wrote: > Add support for powering up SD cards driven by regulators. > This makes the mmc_spi driver work also with the Motorola A910 phone. > > Signed-off-by: Antonio Ospite > --- > > Changes since v1: > - Remove th

[PATCH v2 4/4] mmc_spi.c: add support for the regulator framework

2011-04-22 Thread Antonio Ospite
Add support for powering up SD cards driven by regulators. This makes the mmc_spi driver work also with the Motorola A910 phone. Signed-off-by: Antonio Ospite --- Changes since v1: - Remove the ifdef CONFIG_REGULATOR as regulator_get() degenerates to a stub as well when the regulator

Re: [RESEND PATCH 4/4] mmc_spi.c: add support for the regulator framework

2011-04-21 Thread Antonio Ospite
On Thu, 21 Apr 2011 13:40:41 +0100 Mark Brown wrote: > On Thu, Apr 21, 2011 at 02:27:53PM +0200, Antonio Ospite wrote: > > > +#ifdef CONFIG_REGULATOR > > + host->vcc = regulator_get(mmc_dev(host->mmc), "vmmc"); > > + > > + if (IS_ERR(

[RESEND PATCH 1/4] mmc_spi.c: factor out the check for power capability

2011-04-21 Thread Antonio Ospite
Factor out the 'canpower' condition into a dedicated function in order to avoid repetition and to make changing the condition easier. Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git

[RESEND PATCH 2/4] mmc_spi.c: factor out the SD card shutdown sequence

2011-04-21 Thread Antonio Ospite
Factor out the SD card shutdown sequence to a dedicated mmc_spi_shutdownsequence() function in order to make mmc_spi_set_ios() more readable, and also for symmetry with mmc_spi_initsequence() which is already a dedicated function. Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c

[RESEND PATCH 4/4] mmc_spi.c: add support for the regulator framework

2011-04-21 Thread Antonio Ospite
Add support for powering up SD cards driven by regulators. This makes the mmc_spi driver work also with the Motorola A910 phone. Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c | 61 +++ 1 files changed, 49 insertions(+), 12 deletions

[RESEND PATCH 3/4] mmc_spi.c: factor out a mmc_spi_setpower() function

2011-04-21 Thread Antonio Ospite
Factor out a mmc_spi_setpower() function so to make changing it more elegant without adding too much stuff to mmc_spi_set_ios(). Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c | 43 +++ 1 files changed, 31 insertions(+), 12 deletions

[RESEND PATCH 0/4] mmc_spi: Add support for regulator framework

2011-04-21 Thread Antonio Ospite
just to be sure no regressions have been introduced. Thanks, Antonio Antonio Ospite (4): mmc_spi.c: factor out the check for power capability mmc_spi.c: factor out the SD card shutdown sequence mmc_spi.c: factor out a mmc_spi_setpower() function mmc_spi.c: add support for the regulator

Re: [PATCH 0/4] mmc_spi: Add support for regulator framework

2011-04-05 Thread Antonio Ospite
On Mon, 4 Apr 2011 21:05:43 -0600 Grant Likely wrote: > On Mon, Apr 04, 2011 at 11:56:31AM +0200, Antonio Ospite wrote: > > On Mon, 21 Mar 2011 19:46:38 +0100 > > Antonio Ospite wrote: > > > > > Hi, > > > > > > this patchset has the purpose of a

Re: [PATCH 0/4] mmc_spi: Add support for regulator framework

2011-04-04 Thread Antonio Ospite
On Mon, 21 Mar 2011 19:46:38 +0100 Antonio Ospite wrote: > Hi, > > this patchset has the purpose of adding support for the regulator framework > to > the mmc_spi driver. The first three patches are preparatory cleanups to make > the fourth one more straightforward. >

[PATCH 0/4] mmc_spi: Add support for regulator framework

2011-03-21 Thread Antonio Ospite
Antonio Ospite (4): mmc_spi.c: factor out the check for power capability mmc_spi.c: factor out the SD card shutdown sequence mmc_spi.c: factor out a mmc_spi_setpower() function mmc_spi.c: add support for the regulator framework drivers/mmc/host/mmc_spi.c | 194

[PATCH 2/4] mmc_spi.c: factor out the SD card shutdown sequence

2011-03-21 Thread Antonio Ospite
Factor out the SD card shutdown sequence to a dedicated mmc_spi_shutdownsequence() function in order to make mmc_spi_set_ios() more readable, and also for symmetry with mmc_spi_initsequence() which is already a dedicated function. Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c

[PATCH 1/4] mmc_spi.c: factor out the check for power capability

2011-03-21 Thread Antonio Ospite
Factor out the 'canpower' condition into a dedicated function in order to avoid repetition and to make changing the condition easier. Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git

[PATCH 4/4] mmc_spi.c: add support for the regulator framework

2011-03-21 Thread Antonio Ospite
Add support for powering up SD cards driven by regulators. This makes the mmc_spi driver work also with the Motorola A910 phone. Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c | 61 +++ 1 files changed, 49 insertions(+), 12 deletions

[PATCH 3/4] mmc_spi.c: factor out a mmc_spi_setpower() function

2011-03-21 Thread Antonio Ospite
Factor out a mmc_spi_setpower() function so to make changing it more elegant without adding too much stuff to mmc_spi_set_ios(). Signed-off-by: Antonio Ospite --- drivers/mmc/host/mmc_spi.c | 43 +++ 1 files changed, 31 insertions(+), 12 deletions

Re: Request for SPI testing

2010-07-03 Thread Antonio Ospite
c | 59 ++- > drivers/spi/omap_spi_100k.c | 23 +++-- > drivers/spi/spi.c | 225 > --- > include/linux/spi/spi.h | 12 +++ > 4 files changed, 227 insertions(+), 92 deletions(-) > > -- > Grant Likely, B.Sc., P.Eng. > Secret Lab Technologies Ltd

Re: [PATCH] pxamci: fix printing gpio numbers in pxamci_probe

2009-10-08 Thread Antonio Ospite
On Thu, 8 Oct 2009 21:21:48 +0800 Eric Miao wrote: > On Tue, Oct 6, 2009 at 1:56 AM, Robert Jarzmik wrote: > > Antonio Ospite writes: > > > >> On Fri,  2 Oct 2009 16:24:02 +0200 > >> Antonio Ospite wrote: > >> > >>> Signed-off-by: Ant

Re: [PATCH] pxamci: fix printing gpio numbers in pxamci_probe

2009-10-05 Thread Antonio Ospite
On Fri, 2 Oct 2009 16:24:02 +0200 Antonio Ospite wrote: > Signed-off-by: Antonio Ospite > --- > drivers/mmc/host/pxamci.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c > index 5e

[PATCH] pxamci: fix printing gpio numbers in pxamci_probe

2009-10-02 Thread Antonio Ospite
Signed-off-by: Antonio Ospite --- drivers/mmc/host/pxamci.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 5e0b152..b00d673 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -693,7