Contributors: 11
Author Tokens Token Proportion Commits Commit Proportion
Russell King 102 36.17% 2 11.11%
Ulf Hansson 93 32.98% 4 22.22%
Srinivas Kandagatla 58 20.57% 1 5.56%
Adrian Hunter 8 2.84% 2 11.11%
Sujit Reddy Thumma 6 2.13% 2 11.11%
Pierre Ossman 4 1.42% 1 5.56%
Linus Walleij 4 1.42% 2 11.11%
Andrei Warkentin 2 0.71% 1 5.56%
Marek Szyprowski 2 0.71% 1 5.56%
Thomas Gleixner 2 0.71% 1 5.56%
Julia Lawall 1 0.35% 1 5.56%
Total 282 18


/* 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