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()
146 syscon->regmap = regmap; in of_syscon_register()
147 syscon->np = np; in of_syscon_register()
150 list_add_tail(&syscon->list, &syscon_list); in of_syscon_register()
153 return_ptr(syscon); in of_syscon_register()
170 struct syscon *entry, *syscon = NULL; in device_node_get_regmap() local
176 syscon = entry; in device_node_get_regmap()
182 if (!syscon) in device_node_get_regmap()
183 syscon = of_syscon_register(np, check_res); in device_node_get_regmap()
185 if (IS_ERR(syscon)) in device_node_get_regmap()
186 return ERR_CAST(syscon); in device_node_get_regmap()
188 return syscon->regmap; in device_node_get_regmap()
196 * Register an externally created regmap object with syscon for the specified
204 struct syscon *entry, *syscon = NULL; in of_syscon_register_regmap() local
210 syscon = kzalloc(sizeof(*syscon), GFP_KERNEL); in of_syscon_register_regmap()
211 if (!syscon) in of_syscon_register_regmap()
214 /* check if syscon entry already exists */ in of_syscon_register_regmap()
223 syscon->regmap = regmap; in of_syscon_register_regmap()
224 syscon->np = np; in of_syscon_register_regmap()
226 /* register the regmap in syscon list */ in of_syscon_register_regmap()
227 list_add_tail(&syscon->list, &syscon_list); in of_syscon_register_regmap()
234 kfree(syscon); in of_syscon_register_regmap()
247 if (!of_device_is_compatible(np, "syscon")) in syscon_node_to_regmap()
344 struct syscon *syscon; in syscon_probe() local
349 syscon = devm_kzalloc(dev, sizeof(*syscon), GFP_KERNEL); in syscon_probe()
350 if (!syscon) in syscon_probe()
367 syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config); in syscon_probe()
368 if (IS_ERR(syscon->regmap)) { in syscon_probe()
370 return PTR_ERR(syscon->regmap); in syscon_probe()
373 platform_set_drvdata(pdev, syscon); in syscon_probe()
381 { "syscon", },
387 .name = "syscon",