devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 0/4] mmc: core: Add support for MMC power sequences
@ 2015-01-19  9:13 Ulf Hansson
  2015-01-19  9:13 ` [PATCH V4 1/4] mmc: core: Initial " Ulf Hansson
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Ulf Hansson @ 2015-01-19  9:13 UTC (permalink / raw)
  To: linux-mmc, Chris Ball
  Cc: linux-arm-kernel, devicetree, Linus Walleij, Mark Brown,
	Arnd Bergmann, Alexandre Courbot, Arend van Spriel, Sascha Hauer,
	Olof Johansson, Russell King, Hans de Goede, Doug Anderson,
	NeilBrown, Tomeu Vizoso, Mark Rutland, Ulf Hansson

Changes in v4:
	- Fixed call to kfree() in patch3 and patch4.

Changes in v3:
	Fixed comments from Mark Rutland:
	- Document binding in one patch to get the big picture.
	- Keep code and DT document consistent around how many GPIO resets we
	  support. I decided to go for one GPIO, we can extend that if needed
	  later on.
	- Change compatible string for simple MMC power sequence and renamed the
	  file for its documentation.
	- Updated commit messages according to above changes.

Changes in v2:
	Fixed comments from Russell King:
	- Renamed pwrseq callbacks and corresponding interface functions.
	- Move the call to the previous namned ->power_on() callback, to the
	  end of mmc_power_up() to get consistent behavior.


This is yet another try to solve the issues of dealing with power sequences for
the MMC subsystem. The latest attempt, see link below, took a generic approach
by adding a new top level driver layer. That's was rejected by several reasons.
http://lwn.net/Articles/602855/

This time the approach is focused to fix the issues for MMC only.

To give a short background, SOCs may specify a specific MMC power sequence. To
successfully detect an (e)MMC/SD/SDIO card, that power sequence must be followed
while initializing the card.

To be able to handle these SOC specific power sequences, we add a MMC power
sequence interface, which helps the mmc core to deal with such.

A MMC power sequence provider then implements a set of callbacks from the above
mentioned interface. The provider has a corresponding DT compatibility string
and relies on CONFIG_OF to be set to find it's various resourses, like for
example a GPIO reset.

The mmc core will from mmc_of_parse() try find a "mmc-pwrseq" DT node and then
call the corresponding MMC power sequence provider's initialization function.


Ulf Hansson (4):
  mmc: core: Initial support for MMC power sequences
  mmc: pwrseq: Document DT bindings for the simple MMC power sequence
  mmc: pwrseq: Initial support for the simple MMC power sequence
    provider
  mmc: pwrseq_simple: Add support for a reset GPIO pin

 .../devicetree/bindings/mmc/mmc-pwrseq-simple.txt  |  20 ++++
 Documentation/devicetree/bindings/mmc/mmc.txt      |  14 +++
 drivers/mmc/core/Makefile                          |   2 +-
 drivers/mmc/core/core.c                            |   7 ++
 drivers/mmc/core/host.c                            |   4 +-
 drivers/mmc/core/pwrseq.c                          | 109 +++++++++++++++++++++
 drivers/mmc/core/pwrseq.h                          |  42 ++++++++
 drivers/mmc/core/pwrseq_simple.c                   |  86 ++++++++++++++++
 include/linux/mmc/host.h                           |   2 +
 9 files changed, 284 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt
 create mode 100644 drivers/mmc/core/pwrseq.c
 create mode 100644 drivers/mmc/core/pwrseq.h
 create mode 100644 drivers/mmc/core/pwrseq_simple.c

-- 
1.9.1


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

end of thread, other threads:[~2015-03-05  9:05 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19  9:13 [PATCH V4 0/4] mmc: core: Add support for MMC power sequences Ulf Hansson
2015-01-19  9:13 ` [PATCH V4 1/4] mmc: core: Initial " Ulf Hansson
2015-01-28 10:17   ` Javier Martinez Canillas
2015-01-28 11:36     ` Ulf Hansson
2015-01-28 12:47       ` Javier Martinez Canillas
     [not found] ` <1421658784-11980-1-git-send-email-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-01-19  9:13   ` [PATCH V4 2/4] mmc: pwrseq: Document DT bindings for the simple MMC power sequence Ulf Hansson
2015-01-28 10:18     ` Javier Martinez Canillas
2015-01-19  9:13   ` [PATCH V4 4/4] mmc: pwrseq_simple: Add support for a reset GPIO pin Ulf Hansson
2015-01-23 15:56     ` Javier Martinez Canillas
     [not found]       ` <CABxcv=nGWPnkNz1tXJpaTUkroucDgVYzeCrEmZvA8xfzHzROvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-23 17:01         ` Ulf Hansson
2015-01-23 17:09           ` Javier Martinez Canillas
2015-01-28 10:20     ` Javier Martinez Canillas
2015-02-10  9:12     ` Alexandre Courbot
2015-02-11  4:34       ` Ulf Hansson
2015-03-05  9:05         ` Linus Walleij
2015-01-19  9:13 ` [PATCH V4 3/4] mmc: pwrseq: Initial support for the simple MMC power sequence provider Ulf Hansson
2015-01-28 10:19   ` Javier Martinez Canillas
2015-02-10  8:34   ` Alexandre Courbot
2015-02-11  4:28     ` Ulf Hansson
     [not found]       ` <CAPDyKFrdpknrMa62Vz4dfKaFMTdF-uXaAz3pkw_3qwNvHy49SQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-11  4:34         ` Alexandre Courbot
2015-01-22  9:28 ` [PATCH V4 0/4] mmc: core: Add support for MMC power sequences Ulf Hansson

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).