Re: [PATCH v6 1/2] clk: uniphier: add core support code for UniPhier clock driver

From: Masahiro Yamada
Date: Sun Aug 28 2016 - 22:22:01 EST


Hi Stephen,


2016-08-20 4:16 GMT+09:00 Stephen Boyd <sboyd@xxxxxxxxxxxxxx>:
>>
>> >> +
>> >> + 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