blob: bd087723929fd81484255254bf6dae4b981900b2 [file] [log] [blame]
Ulf Hansson3aa87932014-11-28 14:38:36 +01001/*
2 * Copyright (C) 2014 Linaro Ltd
3 *
4 * Author: Ulf Hansson <ulf.hansson@linaro.org>
5 *
6 * License terms: GNU General Public License (GPL) version 2
7 *
8 * MMC power sequence management
9 */
10#include <linux/mmc/host.h>
11
12#include "pwrseq.h"
13
14
15int mmc_pwrseq_alloc(struct mmc_host *host)
16{
17 return 0;
18}
19
20void mmc_pwrseq_pre_power_on(struct mmc_host *host)
21{
22 struct mmc_pwrseq *pwrseq = host->pwrseq;
23
24 if (pwrseq && pwrseq->ops && pwrseq->ops->pre_power_on)
25 pwrseq->ops->pre_power_on(host);
26}
27
28void mmc_pwrseq_post_power_on(struct mmc_host *host)
29{
30 struct mmc_pwrseq *pwrseq = host->pwrseq;
31
32 if (pwrseq && pwrseq->ops && pwrseq->ops->post_power_on)
33 pwrseq->ops->post_power_on(host);
34}
35
36void mmc_pwrseq_power_off(struct mmc_host *host)
37{
38 struct mmc_pwrseq *pwrseq = host->pwrseq;
39
40 if (pwrseq && pwrseq->ops && pwrseq->ops->power_off)
41 pwrseq->ops->power_off(host);
42}
43
44void mmc_pwrseq_free(struct mmc_host *host)
45{
46 struct mmc_pwrseq *pwrseq = host->pwrseq;
47
48 if (pwrseq && pwrseq->ops && pwrseq->ops->free)
49 pwrseq->ops->free(host);
50}