Lines Matching +full:vdd +full:- +full:s
1 // SPDX-License-Identifier: GPL-2.0-only
14 #include <linux/fault-inject.h>
34 static int mmc_ios_show(struct seq_file *s, void *data) in mmc_ios_show() argument
55 struct mmc_host *host = s->private; in mmc_ios_show()
56 struct mmc_ios *ios = &host->ios; in mmc_ios_show()
59 seq_printf(s, "clock:\t\t%u Hz\n", ios->clock); in mmc_ios_show()
60 if (host->actual_clock) in mmc_ios_show()
61 seq_printf(s, "actual clock:\t%u Hz\n", host->actual_clock); in mmc_ios_show()
62 seq_printf(s, "vdd:\t\t%u ", ios->vdd); in mmc_ios_show()
63 if ((1 << ios->vdd) & MMC_VDD_165_195) in mmc_ios_show()
64 seq_printf(s, "(1.65 - 1.95 V)\n"); in mmc_ios_show()
65 else if (ios->vdd < (ARRAY_SIZE(vdd_str) - 1) in mmc_ios_show()
66 && vdd_str[ios->vdd] && vdd_str[ios->vdd + 1]) in mmc_ios_show()
67 seq_printf(s, "(%s ~ %s V)\n", vdd_str[ios->vdd], in mmc_ios_show()
68 vdd_str[ios->vdd + 1]); in mmc_ios_show()
70 seq_printf(s, "(invalid)\n"); in mmc_ios_show()
72 switch (ios->bus_mode) { in mmc_ios_show()
77 str = "push-pull"; in mmc_ios_show()
83 seq_printf(s, "bus mode:\t%u (%s)\n", ios->bus_mode, str); in mmc_ios_show()
85 switch (ios->chip_select) { in mmc_ios_show()
99 seq_printf(s, "chip select:\t%u (%s)\n", ios->chip_select, str); in mmc_ios_show()
101 switch (ios->power_mode) { in mmc_ios_show()
115 seq_printf(s, "power mode:\t%u (%s)\n", ios->power_mode, str); in mmc_ios_show()
116 seq_printf(s, "bus width:\t%u (%u bits)\n", in mmc_ios_show()
117 ios->bus_width, 1 << ios->bus_width); in mmc_ios_show()
119 switch (ios->timing) { in mmc_ios_show()
124 str = "mmc high-speed"; in mmc_ios_show()
127 str = "sd high-speed"; in mmc_ios_show()
151 str = mmc_card_hs400es(host->card) ? in mmc_ios_show()
158 seq_printf(s, "timing spec:\t%u (%s)\n", ios->timing, str); in mmc_ios_show()
160 switch (ios->signal_voltage) { in mmc_ios_show()
174 seq_printf(s, "signal voltage:\t%u (%s)\n", ios->signal_voltage, str); in mmc_ios_show()
176 switch (ios->drv_type) { in mmc_ios_show()
193 seq_printf(s, "driver type:\t%u (%s)\n", ios->drv_type, str); in mmc_ios_show()
203 *val = host->ios.clock; in mmc_clock_opt_get()
213 if (val != 0 && (val > host->f_max || val < host->f_min)) in mmc_clock_opt_set()
214 return -EINVAL; in mmc_clock_opt_set()
231 host->debugfs_root = root; in mmc_add_host_debugfs()
234 debugfs_create_x32("caps", S_IRUSR, root, &host->caps); in mmc_add_host_debugfs()
235 debugfs_create_x32("caps2", S_IRUSR, root, &host->caps2); in mmc_add_host_debugfs()
242 host->fail_mmc_request = fail_default_attr; in mmc_add_host_debugfs()
244 &host->fail_mmc_request); in mmc_add_host_debugfs()
250 debugfs_remove_recursive(host->debugfs_root); in mmc_remove_host_debugfs()
255 struct mmc_host *host = card->host; in mmc_add_card_debugfs()
258 if (!host->debugfs_root) in mmc_add_card_debugfs()
261 root = debugfs_create_dir(mmc_card_id(card), host->debugfs_root); in mmc_add_card_debugfs()
262 card->debugfs_root = root; in mmc_add_card_debugfs()
264 debugfs_create_x32("state", S_IRUSR, root, &card->state); in mmc_add_card_debugfs()
269 debugfs_remove_recursive(card->debugfs_root); in mmc_remove_card_debugfs()
270 card->debugfs_root = NULL; in mmc_remove_card_debugfs()