Lines Matching refs:mmc

106 int mmc_regulator_set_ocr(struct mmc_host *mmc,  in mmc_regulator_set_ocr()  argument
117 if (result == 0 && !mmc->regulator_enabled) { in mmc_regulator_set_ocr()
120 mmc->regulator_enabled = true; in mmc_regulator_set_ocr()
122 } else if (mmc->regulator_enabled) { in mmc_regulator_set_ocr()
125 mmc->regulator_enabled = false; in mmc_regulator_set_ocr()
129 dev_err(mmc_dev(mmc), in mmc_regulator_set_ocr()
179 int mmc_regulator_set_vqmmc(struct mmc_host *mmc, struct mmc_ios *ios) in mmc_regulator_set_vqmmc() argument
181 struct device *dev = mmc_dev(mmc); in mmc_regulator_set_vqmmc()
185 if (IS_ERR(mmc->supply.vqmmc)) in mmc_regulator_set_vqmmc()
190 return mmc_regulator_set_voltage_if_supported(mmc->supply.vqmmc, in mmc_regulator_set_vqmmc()
193 return mmc_regulator_set_voltage_if_supported(mmc->supply.vqmmc, in mmc_regulator_set_vqmmc()
196 ret = mmc_ocrbitnum_to_vdd(mmc->ios.vdd, &volt, &max_uV); in mmc_regulator_set_vqmmc()
213 ret = mmc_regulator_set_voltage_if_supported(mmc->supply.vqmmc, in mmc_regulator_set_vqmmc()
218 return mmc_regulator_set_voltage_if_supported(mmc->supply.vqmmc, in mmc_regulator_set_vqmmc()
245 int mmc_regulator_get_supply(struct mmc_host *mmc) in mmc_regulator_get_supply() argument
247 struct device *dev = mmc_dev(mmc); in mmc_regulator_get_supply()
250 mmc->supply.vmmc = devm_regulator_get_optional(dev, "vmmc"); in mmc_regulator_get_supply()
251 mmc->supply.vqmmc = devm_regulator_get_optional(dev, "vqmmc"); in mmc_regulator_get_supply()
253 if (IS_ERR(mmc->supply.vmmc)) { in mmc_regulator_get_supply()
254 if (PTR_ERR(mmc->supply.vmmc) == -EPROBE_DEFER) in mmc_regulator_get_supply()
258 ret = mmc_regulator_get_ocrmask(mmc->supply.vmmc); in mmc_regulator_get_supply()
260 mmc->ocr_avail = ret; in mmc_regulator_get_supply()
265 if (IS_ERR(mmc->supply.vqmmc)) { in mmc_regulator_get_supply()
266 if (PTR_ERR(mmc->supply.vqmmc) == -EPROBE_DEFER) in mmc_regulator_get_supply()