]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: Add support for disabling write-protect detection
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 6 May 2015 18:31:19 +0000 (20:31 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:06:59 +0000 (09:06 +0200)
commit0e9dda382f7004102771bcb93c7b570f5c428865
tree427a344078d58843f9d5a7fcc1f303c54ff26dc6
parent900fdf65fce7862acdc8538600647b9f48460972
mmc: Add support for disabling write-protect detection

It is not uncommon to see systems where there is no physical write-protect
signal (e.g. when using eMMC or microSD card slots). For some controllers,
which have a dedicated write-protection detection logic (like SDHCI
controllers), the get_ro() callback can return bogus data in such a case.

Instead of handling this on a per controller basis this patch adds a new
capability flag to the MMC core that can be set to specify that the result
of get_ro() is invalid. When the flag is set the core will not call
get_ro() and assume that the card is always read-write.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sd.c
include/linux/mmc/host.h