After discovering a problem in regulator reference counting I
took Mark Brown's advice to move the reference count into the
MMC core by making the regulator status a member of
struct mmc_host.
I took this opportunity to also implement NULL versions of
the regulator functions so as to rid the driver code from
some ugly #ifdef CONFIG_REGULATOR clauses.
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Pierre Ossman <pierre@ossman.eu>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Cliff Brake <cbrake@bec-systems.com>
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Sundar Iyer <sundar.iyer@stericsson.com>
Cc: Bengt Jonsson <bengt.jonsson@stericsson.com>
Cc: linux-mmc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
This is not the final movement of regulator code into the
MMC framework by a long shot, but it's atleast a starter.
If you like it, ACK it.
It's not easy for me to test this code since both the OMAP2 and
PXA3XX defconfigs have (unrelated) build failures on the current
-next tree, however the U300 builds fine and seems to work nicely,
I'll stress-test it a bit more though.
---
drivers/mmc/core/core.c | 38 +++++++++++++++++++++++++++++---------
drivers/mmc/host/mmci.c | 21 +++++++++++++--------
drivers/mmc/host/omap_hsmmc.c | 32 ++++++++++++++++++++++----------
drivers/mmc/host/pxamci.c | 24 ++++++++++++++++++------
include/linux/mmc/host.h | 8 +++++++-
5 files changed, 89 insertions(+), 34 deletions(-)
diff ...