Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: core: Add 'card' to drive strength selection callback

In preparation for supporting also eMMC drive strength,
add the 'card' as a parameter so that the callback can
distinguish different types of cards if necessary.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Adrian Hunter and committed by
Ulf Hansson
f168359e fa021cef

+4 -3
+1 -1
drivers/mmc/core/sd.c
··· 411 411 * return what is possible given the options 412 412 */ 413 413 mmc_host_clk_hold(card->host); 414 - drive_strength = card->host->ops->select_drive_strength( 414 + drive_strength = card->host->ops->select_drive_strength(card, 415 415 card->sw_caps.uhs_max_dtr, 416 416 host_drv_type, card_drv_type, &drv_type); 417 417 mmc_host_clk_release(card->host);
+1 -1
drivers/mmc/core/sdio.c
··· 427 427 * information and let the hardware specific code 428 428 * return what is possible given the options 429 429 */ 430 - drive_strength = card->host->ops->select_drive_strength( 430 + drive_strength = card->host->ops->select_drive_strength(card, 431 431 card->sw_caps.uhs_max_dtr, 432 432 host_drv_type, card_drv_type, &drv_type); 433 433
+2 -1
include/linux/mmc/host.h
··· 132 132 133 133 /* Prepare HS400 target operating frequency depending host driver */ 134 134 int (*prepare_hs400_tuning)(struct mmc_host *host, struct mmc_ios *ios); 135 - int (*select_drive_strength)(unsigned int max_dtr, int host_drv, 135 + int (*select_drive_strength)(struct mmc_card *card, 136 + unsigned int max_dtr, int host_drv, 136 137 int card_drv, int *drv_type); 137 138 void (*hw_reset)(struct mmc_host *host); 138 139 void (*card_event)(struct mmc_host *host);