]> 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)
commitdd63f04c0d12e014210e95bcf5a65537515959d6
treea3ea9dd283f7078c8792c30e25f657c080e940b0
parentc9c2d7b8258ef5d2429992eb5cda0fcfb611e526
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