Lines Matching full:pwrseq

25 #include "pwrseq.h"
28 struct mmc_pwrseq pwrseq; member
33 #define to_pwrseq_sd8787(p) container_of(p, struct mmc_pwrseq_sd8787, pwrseq)
37 struct mmc_pwrseq_sd8787 *pwrseq = to_pwrseq_sd8787(host->pwrseq); in mmc_pwrseq_sd8787_pre_power_on() local
39 gpiod_set_value_cansleep(pwrseq->reset_gpio, 1); in mmc_pwrseq_sd8787_pre_power_on()
42 gpiod_set_value_cansleep(pwrseq->pwrdn_gpio, 1); in mmc_pwrseq_sd8787_pre_power_on()
47 struct mmc_pwrseq_sd8787 *pwrseq = to_pwrseq_sd8787(host->pwrseq); in mmc_pwrseq_sd8787_power_off() local
49 gpiod_set_value_cansleep(pwrseq->pwrdn_gpio, 0); in mmc_pwrseq_sd8787_power_off()
50 gpiod_set_value_cansleep(pwrseq->reset_gpio, 0); in mmc_pwrseq_sd8787_power_off()
55 struct mmc_pwrseq_sd8787 *pwrseq = to_pwrseq_sd8787(host->pwrseq); in mmc_pwrseq_wilc1000_pre_power_on() local
58 gpiod_set_value_cansleep(pwrseq->pwrdn_gpio, 1); in mmc_pwrseq_wilc1000_pre_power_on()
60 gpiod_set_value_cansleep(pwrseq->reset_gpio, 1); in mmc_pwrseq_wilc1000_pre_power_on()
65 struct mmc_pwrseq_sd8787 *pwrseq = to_pwrseq_sd8787(host->pwrseq); in mmc_pwrseq_wilc1000_power_off() local
67 gpiod_set_value_cansleep(pwrseq->reset_gpio, 0); in mmc_pwrseq_wilc1000_power_off()
68 gpiod_set_value_cansleep(pwrseq->pwrdn_gpio, 0); in mmc_pwrseq_wilc1000_power_off()
82 { .compatible = "mmc-pwrseq-sd8787", .data = &mmc_pwrseq_sd8787_ops },
83 { .compatible = "mmc-pwrseq-wilc1000", .data = &mmc_pwrseq_wilc1000_ops },
90 struct mmc_pwrseq_sd8787 *pwrseq; in mmc_pwrseq_sd8787_probe() local
94 pwrseq = devm_kzalloc(dev, sizeof(*pwrseq), GFP_KERNEL); in mmc_pwrseq_sd8787_probe()
95 if (!pwrseq) in mmc_pwrseq_sd8787_probe()
100 pwrseq->pwrdn_gpio = devm_gpiod_get(dev, "powerdown", GPIOD_OUT_LOW); in mmc_pwrseq_sd8787_probe()
101 if (IS_ERR(pwrseq->pwrdn_gpio)) in mmc_pwrseq_sd8787_probe()
102 return PTR_ERR(pwrseq->pwrdn_gpio); in mmc_pwrseq_sd8787_probe()
104 pwrseq->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in mmc_pwrseq_sd8787_probe()
105 if (IS_ERR(pwrseq->reset_gpio)) in mmc_pwrseq_sd8787_probe()
106 return PTR_ERR(pwrseq->reset_gpio); in mmc_pwrseq_sd8787_probe()
108 pwrseq->pwrseq.dev = dev; in mmc_pwrseq_sd8787_probe()
109 pwrseq->pwrseq.ops = match->data; in mmc_pwrseq_sd8787_probe()
110 pwrseq->pwrseq.owner = THIS_MODULE; in mmc_pwrseq_sd8787_probe()
111 platform_set_drvdata(pdev, pwrseq); in mmc_pwrseq_sd8787_probe()
113 return mmc_pwrseq_register(&pwrseq->pwrseq); in mmc_pwrseq_sd8787_probe()
118 struct mmc_pwrseq_sd8787 *pwrseq = platform_get_drvdata(pdev); in mmc_pwrseq_sd8787_remove() local
120 mmc_pwrseq_unregister(&pwrseq->pwrseq); in mmc_pwrseq_sd8787_remove()