Lines Matching refs:syscon
31 struct syscon { struct
43 static struct syscon *of_syscon_register(struct device_node *np, bool check_clk) in of_syscon_register() argument
46 struct syscon *syscon; in of_syscon_register() local
54 syscon = kzalloc(sizeof(*syscon), GFP_KERNEL); in of_syscon_register()
55 if (!syscon) in of_syscon_register()
131 syscon->regmap = regmap; in of_syscon_register()
132 syscon->np = np; in of_syscon_register()
135 list_add_tail(&syscon->list, &syscon_list); in of_syscon_register()
138 return syscon; in of_syscon_register()
148 kfree(syscon); in of_syscon_register()
155 struct syscon *entry, *syscon = NULL; in device_node_get_regmap() local
161 syscon = entry; in device_node_get_regmap()
167 if (!syscon) in device_node_get_regmap()
168 syscon = of_syscon_register(np, check_clk); in device_node_get_regmap()
170 if (IS_ERR(syscon)) in device_node_get_regmap()
171 return ERR_CAST(syscon); in device_node_get_regmap()
173 return syscon->regmap; in device_node_get_regmap()
232 struct syscon *syscon; in syscon_probe() local
237 syscon = devm_kzalloc(dev, sizeof(*syscon), GFP_KERNEL); in syscon_probe()
238 if (!syscon) in syscon_probe()
252 syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config); in syscon_probe()
253 if (IS_ERR(syscon->regmap)) { in syscon_probe()
255 return PTR_ERR(syscon->regmap); in syscon_probe()
258 platform_set_drvdata(pdev, syscon); in syscon_probe()