Lines Matching refs:pwrseq

25 	struct mmc_pwrseq pwrseq;  member
30 #define to_pwrseq_emmc(p) container_of(p, struct mmc_pwrseq_emmc, pwrseq)
34 struct mmc_pwrseq_emmc *pwrseq = to_pwrseq_emmc(host->pwrseq); in mmc_pwrseq_emmc_reset() local
36 gpiod_set_value_cansleep(pwrseq->reset_gpio, 1); in mmc_pwrseq_emmc_reset()
38 gpiod_set_value_cansleep(pwrseq->reset_gpio, 0); in mmc_pwrseq_emmc_reset()
45 struct mmc_pwrseq_emmc *pwrseq = container_of(this, in mmc_pwrseq_emmc_reset_nb() local
47 gpiod_set_value(pwrseq->reset_gpio, 1); in mmc_pwrseq_emmc_reset_nb()
49 gpiod_set_value(pwrseq->reset_gpio, 0); in mmc_pwrseq_emmc_reset_nb()
61 struct mmc_pwrseq_emmc *pwrseq; in mmc_pwrseq_emmc_probe() local
64 pwrseq = devm_kzalloc(dev, sizeof(*pwrseq), GFP_KERNEL); in mmc_pwrseq_emmc_probe()
65 if (!pwrseq) in mmc_pwrseq_emmc_probe()
68 pwrseq->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in mmc_pwrseq_emmc_probe()
69 if (IS_ERR(pwrseq->reset_gpio)) in mmc_pwrseq_emmc_probe()
70 return PTR_ERR(pwrseq->reset_gpio); in mmc_pwrseq_emmc_probe()
72 if (!gpiod_cansleep(pwrseq->reset_gpio)) { in mmc_pwrseq_emmc_probe()
78 pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb; in mmc_pwrseq_emmc_probe()
79 pwrseq->reset_nb.priority = 255; in mmc_pwrseq_emmc_probe()
80 register_restart_handler(&pwrseq->reset_nb); in mmc_pwrseq_emmc_probe()
85 pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops; in mmc_pwrseq_emmc_probe()
86 pwrseq->pwrseq.dev = dev; in mmc_pwrseq_emmc_probe()
87 pwrseq->pwrseq.owner = THIS_MODULE; in mmc_pwrseq_emmc_probe()
88 platform_set_drvdata(pdev, pwrseq); in mmc_pwrseq_emmc_probe()
90 return mmc_pwrseq_register(&pwrseq->pwrseq); in mmc_pwrseq_emmc_probe()
95 struct mmc_pwrseq_emmc *pwrseq = platform_get_drvdata(pdev); in mmc_pwrseq_emmc_remove() local
97 unregister_restart_handler(&pwrseq->reset_nb); in mmc_pwrseq_emmc_remove()
98 mmc_pwrseq_unregister(&pwrseq->pwrseq); in mmc_pwrseq_emmc_remove()