linux/drivers/mmc/core
Hans de Goede c0a16ff432 mmc: core: Add mmc_gpiod_set_cd_config() function
commit 63a7cd6602 upstream.

Some mmc host drivers may need to fixup a card-detection GPIO's config
to e.g. enable the GPIO controllers builtin pull-up resistor on devices
where the firmware description of the GPIO is broken (e.g. GpioInt with
PullNone instead of PullUp in ACPI DSDT).

Since this is the exception rather then the rule adding a config
parameter to mmc_gpiod_request_cd() seems undesirable, so instead
add a new mmc_gpiod_set_cd_config() function. This is simply a wrapper
to call gpiod_set_config() on the card-detect GPIO acquired through
mmc_gpiod_request_cd().

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240410191639.526324-2-hdegoede@redhat.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:47:36 +02:00
..
block.c mmc: core: Avoid negative index with array access 2024-04-03 15:28:56 +02:00
block.h
bus.c mmc: core: propagate removable attribute to driver core 2023-08-09 13:21:48 +02:00
bus.h
card.h mmc: Add quirk MMC_QUIRK_BROKEN_CACHE_FLUSH for Micron eMMC Q2J54A 2023-11-28 17:20:01 +00:00
core.c mmc: block: Be sure to wait while busy in CQE error recovery 2023-12-08 08:52:16 +01:00
core.h
crypto.c
crypto.h
debugfs.c mmc: core: remove unnecessary (void*) conversions 2023-04-03 14:36:12 +02:00
host.c mmc: core: Do not force a retune before RPMB switch 2024-06-16 13:47:30 +02:00
host.h
Kconfig
Makefile
mmc_ops.c
mmc_ops.h mmc: core: Add host specific tuning support for SD HS mode 2023-08-25 11:45:51 +02:00
mmc_test.c mmc: core: remove unnecessary (void*) conversions 2023-04-03 14:36:12 +02:00
mmc.c mmc: core: Add HS400 tuning in HS400es initialization 2024-05-25 16:22:53 +02:00
pwrseq_emmc.c mmc: pwrseq: Convert to platform remove callback returning void 2023-08-15 12:48:20 +02:00
pwrseq_sd8787.c mmc: pwrseq: sd8787: Convert to platform remove callback returning void 2023-08-15 12:48:20 +02:00
pwrseq_simple.c mmc: pwrseq_simple: Convert to platform remove callback returning void 2023-08-15 12:48:20 +02:00
pwrseq.c
pwrseq.h
queue.c
queue.h
quirks.h mmc: Add quirk MMC_QUIRK_BROKEN_CACHE_FLUSH for Micron eMMC Q2J54A 2023-11-28 17:20:01 +00:00
regulator.c mmc: core: add helpers mmc_regulator_enable/disable_vqmmc 2023-03-23 11:38:34 +01:00
sd_ops.c mmc: core: Add host specific tuning support for SD HS mode 2023-08-25 11:45:51 +02:00
sd_ops.h mmc: core: Add host specific tuning support for SD HS mode 2023-08-25 11:45:51 +02:00
sd.c mmc: core: Add host specific tuning support for SD HS mode 2023-08-25 11:45:51 +02:00
sd.h
sdio_bus.c
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c
sdio_irq.c
sdio_ops.c
sdio_ops.h
sdio_uart.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
sdio.c mmc: core: sdio: hold retuning if sdio in 1-bit mode 2023-09-26 15:08:05 +02:00
slot-gpio.c mmc: core: Add mmc_gpiod_set_cd_config() function 2024-06-16 13:47:36 +02:00
slot-gpio.h