Hi Stephen,
2016-08-20 4:16 GMT+09:00 Stephen Boyd <[email protected]>: >> >> >> + >> >> + parent = of_get_parent(dev->of_node); /* parent should be syscon >> >> node */ >> >> + regmap = syscon_node_to_regmap(parent); >> >> + of_node_put(parent); >> > >> > devm_get_regmap(dev->parent) should work then? Why do we need to >> > use OF APIs? >> >> "git grep devm_get_regmap" did not hit anything. >> >> Where is it defined? >> > > Sorry I meant dev_get_regmap(). > I tried this, but it did not work. To make dev_get_regmap() work, the parent device needs to call dev_regmap_init_mmio() beforehand. Since commit bdb0066df96e74a4002125467ebe459feff1ebef (mfd: syscon: Decouple syscon interface from platform devices), syscon_probe() is not called for platform devices, so that never happens. -- Best Regards Masahiro Yamada

