mm: memcontrol: use per-cpu stocks for socket memory uncharging
[linux/fpc-iii.git] / drivers / mmc / core / pwrseq.h
blob819386f4ec618ec70c04db1e39dad4e71e44da1b
1 /*
2 * Copyright (C) 2014 Linaro Ltd
4 * Author: Ulf Hansson <ulf.hansson@linaro.org>
6 * License terms: GNU General Public License (GPL) version 2
7 */
8 #ifndef _MMC_CORE_PWRSEQ_H
9 #define _MMC_CORE_PWRSEQ_H
11 #include <linux/types.h>
13 struct mmc_host;
14 struct device;
15 struct module;
17 struct mmc_pwrseq_ops {
18 void (*pre_power_on)(struct mmc_host *host);
19 void (*post_power_on)(struct mmc_host *host);
20 void (*power_off)(struct mmc_host *host);
21 void (*reset)(struct mmc_host *host);
24 struct mmc_pwrseq {
25 const struct mmc_pwrseq_ops *ops;
26 struct device *dev;
27 struct list_head pwrseq_node;
28 struct module *owner;
31 #ifdef CONFIG_OF
33 int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq);
34 void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq);
36 int mmc_pwrseq_alloc(struct mmc_host *host);
37 void mmc_pwrseq_pre_power_on(struct mmc_host *host);
38 void mmc_pwrseq_post_power_on(struct mmc_host *host);
39 void mmc_pwrseq_power_off(struct mmc_host *host);
40 void mmc_pwrseq_reset(struct mmc_host *host);
41 void mmc_pwrseq_free(struct mmc_host *host);
43 #else
45 static inline int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq)
47 return -ENOSYS;
49 static inline void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) {}
50 static inline int mmc_pwrseq_alloc(struct mmc_host *host) { return 0; }
51 static inline void mmc_pwrseq_pre_power_on(struct mmc_host *host) {}
52 static inline void mmc_pwrseq_post_power_on(struct mmc_host *host) {}
53 static inline void mmc_pwrseq_power_off(struct mmc_host *host) {}
54 static inline void mmc_pwrseq_reset(struct mmc_host *host) {}
55 static inline void mmc_pwrseq_free(struct mmc_host *host) {}
57 #endif
59 #endif