public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Fenkart <afenkart@gmail.com>
To: Balaji T K <balajitk@ti.com>
Cc: linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org,
	Tony Lindgren <tony@atomide.com>,
	ulf.hansson@linaro.org, daniel@zonque.org,
	Andreas Fenkart <afenkart@gmail.com>
Subject: [PATCH 0/3] omap_hsmmc: reuse mmc/slot-gpio functions
Date: Fri, 18 Jul 2014 09:22:00 +0200	[thread overview]
Message-ID: <1405668123-17073-1-git-send-email-afenkart@gmail.com> (raw)

Hi Balaji,

I'm trying to reuse mmc_of_parse for parsing standard mmc features: 
- cd-gpios / wp-gpios
- bus-width 
- max-frequency
- keep-power-in-suspend
- enable-sdio-wakeup
- ti,non-removable, evtl.

Currently these are open-coded in of_get_hsmmc_pdata. I tried
removing them all from of_get_hsmmc_pdata and call mmc_of_parse
at the end of the probe function:

@@ -2241,8 +2264,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
        omap_hsmmc_protect_card(host);
+       mmc_of_parse(host->mmc);
        mmc_add_host(mmc);

This should work transparently for most features except,
cd-gpios/wp-gpios. Pls can you have a look at the followup
patches? I tried an intermediate step mapping card detect /
read-only detect onto mmc/slot-gpio that are used by
mmc_of_parse. I don't have card detect/read-only detect pins, :-(

Do we still need cover_detect functionality or could it be merged
with card detect?

Another issue is 'ti,non-removable' which could be mappend to
'non-removable' if 'no_regulator_off_init' could be handled in a
different way.

        if (of_find_property(np, "ti,non-removable", NULL)) {      
                pdata->slots[0].nonremovable = true;                     
                pdata->slots[0].no_regulator_off_init = true;              
        }   

thanks,
Andreas

Andreas Fenkart (3):
  omap_hsmmc: reuse mmc/slot-gpio for write protect detection
  omap_hsmmc: separate card_detect/cover detect logic
  omap_hsmmc: reuse mmc/slot-gpio for card detect instead of open-coded
    version

 drivers/mmc/host/omap_hsmmc.c          | 172 ++++++++++++++-------------------
 include/linux/platform_data/mmc-omap.h |   6 +-
 2 files changed, 73 insertions(+), 105 deletions(-)

-- 
2.0.0


             reply	other threads:[~2014-07-18  7:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18  7:22 Andreas Fenkart [this message]
2014-07-18  7:22 ` [PATCH 1/3] omap_hsmmc: reuse mmc/slot-gpio for write protect detection Andreas Fenkart
2014-07-18  7:22 ` [PATCH 2/3] omap_hsmmc: separate card_detect/cover detect logic Andreas Fenkart
2014-07-18  7:22 ` [PATCH 3/3] omap_hsmmc: reuse mmc/slot-gpio for card detect instead of open-coded version Andreas Fenkart

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=1405668123-17073-1-git-send-email-afenkart@gmail.com \
    --to=afenkart@gmail.com \
    --cc=balajitk@ti.com \
    --cc=daniel@zonque.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.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