Lines Matching full:syscon

21 #include <linux/platform_data/syscon.h>
25 #include <linux/mfd/syscon.h>
33 struct syscon { struct
46 static struct syscon *of_syscon_register(struct device_node *np, bool check_res) in of_syscon_register() argument
57 struct syscon *syscon __free(kfree) = kzalloc(sizeof(*syscon), GFP_KERNEL); in of_syscon_register()
58 if (!syscon) in of_syscon_register()
144 syscon->regmap = regmap; in of_syscon_register()
145 syscon->np = np; in of_syscon_register()
148 list_add_tail(&syscon->list, &syscon_list); in of_syscon_register()
151 return_ptr(syscon); in of_syscon_register()
168 struct syscon *entry, *syscon = NULL; in device_node_get_regmap() local
174 syscon = entry; in device_node_get_regmap()
180 if (!syscon) in device_node_get_regmap()
181 syscon = of_syscon_register(np, check_res); in device_node_get_regmap()
183 if (IS_ERR(syscon)) in device_node_get_regmap()
184 return ERR_CAST(syscon); in device_node_get_regmap()
186 return syscon->regmap; in device_node_get_regmap()
194 * Register an externally created regmap object with syscon for the specified
202 struct syscon *entry, *syscon = NULL; in of_syscon_register_regmap() local
208 syscon = kzalloc(sizeof(*syscon), GFP_KERNEL); in of_syscon_register_regmap()
209 if (!syscon) in of_syscon_register_regmap()
212 /* check if syscon entry already exists */ in of_syscon_register_regmap()
221 syscon->regmap = regmap; in of_syscon_register_regmap()
222 syscon->np = np; in of_syscon_register_regmap()
224 /* register the regmap in syscon list */ in of_syscon_register_regmap()
225 list_add_tail(&syscon->list, &syscon_list); in of_syscon_register_regmap()
232 kfree(syscon); in of_syscon_register_regmap()
245 if (!of_device_is_compatible(np, "syscon")) in syscon_node_to_regmap()
342 struct syscon *syscon; in syscon_probe() local
347 syscon = devm_kzalloc(dev, sizeof(*syscon), GFP_KERNEL); in syscon_probe()
348 if (!syscon) in syscon_probe()
362 syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config); in syscon_probe()
363 if (IS_ERR(syscon->regmap)) { in syscon_probe()
365 return PTR_ERR(syscon->regmap); in syscon_probe()
368 platform_set_drvdata(pdev, syscon); in syscon_probe()
376 { "syscon", },
382 .name = "syscon",