MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mtk_pinctrl_attach

Function mtk_pinctrl_attach

freebsd/mips/mediatek/mtk_pinctrl.c:70–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70static int
71mtk_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
93static int
94mtk_pinctrl_process_entry(device_t dev, struct mtk_pin_group *table,

Callers

nothing calls this directly

Calls 3

device_get_unitFunction · 0.85
device_printfFunction · 0.85
mtk_sysctl_getFunction · 0.85

Tested by

no test coverage detected