]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: Rework cd-gpio handling
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Wed, 11 Dec 2019 02:40:56 +0000 (03:40 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 18 Dec 2019 12:36:53 +0000 (13:36 +0100)
commit7bf2c109f43a59b789453c4c81c2e302461b6436
tree51960fa94ae330a03ec98c93091d806623ddf141
parent0eca8d868ac6dc913aa9c5a0ff5a73fb48ea37c4
mmc: core: Rework cd-gpio handling

There are a few places around the code that invert inverted and possibly
inverted CD line. That's really confusing. Squash them all into one place
in mmc_gpiod_request_cd(). MMC_CAP2_CD_ACTIVE_HIGH is used analogously to
WP line: in GPIO mode it is used only at probe time to switch polarity, for
native mode it is left as is.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/db189b715596d63caf8c6a088bddc71dd69a879b.1576031637.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/gpio/gpiolib-of.c
drivers/mmc/core/host.c
drivers/mmc/core/slot-gpio.c