Re[12]: [PATCH v3] mfd: syscon: Add non-DT support

From: Alexander Shiyan
Date: Wed Feb 20 2013 - 11:06:20 EST


> > OK. I can convert platform to DT, no so easy, but possible.
> > But I will use syscon as way to using DT (and MULTIPLATFORM in the future),
> > this mean that I should completely drop ATAG support from this platform
> > (since I cannot use syscon device without DT support, but several platform devices
> > need to use system-wide registers).
> > Arnd, if its OK for you, I will use this way. (I talking about CLPS711X, you know it :) ).
>
> Ah, I should have realized that this is about clps711x when the patch
> is coming from you ;-)
>
> This is an existing platform, and I would not require you to move it to
> devicetree just for supporting syscon, although it may be a good idea
> to make that move in the long run.
>
> For clps711x, we know that there is only one syscon register set, so you
> could do a very simple patch like below. Basically we don't need to

No. Target have a three SYSCON registers and two SYSFLG. All these registers
can be combined into three syscon devices.
Only these registers will be handled via syscon device, so it is not only one.
Or you mean about handle all register via syscon? It is not it.

> treat the absence of DT information as an error, and a call to
> syscon_regmap_lookup_by_compatible or syscon_regmap_lookup_by_phandle
> will always return the syscon device that was registered first, or
> -EPROBE_DEFER for any error.

The initial idea is search desired syscon device from drivers only by one function
(i.e. search syscon device by compatible string or by specific alias) and no depend
on DT or non-DT. I.e. define syscon device always at machine start (even if we run
machine from DTS), because device should be always present in system.

---
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i