mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Revert "mmc: core: add helpers mmc_regulator_enable/disable_vqmmc"
This reverts commit38d3216032which is commit8d91f3f8aeupstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I67705a9f4b04cf051f9b0f1a3494284ae0122da2 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
c49b4a744f
commit
44affaea1e
@@ -271,44 +271,3 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mmc_regulator_get_supply);
|
EXPORT_SYMBOL_GPL(mmc_regulator_get_supply);
|
||||||
|
|
||||||
/**
|
|
||||||
* mmc_regulator_enable_vqmmc - enable VQMMC regulator for a host
|
|
||||||
* @mmc: the host to regulate
|
|
||||||
*
|
|
||||||
* Returns 0 or errno. Enables the regulator for vqmmc.
|
|
||||||
* Keeps track of the enable status for ensuring that calls to
|
|
||||||
* regulator_enable/disable are balanced.
|
|
||||||
*/
|
|
||||||
int mmc_regulator_enable_vqmmc(struct mmc_host *mmc)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (!IS_ERR(mmc->supply.vqmmc) && !mmc->vqmmc_enabled) {
|
|
||||||
ret = regulator_enable(mmc->supply.vqmmc);
|
|
||||||
if (ret < 0)
|
|
||||||
dev_err(mmc_dev(mmc), "enabling vqmmc regulator failed\n");
|
|
||||||
else
|
|
||||||
mmc->vqmmc_enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(mmc_regulator_enable_vqmmc);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* mmc_regulator_disable_vqmmc - disable VQMMC regulator for a host
|
|
||||||
* @mmc: the host to regulate
|
|
||||||
*
|
|
||||||
* Returns 0 or errno. Disables the regulator for vqmmc.
|
|
||||||
* Keeps track of the enable status for ensuring that calls to
|
|
||||||
* regulator_enable/disable are balanced.
|
|
||||||
*/
|
|
||||||
void mmc_regulator_disable_vqmmc(struct mmc_host *mmc)
|
|
||||||
{
|
|
||||||
if (!IS_ERR(mmc->supply.vqmmc) && mmc->vqmmc_enabled) {
|
|
||||||
regulator_disable(mmc->supply.vqmmc);
|
|
||||||
mmc->vqmmc_enabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(mmc_regulator_disable_vqmmc);
|
|
||||||
|
|||||||
@@ -457,7 +457,6 @@ struct mmc_host {
|
|||||||
unsigned int retune_paused:1; /* re-tuning is temporarily disabled */
|
unsigned int retune_paused:1; /* re-tuning is temporarily disabled */
|
||||||
unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */
|
unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */
|
||||||
unsigned int can_dma_map_merge:1; /* merging can be used */
|
unsigned int can_dma_map_merge:1; /* merging can be used */
|
||||||
unsigned int vqmmc_enabled:1; /* vqmmc regulator is enabled */
|
|
||||||
|
|
||||||
int rescan_disable; /* disable card detection */
|
int rescan_disable; /* disable card detection */
|
||||||
int rescan_entered; /* used with nonremovable devices */
|
int rescan_entered; /* used with nonremovable devices */
|
||||||
@@ -609,8 +608,6 @@ static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int mmc_regulator_get_supply(struct mmc_host *mmc);
|
int mmc_regulator_get_supply(struct mmc_host *mmc);
|
||||||
int mmc_regulator_enable_vqmmc(struct mmc_host *mmc);
|
|
||||||
void mmc_regulator_disable_vqmmc(struct mmc_host *mmc);
|
|
||||||
|
|
||||||
static inline int mmc_card_is_removable(struct mmc_host *host)
|
static inline int mmc_card_is_removable(struct mmc_host *host)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user