Lines Matching refs:syscon
33 struct syscon { struct
45 static struct syscon *of_syscon_register(struct device_node *np) in of_syscon_register() argument
47 struct syscon *syscon; in of_syscon_register() local
58 syscon = kzalloc(sizeof(*syscon), GFP_KERNEL); in of_syscon_register()
59 if (!syscon) in of_syscon_register()
101 syscon->regmap = regmap; in of_syscon_register()
102 syscon->np = np; in of_syscon_register()
105 list_add_tail(&syscon->list, &syscon_list); in of_syscon_register()
108 return syscon; in of_syscon_register()
113 kfree(syscon); in of_syscon_register()
119 struct syscon *entry, *syscon = NULL; in syscon_node_to_regmap() local
125 syscon = entry; in syscon_node_to_regmap()
131 if (!syscon) in syscon_node_to_regmap()
132 syscon = of_syscon_register(np); in syscon_node_to_regmap()
134 if (IS_ERR(syscon)) in syscon_node_to_regmap()
135 return ERR_CAST(syscon); in syscon_node_to_regmap()
137 return syscon->regmap; in syscon_node_to_regmap()
165 struct syscon *syscon; in syscon_regmap_lookup_by_pdevname() local
172 syscon = dev_get_drvdata(dev); in syscon_regmap_lookup_by_pdevname()
174 return syscon->regmap; in syscon_regmap_lookup_by_pdevname()
203 struct syscon *syscon; in syscon_probe() local
208 syscon = devm_kzalloc(dev, sizeof(*syscon), GFP_KERNEL); in syscon_probe()
209 if (!syscon) in syscon_probe()
223 syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_config); in syscon_probe()
224 if (IS_ERR(syscon->regmap)) { in syscon_probe()
226 return PTR_ERR(syscon->regmap); in syscon_probe()
229 platform_set_drvdata(pdev, syscon); in syscon_probe()