forked from Minki/linux
af873fcece
Based on 1 normalized pattern(s): license terms gnu general public license gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 161 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
59 lines
1.6 KiB
C
59 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2014 Linaro Ltd
|
|
*
|
|
* Author: Ulf Hansson <ulf.hansson@linaro.org>
|
|
*/
|
|
#ifndef _MMC_CORE_PWRSEQ_H
|
|
#define _MMC_CORE_PWRSEQ_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct mmc_host;
|
|
struct device;
|
|
struct module;
|
|
|
|
struct mmc_pwrseq_ops {
|
|
void (*pre_power_on)(struct mmc_host *host);
|
|
void (*post_power_on)(struct mmc_host *host);
|
|
void (*power_off)(struct mmc_host *host);
|
|
void (*reset)(struct mmc_host *host);
|
|
};
|
|
|
|
struct mmc_pwrseq {
|
|
const struct mmc_pwrseq_ops *ops;
|
|
struct device *dev;
|
|
struct list_head pwrseq_node;
|
|
struct module *owner;
|
|
};
|
|
|
|
#ifdef CONFIG_OF
|
|
|
|
int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq);
|
|
void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq);
|
|
|
|
int mmc_pwrseq_alloc(struct mmc_host *host);
|
|
void mmc_pwrseq_pre_power_on(struct mmc_host *host);
|
|
void mmc_pwrseq_post_power_on(struct mmc_host *host);
|
|
void mmc_pwrseq_power_off(struct mmc_host *host);
|
|
void mmc_pwrseq_reset(struct mmc_host *host);
|
|
void mmc_pwrseq_free(struct mmc_host *host);
|
|
|
|
#else
|
|
|
|
static inline int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
static inline void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) {}
|
|
static inline int mmc_pwrseq_alloc(struct mmc_host *host) { return 0; }
|
|
static inline void mmc_pwrseq_pre_power_on(struct mmc_host *host) {}
|
|
static inline void mmc_pwrseq_post_power_on(struct mmc_host *host) {}
|
|
static inline void mmc_pwrseq_power_off(struct mmc_host *host) {}
|
|
static inline void mmc_pwrseq_reset(struct mmc_host *host) {}
|
|
static inline void mmc_pwrseq_free(struct mmc_host *host) {}
|
|
|
|
#endif
|
|
|
|
#endif
|