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()
132 syscon->regmap = regmap; in of_syscon_register()
133 syscon->np = np; in of_syscon_register()
136 list_add_tail(&syscon->list, &syscon_list); in of_syscon_register()
139 return syscon; in of_syscon_register()
149 kfree(syscon); in of_syscon_register()
156 struct syscon *entry, *syscon = NULL; in device_node_get_regmap() local
162 syscon = entry; in device_node_get_regmap()
168 if (!syscon) in device_node_get_regmap()
169 syscon = of_syscon_register(np, check_clk); in device_node_get_regmap()
171 if (IS_ERR(syscon)) in device_node_get_regmap()
172 return ERR_CAST(syscon); in device_node_get_regmap()
174 return syscon->regmap; in device_node_get_regmap()
280 struct syscon *syscon; in syscon_probe() local
285 syscon = devm_kzalloc(dev, sizeof(*syscon), GFP_KERNEL); in syscon_probe()
286 if (!syscon) in syscon_probe()
300 syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config); in syscon_probe()
301 if (IS_ERR(syscon->regmap)) { in syscon_probe()
303 return PTR_ERR(syscon->regmap); in syscon_probe()
306 platform_set_drvdata(pdev, syscon); in syscon_probe()