linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3 resend] omap_hsmmc: reuse mmc/slot-gpio functions
@ 2014-08-08 10:16 Andreas Fenkart
  2014-08-08 10:16 ` [PATCH 1/3 resend] omap_hsmmc: reuse mmc/slot-gpio for write protect detection Andreas Fenkart
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andreas Fenkart @ 2014-08-08 10:16 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-omap, Tony Lindgren, Balaji T K, daniel, Andreas Fenkart

Hi,

I would like to reuse mmc_of_parse for 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 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 could work transparently for most features but definitely
not for cd-gpios/wp-gpios. Pls can somebody 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, so
patches are untested, :-( 

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

Another issue is 'ti,non-removable' which could be mappend to
stanadard 'non-removable' if 'no_regulator_off_init' was 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;              
        }   

/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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 0/3 resend] omap_hsmmc: reuse mmc/slot-gpio functions
@ 2014-07-26 18:34 Andreas Fenkart
  2014-07-26 18:34 ` [PATCH 3/3 resend] omap_hsmmc: reuse mmc/slot-gpio for card detect instead of open-coded version Andreas Fenkart
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Fenkart @ 2014-07-26 18:34 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-omap, Tony Lindgren, Balaji T K, daniel, Andreas Fenkart

Hi,

I would like to reuse mmc_of_parse for 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 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 could work transparently for most features but definitely
not for cd-gpios/wp-gpios. Pls can somebody 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, so
patches are untested, :-( 

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

Another issue is 'ti,non-removable' which could be mappend to
stanadard 'non-removable' if 'no_regulator_off_init' was 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;              
        }   

/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


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

end of thread, other threads:[~2014-08-08 10:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08 10:16 [PATCH 0/3 resend] omap_hsmmc: reuse mmc/slot-gpio functions Andreas Fenkart
2014-08-08 10:16 ` [PATCH 1/3 resend] omap_hsmmc: reuse mmc/slot-gpio for write protect detection Andreas Fenkart
2014-08-08 10:16 ` [PATCH 2/3 resend] omap_hsmmc: separate card_detect/cover detect logic Andreas Fenkart
2014-08-08 10:17 ` [PATCH 3/3 resend] omap_hsmmc: reuse mmc/slot-gpio for card detect instead of open-coded version Andreas Fenkart
  -- strict thread matches above, loose matches on Subject: below --
2014-07-26 18:34 [PATCH 0/3 resend] omap_hsmmc: reuse mmc/slot-gpio functions Andreas Fenkart
2014-07-26 18:34 ` [PATCH 3/3 resend] omap_hsmmc: reuse mmc/slot-gpio for card detect instead of open-coded version Andreas Fenkart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).