| 68 | } |
| 69 | |
| 70 | static int |
| 71 | mtk_pinctrl_attach(device_t dev) |
| 72 | { |
| 73 | |
| 74 | if (device_get_unit(dev) != 0) { |
| 75 | device_printf(dev, "Only one pin control allowed\n"); |
| 76 | return (ENXIO); |
| 77 | } |
| 78 | |
| 79 | if (bootverbose) |
| 80 | device_printf(dev, "GPIO mode start: 0x%08x\n", |
| 81 | mtk_sysctl_get(SYSCTL_GPIOMODE)); |
| 82 | |
| 83 | fdt_pinctrl_register(dev, NULL); |
| 84 | fdt_pinctrl_configure_tree(dev); |
| 85 | |
| 86 | if (bootverbose) |
| 87 | device_printf(dev, "GPIO mode end : 0x%08x\n", |
| 88 | mtk_sysctl_get(SYSCTL_GPIOMODE)); |
| 89 | |
| 90 | return (0); |
| 91 | } |
| 92 | |
| 93 | static int |
| 94 | mtk_pinctrl_process_entry(device_t dev, struct mtk_pin_group *table, |
nothing calls this directly
no test coverage detected