linux/drivers/mmc/core
Anton Vorontsov 08f80bb519 mmc: change .get_ro() callback semantics
Now get_ro() callback must return 0/1 values for its logical states, and
negative errno values in case of error. If particular host instance doesn't
support RO/WP switch, it should return -ENOSYS.

This patch changes some hosts in two ways:

1. Now functions should be smart to not return negative values in
   "RO asserted" case (particularly gpio_ calls could return negative
   values for the outermost GPIOs).

   Also, board code usually passes get_ro() callbacks that directly return
   gpioreg & bit result, so at91_mci, imxmmc, pxamci and mmc_spi's get_ro()
   handlers need take special care when returning platform's values to the
   mmc core.

2. In case of host instance didn't implement get_ro() callback, it should
   really return -ENOSYS and let the mmc core decide what to do about it
   (mmc core thinks the same way as the hosts, so it isn't functional
   change).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-07-15 14:14:41 +02:00
..
Kconfig
Makefile mmc: use sysfs groups to handle conditional attributes 2008-03-22 17:02:20 -07:00
bus.c mmc: use sysfs groups to handle conditional attributes 2008-03-22 17:02:20 -07:00
bus.h mmc: use sysfs groups to handle conditional attributes 2008-03-22 17:02:20 -07:00
core.c mmc: add support for card-detection polling 2008-07-15 14:14:41 +02:00
core.h mmc: proper prototypes for mmc_attach_*() 2008-04-18 20:05:32 +02:00
host.c mmc: set controller name early 2008-04-18 20:05:26 +02:00
host.h
mmc.c mmc: use sysfs groups to handle conditional attributes 2008-03-22 17:02:20 -07:00
mmc_ops.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
mmc_ops.h
sd.c mmc: change .get_ro() callback semantics 2008-07-15 14:14:41 +02:00
sd_ops.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
sd_ops.h
sdio.c mmc: use sysfs groups to handle conditional attributes 2008-03-22 17:02:20 -07:00
sdio_bus.c
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c
sdio_irq.c mmc: use shorter, equivalent set_current_state() 2008-04-18 20:05:27 +02:00
sdio_ops.c mmc: sdio_ops.c should #include "sdio_ops.h" 2008-04-18 20:05:33 +02:00
sdio_ops.h