diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-21 17:22:21 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-21 17:22:21 -0800 |
| commit | 4843f6873f7c4835e62f2c73ba0fd538e57a2f22 (patch) | |
| tree | ee620501a1ffbad9a83141e3a70154e1fe641040 /drivers/mmc/core/pwrseq.h | |
| download | linux-master.tar.gz linux-master.zip | |
Merge tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctlgraftedHEADmaster
Pull sysctl fix from Joel Granados:
"Fix sysctl jiffy / milliseconds conversion:
- Writing a previously read value "X" shall keep the same "X" value
- Remove truncation that was causing incorrect saturation of valid
timeouts"
* tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl:
sysctl: Do jiffy / ms conversion in ulong space
Diffstat (limited to 'drivers/mmc/core/pwrseq.h')
| -rw-r--r-- | drivers/mmc/core/pwrseq.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/mmc/core/pwrseq.h b/drivers/mmc/core/pwrseq.h new file mode 100644 index 000000000..f3bb103db --- /dev/null +++ b/drivers/mmc/core/pwrseq.h @@ -0,0 +1,58 @@ +/* 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 |
