/* If desired, disconnect the pull-up resistor on CD/DAT (pin 1) of the card. This may be required on certain setups of boards, controllers and embedded sdio device which do not need the card's pull-up. As a result, card detection is disabled and power is saved.  */
static int sdio_disable_cd(struct mmc_card *card)
/* If desired, disconnect the pull-up resistor on CD/DAT (pin 1) of the card. This may be required on certain setups of boards, controllers and embedded sdio device which do not need the card's pull-up. As a result, card detection is disabled and power is saved.  */
static int sdio_disable_cd(struct mmc_card *card)
{
	int ret;
	u8 ctrl;
	if (!card->cccr.disable_cd)
		return 0;
	ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_IF, 0, &ctrl);
	if (ret)
		return ret;
	ctrl |= SDIO_BUS_CD_DISABLE;
	return mmc_io_rw_direct(card, 1, 0, SDIO_CCCR_IF, ctrl, NULL);
}