pwrseq             37 drivers/mmc/core/pwrseq.c 				host->pwrseq = p;
pwrseq             46 drivers/mmc/core/pwrseq.c 	if (!host->pwrseq)
pwrseq             56 drivers/mmc/core/pwrseq.c 	struct mmc_pwrseq *pwrseq = host->pwrseq;
pwrseq             58 drivers/mmc/core/pwrseq.c 	if (pwrseq && pwrseq->ops->pre_power_on)
pwrseq             59 drivers/mmc/core/pwrseq.c 		pwrseq->ops->pre_power_on(host);
pwrseq             64 drivers/mmc/core/pwrseq.c 	struct mmc_pwrseq *pwrseq = host->pwrseq;
pwrseq             66 drivers/mmc/core/pwrseq.c 	if (pwrseq && pwrseq->ops->post_power_on)
pwrseq             67 drivers/mmc/core/pwrseq.c 		pwrseq->ops->post_power_on(host);
pwrseq             72 drivers/mmc/core/pwrseq.c 	struct mmc_pwrseq *pwrseq = host->pwrseq;
pwrseq             74 drivers/mmc/core/pwrseq.c 	if (pwrseq && pwrseq->ops->power_off)
pwrseq             75 drivers/mmc/core/pwrseq.c 		pwrseq->ops->power_off(host);
pwrseq             80 drivers/mmc/core/pwrseq.c 	struct mmc_pwrseq *pwrseq = host->pwrseq;
pwrseq             82 drivers/mmc/core/pwrseq.c 	if (pwrseq && pwrseq->ops->reset)
pwrseq             83 drivers/mmc/core/pwrseq.c 		pwrseq->ops->reset(host);
pwrseq             88 drivers/mmc/core/pwrseq.c 	struct mmc_pwrseq *pwrseq = host->pwrseq;
pwrseq             90 drivers/mmc/core/pwrseq.c 	if (pwrseq) {
pwrseq             91 drivers/mmc/core/pwrseq.c 		module_put(pwrseq->owner);
pwrseq             92 drivers/mmc/core/pwrseq.c 		host->pwrseq = NULL;
pwrseq             96 drivers/mmc/core/pwrseq.c int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq)
pwrseq             98 drivers/mmc/core/pwrseq.c 	if (!pwrseq || !pwrseq->ops || !pwrseq->dev)
pwrseq            102 drivers/mmc/core/pwrseq.c 	list_add(&pwrseq->pwrseq_node, &pwrseq_list);
pwrseq            109 drivers/mmc/core/pwrseq.c void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq)
pwrseq            111 drivers/mmc/core/pwrseq.c 	if (pwrseq) {
pwrseq            113 drivers/mmc/core/pwrseq.c 		list_del(&pwrseq->pwrseq_node);
pwrseq             32 drivers/mmc/core/pwrseq.h int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq);
pwrseq             33 drivers/mmc/core/pwrseq.h void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq);
pwrseq             44 drivers/mmc/core/pwrseq.h static inline int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq)
pwrseq             48 drivers/mmc/core/pwrseq.h static inline void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) {}
pwrseq             25 drivers/mmc/core/pwrseq_emmc.c 	struct mmc_pwrseq pwrseq;
pwrseq             30 drivers/mmc/core/pwrseq_emmc.c #define to_pwrseq_emmc(p) container_of(p, struct mmc_pwrseq_emmc, pwrseq)
pwrseq             34 drivers/mmc/core/pwrseq_emmc.c 	struct mmc_pwrseq_emmc *pwrseq =  to_pwrseq_emmc(host->pwrseq);
pwrseq             36 drivers/mmc/core/pwrseq_emmc.c 	gpiod_set_value_cansleep(pwrseq->reset_gpio, 1);
pwrseq             38 drivers/mmc/core/pwrseq_emmc.c 	gpiod_set_value_cansleep(pwrseq->reset_gpio, 0);
pwrseq             45 drivers/mmc/core/pwrseq_emmc.c 	struct mmc_pwrseq_emmc *pwrseq = container_of(this,
pwrseq             47 drivers/mmc/core/pwrseq_emmc.c 	gpiod_set_value(pwrseq->reset_gpio, 1);
pwrseq             49 drivers/mmc/core/pwrseq_emmc.c 	gpiod_set_value(pwrseq->reset_gpio, 0);
pwrseq             61 drivers/mmc/core/pwrseq_emmc.c 	struct mmc_pwrseq_emmc *pwrseq;
pwrseq             64 drivers/mmc/core/pwrseq_emmc.c 	pwrseq = devm_kzalloc(dev, sizeof(*pwrseq), GFP_KERNEL);
pwrseq             65 drivers/mmc/core/pwrseq_emmc.c 	if (!pwrseq)
pwrseq             68 drivers/mmc/core/pwrseq_emmc.c 	pwrseq->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
pwrseq             69 drivers/mmc/core/pwrseq_emmc.c 	if (IS_ERR(pwrseq->reset_gpio))
pwrseq             70 drivers/mmc/core/pwrseq_emmc.c 		return PTR_ERR(pwrseq->reset_gpio);
pwrseq             72 drivers/mmc/core/pwrseq_emmc.c 	if (!gpiod_cansleep(pwrseq->reset_gpio)) {
pwrseq             78 drivers/mmc/core/pwrseq_emmc.c 		pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb;
pwrseq             79 drivers/mmc/core/pwrseq_emmc.c 		pwrseq->reset_nb.priority = 255;
pwrseq             80 drivers/mmc/core/pwrseq_emmc.c 		register_restart_handler(&pwrseq->reset_nb);
pwrseq             85 drivers/mmc/core/pwrseq_emmc.c 	pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops;
pwrseq             86 drivers/mmc/core/pwrseq_emmc.c 	pwrseq->pwrseq.dev = dev;
pwrseq             87 drivers/mmc/core/pwrseq_emmc.c 	pwrseq->pwrseq.owner = THIS_MODULE;
pwrseq             88 drivers/mmc/core/pwrseq_emmc.c 	platform_set_drvdata(pdev, pwrseq);
pwrseq             90 drivers/mmc/core/pwrseq_emmc.c 	return mmc_pwrseq_register(&pwrseq->pwrseq);
pwrseq             95 drivers/mmc/core/pwrseq_emmc.c 	struct mmc_pwrseq_emmc *pwrseq = platform_get_drvdata(pdev);
pwrseq             97 drivers/mmc/core/pwrseq_emmc.c 	unregister_restart_handler(&pwrseq->reset_nb);
pwrseq             98 drivers/mmc/core/pwrseq_emmc.c 	mmc_pwrseq_unregister(&pwrseq->pwrseq);
pwrseq             27 drivers/mmc/core/pwrseq_sd8787.c 	struct mmc_pwrseq pwrseq;
pwrseq             32 drivers/mmc/core/pwrseq_sd8787.c #define to_pwrseq_sd8787(p) container_of(p, struct mmc_pwrseq_sd8787, pwrseq)
pwrseq             36 drivers/mmc/core/pwrseq_sd8787.c 	struct mmc_pwrseq_sd8787 *pwrseq = to_pwrseq_sd8787(host->pwrseq);
pwrseq             38 drivers/mmc/core/pwrseq_sd8787.c 	gpiod_set_value_cansleep(pwrseq->reset_gpio, 1);
pwrseq             41 drivers/mmc/core/pwrseq_sd8787.c 	gpiod_set_value_cansleep(pwrseq->pwrdn_gpio, 1);
pwrseq             46 drivers/mmc/core/pwrseq_sd8787.c 	struct mmc_pwrseq_sd8787 *pwrseq = to_pwrseq_sd8787(host->pwrseq);
pwrseq             48 drivers/mmc/core/pwrseq_sd8787.c 	gpiod_set_value_cansleep(pwrseq->pwrdn_gpio, 0);
pwrseq             49 drivers/mmc/core/pwrseq_sd8787.c 	gpiod_set_value_cansleep(pwrseq->reset_gpio, 0);
pwrseq             65 drivers/mmc/core/pwrseq_sd8787.c 	struct mmc_pwrseq_sd8787 *pwrseq;
pwrseq             68 drivers/mmc/core/pwrseq_sd8787.c 	pwrseq = devm_kzalloc(dev, sizeof(*pwrseq), GFP_KERNEL);
pwrseq             69 drivers/mmc/core/pwrseq_sd8787.c 	if (!pwrseq)
pwrseq             72 drivers/mmc/core/pwrseq_sd8787.c 	pwrseq->pwrdn_gpio = devm_gpiod_get(dev, "powerdown", GPIOD_OUT_LOW);
pwrseq             73 drivers/mmc/core/pwrseq_sd8787.c 	if (IS_ERR(pwrseq->pwrdn_gpio))
pwrseq             74 drivers/mmc/core/pwrseq_sd8787.c 		return PTR_ERR(pwrseq->pwrdn_gpio);
pwrseq             76 drivers/mmc/core/pwrseq_sd8787.c 	pwrseq->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
pwrseq             77 drivers/mmc/core/pwrseq_sd8787.c 	if (IS_ERR(pwrseq->reset_gpio))
pwrseq             78 drivers/mmc/core/pwrseq_sd8787.c 		return PTR_ERR(pwrseq->reset_gpio);
pwrseq             80 drivers/mmc/core/pwrseq_sd8787.c 	pwrseq->pwrseq.dev = dev;
pwrseq             81 drivers/mmc/core/pwrseq_sd8787.c 	pwrseq->pwrseq.ops = &mmc_pwrseq_sd8787_ops;
pwrseq             82 drivers/mmc/core/pwrseq_sd8787.c 	pwrseq->pwrseq.owner = THIS_MODULE;
pwrseq             83 drivers/mmc/core/pwrseq_sd8787.c 	platform_set_drvdata(pdev, pwrseq);
pwrseq             85 drivers/mmc/core/pwrseq_sd8787.c 	return mmc_pwrseq_register(&pwrseq->pwrseq);
pwrseq             90 drivers/mmc/core/pwrseq_sd8787.c 	struct mmc_pwrseq_sd8787 *pwrseq = platform_get_drvdata(pdev);
pwrseq             92 drivers/mmc/core/pwrseq_sd8787.c 	mmc_pwrseq_unregister(&pwrseq->pwrseq);
pwrseq             26 drivers/mmc/core/pwrseq_simple.c 	struct mmc_pwrseq pwrseq;
pwrseq             34 drivers/mmc/core/pwrseq_simple.c #define to_pwrseq_simple(p) container_of(p, struct mmc_pwrseq_simple, pwrseq)
pwrseq             36 drivers/mmc/core/pwrseq_simple.c static void mmc_pwrseq_simple_set_gpios_value(struct mmc_pwrseq_simple *pwrseq,
pwrseq             39 drivers/mmc/core/pwrseq_simple.c 	struct gpio_descs *reset_gpios = pwrseq->reset_gpios;
pwrseq             63 drivers/mmc/core/pwrseq_simple.c 	struct mmc_pwrseq_simple *pwrseq = to_pwrseq_simple(host->pwrseq);
pwrseq             65 drivers/mmc/core/pwrseq_simple.c 	if (!IS_ERR(pwrseq->ext_clk) && !pwrseq->clk_enabled) {
pwrseq             66 drivers/mmc/core/pwrseq_simple.c 		clk_prepare_enable(pwrseq->ext_clk);
pwrseq             67 drivers/mmc/core/pwrseq_simple.c 		pwrseq->clk_enabled = true;
pwrseq             70 drivers/mmc/core/pwrseq_simple.c 	mmc_pwrseq_simple_set_gpios_value(pwrseq, 1);
pwrseq             75 drivers/mmc/core/pwrseq_simple.c 	struct mmc_pwrseq_simple *pwrseq = to_pwrseq_simple(host->pwrseq);
pwrseq             77 drivers/mmc/core/pwrseq_simple.c 	mmc_pwrseq_simple_set_gpios_value(pwrseq, 0);
pwrseq             79 drivers/mmc/core/pwrseq_simple.c 	if (pwrseq->post_power_on_delay_ms)
pwrseq             80 drivers/mmc/core/pwrseq_simple.c 		msleep(pwrseq->post_power_on_delay_ms);
pwrseq             85 drivers/mmc/core/pwrseq_simple.c 	struct mmc_pwrseq_simple *pwrseq = to_pwrseq_simple(host->pwrseq);
pwrseq             87 drivers/mmc/core/pwrseq_simple.c 	mmc_pwrseq_simple_set_gpios_value(pwrseq, 1);
pwrseq             89 drivers/mmc/core/pwrseq_simple.c 	if (pwrseq->power_off_delay_us)
pwrseq             90 drivers/mmc/core/pwrseq_simple.c 		usleep_range(pwrseq->power_off_delay_us,
pwrseq             91 drivers/mmc/core/pwrseq_simple.c 			2 * pwrseq->power_off_delay_us);
pwrseq             93 drivers/mmc/core/pwrseq_simple.c 	if (!IS_ERR(pwrseq->ext_clk) && pwrseq->clk_enabled) {
pwrseq             94 drivers/mmc/core/pwrseq_simple.c 		clk_disable_unprepare(pwrseq->ext_clk);
pwrseq             95 drivers/mmc/core/pwrseq_simple.c 		pwrseq->clk_enabled = false;
pwrseq            113 drivers/mmc/core/pwrseq_simple.c 	struct mmc_pwrseq_simple *pwrseq;
pwrseq            116 drivers/mmc/core/pwrseq_simple.c 	pwrseq = devm_kzalloc(dev, sizeof(*pwrseq), GFP_KERNEL);
pwrseq            117 drivers/mmc/core/pwrseq_simple.c 	if (!pwrseq)
pwrseq            120 drivers/mmc/core/pwrseq_simple.c 	pwrseq->ext_clk = devm_clk_get(dev, "ext_clock");
pwrseq            121 drivers/mmc/core/pwrseq_simple.c 	if (IS_ERR(pwrseq->ext_clk) && PTR_ERR(pwrseq->ext_clk) != -ENOENT)
pwrseq            122 drivers/mmc/core/pwrseq_simple.c 		return PTR_ERR(pwrseq->ext_clk);
pwrseq            124 drivers/mmc/core/pwrseq_simple.c 	pwrseq->reset_gpios = devm_gpiod_get_array(dev, "reset",
pwrseq            126 drivers/mmc/core/pwrseq_simple.c 	if (IS_ERR(pwrseq->reset_gpios) &&
pwrseq            127 drivers/mmc/core/pwrseq_simple.c 	    PTR_ERR(pwrseq->reset_gpios) != -ENOENT &&
pwrseq            128 drivers/mmc/core/pwrseq_simple.c 	    PTR_ERR(pwrseq->reset_gpios) != -ENOSYS) {
pwrseq            129 drivers/mmc/core/pwrseq_simple.c 		return PTR_ERR(pwrseq->reset_gpios);
pwrseq            133 drivers/mmc/core/pwrseq_simple.c 				 &pwrseq->post_power_on_delay_ms);
pwrseq            135 drivers/mmc/core/pwrseq_simple.c 				 &pwrseq->power_off_delay_us);
pwrseq            137 drivers/mmc/core/pwrseq_simple.c 	pwrseq->pwrseq.dev = dev;
pwrseq            138 drivers/mmc/core/pwrseq_simple.c 	pwrseq->pwrseq.ops = &mmc_pwrseq_simple_ops;
pwrseq            139 drivers/mmc/core/pwrseq_simple.c 	pwrseq->pwrseq.owner = THIS_MODULE;
pwrseq            140 drivers/mmc/core/pwrseq_simple.c 	platform_set_drvdata(pdev, pwrseq);
pwrseq            142 drivers/mmc/core/pwrseq_simple.c 	return mmc_pwrseq_register(&pwrseq->pwrseq);
pwrseq            147 drivers/mmc/core/pwrseq_simple.c 	struct mmc_pwrseq_simple *pwrseq = platform_get_drvdata(pdev);
pwrseq            149 drivers/mmc/core/pwrseq_simple.c 	mmc_pwrseq_unregister(&pwrseq->pwrseq);
pwrseq            276 include/linux/mmc/host.h 	struct mmc_pwrseq	*pwrseq;