public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@nokia.com>
To: David Brownell <david-b@pacbell.net>
Cc: OMAP <linux-omap@vger.kernel.org>
Subject: Re: [patch 2.6.29-rc7-omap 5/5] mmc-twl4030 uses regulator framework
Date: Thu, 12 Mar 2009 10:57:45 +0200	[thread overview]
Message-ID: <49B8CE89.2000608@nokia.com> (raw)
In-Reply-To: <200903110524.16644.david-b@pacbell.net>

David Brownell wrote:
> From: David Brownell <dbrownell@users.sourceforge.net>
> Subject: mmc-twl4030 uses regulator framework
> 
> Finish decoupling the HSMMC glue from the twl4030 as the only
> regulator provider, using the regulator framework instead.
> This makes the glue's "mmc-twl4030" name become a complete
> misnomer ... this code could probably all migrate into the
> HSMMC driver now.
> 
> Tested on 3430SDP (SD and low-voltage MMC) and Beagle (SD),
> plus some other boards (including Overo) after they were
> converted to set up MMC regulators properly.
> 
> Eventually all boards should just associate a regulator with
> each MMC controller they use.  In some cases (Overo MMC2 and
> Pandora MMC3, at least) that would be a fixed-voltage regulator
> with no real software control.  As a temporary hack (pending
> regulator-next updates to make the "fixed.c" regulator become
> usable) there's a new ocr_mask field for those boards.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---

snip

> @@ -349,24 +276,23 @@ static int twl_mmc2_set_power(struct dev
>                         reg |= OMAP2_MMCSDIO2ADPCLKISEL;
>                         omap_ctrl_writel(reg, control_devconf1_offset);
>                 }
> -               ret = twl_mmc_set_voltage(c, vdd);
> +               ret = mmc_regulator_set_ocr(c->vcc, vdd);
> +               /* enable interface voltage rail, if needed */
> +               if (ret == 0 && c->vcc_aux) {
> +                       ret = regulator_enable(c->vcc_aux);
> +                       if (ret < 0)
> +                               ret = mmc_regulator_set_ocr(c->vcc, 0);
> +               }
>         } else {
> -               ret = twl_mmc_set_voltage(c, 0);
> +               if (c->vcc_aux)
> +                       ret = regulator_enable(c->vcc_aux);

Sorry for slow reply.  Shouldn't that be regulator_disable() ?

> +               if (ret == 0)
> +                       ret = mmc_regulator_set_ocr(c->vcc, 0);
>         }
> 
>         return ret;
>  }
> 

snip

  parent reply	other threads:[~2009-03-12  8:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 12:18 [patch 2.6.29-rc7-omap 0/5] mmc-twl4030 loses twl4030-dependency David Brownell
2009-03-11 12:20 ` [patch 2.6.29-rc7-omap 1/5] regulator: enumerate voltages David Brownell
2009-03-11 16:09   ` [APPLIED] regulator: enumerate voltages (v2) Tony Lindgren
2009-03-11 12:21 ` [patch 2.6.29-rc7-omap 2/5] regulator: twl4030 voltage enumeration David Brownell
2009-03-11 16:09   ` [APPLIED] regulator: twl4030 voltage enumeration (v2) Tony Lindgren
2009-03-11 12:22 ` [patch 2.6.29-rc7-omap 3/5] regulator: twl4030 voltage enumeration cleanup David Brownell
2009-03-11 16:09   ` [APPLIED] regulator: twl4030 voltage enumeration (v2) cleanups Tony Lindgren
2009-03-11 12:23 ` [patch 2.6.29-rc7-omap 4/5] MMC: regulator utilities David Brownell
2009-03-11 16:09   ` [APPLIED] " Tony Lindgren
2009-03-11 12:24 ` [patch 2.6.29-rc7-omap 5/5] mmc-twl4030 uses regulator framework David Brownell
2009-03-11 16:09   ` [APPLIED] " Tony Lindgren
2009-03-12  8:57   ` Adrian Hunter [this message]
2009-03-12  9:22     ` [patch 2.6.29-rc7-omap 5/5] " David Brownell
2009-03-16 14:44       ` Adrian Hunter
2009-03-16 19:33         ` David Brownell
2009-03-17  6:38           ` Adrian Hunter
2009-03-17  7:07             ` David Brownell
2009-03-17  7:12               ` Adrian Hunter
2009-03-17 10:25                 ` David Brownell

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=49B8CE89.2000608@nokia.com \
    --to=adrian.hunter@nokia.com \
    --cc=david-b@pacbell.net \
    --cc=linux-omap@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox