]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: omap_hsmmc: use distinctive code paths for cover / card detect logic
authorAndreas Fenkart <afenkart@gmail.com>
Tue, 3 Mar 2015 12:28:15 +0000 (13:28 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 23 Mar 2015 13:13:37 +0000 (14:13 +0100)
commit38dee1dcf42a7b74f8a7485ede59d34a006d2ab8
treea3ea9dd283f7078c8792c30e25f657c080e940b0
parentce28139ddfb472f2daa9328d3b73a24a4bf3f8e7
mmc: omap_hsmmc: use distinctive code paths for cover / card detect logic

Mobile phones (some) have no card detect pin, but can detect if the
cover is removed. The purpose is the same; detect if card is being
added/removed, but the details differ.
When the cover is removed, it does not mean the card is gone. But it
might, since it is accessible now. It's like a warning. All the driver
does is to limit write access to the card, see protect_card flag.
In contrast, card detect notifies us after the fact, e.g.
card is gone, card is inserted. We can't take precautions, but we can
rely on those events, -- the card is really gone, or do scan the card.
To summarize there is not much code sharing between cover and card
detect, it only increases confusion. By splitting, both will be
simplified in a followup patch.

Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/omap_hsmmc.c