Skip to content

mmc: simplify WP/CD GPIO handling

Michał Mirosław linux-gpio linux-mmc lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review
  2. v14 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4gpio: add gpiod_toggle_active_low()drivers/gpio/gpiolib.c include/linux/gpio/consumer.h+18 -00 replies
2/4mmc: rework wp-gpio handlingdrivers/gpio/gpiolib-of.c drivers/mmc/core/host.c drivers/mmc/core/slot-gpio.c +2 more+13 -160 replies
3/4mmc: rework cd-gpio handlingdrivers/gpio/gpiolib-of.c drivers/mmc/core/host.c drivers/mmc/core/slot-gpio.c+12 -430 replies
4/4mmc: remove mmc_gpiod_request_*(invert_gpio)drivers/mmc/core/host.c drivers/mmc/core/slot-gpio.c drivers/mmc/host/davinci_mmc.c +11 more+24 -370 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchLinus Walleij
1/4A-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] mmc: simplify WP/CD GPIO handling

This series removes convoluted handling of inverted CD and WP lines in SD/MMC host drivers when using GPIOs.

First patch adds an API: gpiod_toggle_active_low() that switches line inversion flag in the gpiod structure. Next two patches modify MMC host's WP and CD initialization to apply all the inversions onto gpiod's active-low flag. Final patch removes now-unused argument from init functions.

x86 allyesconfig build-tested.

v2: move argument removal in sdhci-esdhc-imx.c to last patch

Michał Mirosław (4):
gpio: add gpiod_toggle_active_low()
mmc: rework wp-gpio handling
mmc: rework cd-gpio handling
mmc: remove mmc_gpiod_request_*(invert_gpio)

 drivers/gpio/gpiolib-of.c          | 21 -------------------
 drivers/gpio/gpiolib.c             | 11 ++++++++++
 drivers/mmc/core/host.c            | 33 ++++++++----------------------
 drivers/mmc/core/slot-gpio.c       | 31 ++++++++++------------------
 drivers/mmc/host/davinci_mmc.c     |  4 ++--
 drivers/mmc/host/mmc_spi.c         |  4 ++--
 drivers/mmc/host/mmci.c            |  4 ++--
 drivers/mmc/host/pxamci.c          | 12 +++++------
 drivers/mmc/host/s3cmci.c          |  4 ++--
 drivers/mmc/host/sdhci-acpi.c      |  2 +-
 drivers/mmc/host/sdhci-esdhc-imx.c | 15 +++++++-------
 drivers/mmc/host/sdhci-pci-core.c  |  4 ++--
 drivers/mmc/host/sdhci-sirf.c      |  2 +-
 drivers/mmc/host/sdhci-spear.c     |  2 +-
 drivers/mmc/host/tmio_mmc_core.c   |  2 +-
 include/linux/gpio/consumer.h      |  7 +++++++
 include/linux/mmc/slot-gpio.h      |  5 ++---
 17 files changed, 67 insertions(+), 96 deletions(-)
Signature · 1 line
2.20.1