17 #include <linux/module.h>
37 return (syscon->
dev->of_node == dn) ? 1 : 0;
66 of_node_put(syscon_np);
83 of_node_put(syscon_np);
90 { .compatible =
"syscon", },
94 static struct regmap_config syscon_regmap_config = {
124 syscon_regmap_config.max_register =
res.end -
res.start - 3;
126 &syscon_regmap_config);
127 if (IS_ERR(syscon->
regmap)) {
128 dev_err(dev,
"regmap init failed\n");
129 return PTR_ERR(syscon->
regmap);
133 platform_set_drvdata(pdev, syscon);
135 dev_info(dev,
"syscon regmap start 0x%x end 0x%x registered\n",
143 struct syscon *syscon;
145 syscon = platform_get_drvdata(pdev);
147 platform_set_drvdata(pdev,
NULL);
156 .of_match_table = of_syscon_match,
158 .probe = syscon_probe,
162 static int __init syscon_init(
void)
168 static void __exit syscon_exit(
void)