Hi Arnd, On Fri, Nov 15, 2019 at 10:33:30AM +0100, Arnd Bergmann wrote: > On Thu, Nov 14, 2019 at 12:48 PM Orson Zhai <orson.zhai@xxxxxxxxxx> wrote: > > > > > > Make life easier when syscon consumer want to access multiple syscon > > nodes. > > Add syscon-names and relative properties to help manage complicated > > cases when accessing more one syscon node. > > > > Signed-off-by: Orson Zhai <orson.zhai@xxxxxxxxxx> > > Hi Orson, > > Can you explain why the number of cells in this binding is specific > to the syscon node rather than the node referencing it? The story is like this. I found there are too many global registers in Unisoc(former Spreadtrum) chips. Dozens of offset with dozens of modules were needed to be specified. So I thought the dts files would seem "horrible" with a big chunk of syscon-xxx (say more than 20 lines) I learned from reg-names way which might look clean to hold all these mess things. But to implement this, the users need to konw the cell-size if we add arguments to syscon node. I thought to add cell-size into every syscon consumer node is a duplicated work and I wanted to take advantage of of_parse_phandle_with_args. So the bindings were created then. > > In most other bindings that follow the same scheme, the additional > arguments are interpreted by the subsystem that is being referenced, > but the syscon driver is just a simple driver with no subsystem and no > code to interpret those arguments. You're correct. I've realized it is narraw to pass here. > > The way would otherwise handle the example from your binding > would be with two separate properties in the display node, like > > syscon-enable = <&ap_apb_regs 0x4 0xf00>; > syscon-power = <&aon_regs 0x8>; This is an option for consumers all the time. Acturally my patches are not going to replace this. I'd like to provide another option to save people like desperate engineers in Spreadtrum :) > > in which case, the syscon driver does not need to know anything Whould it be better if I add syscon-cells into consumer's node? Then I could read the cell size and use "of_parse_phandle_with_fixed_args()" instead. This will not involve syscon node itself at all. Best Regards, -Orson > about how it's being used, and the display driver is the one making > sense of the arguments according to its own binding. > > I assume you have some good reason for introducing the other > approach, but I don't understand it from your submission. > > Arnd ________________________________ This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions. 本邮件及其附件具有保密性质,受法律保护不得泄露,仅发送给本邮件所指特定收件人。严禁非经授权使用、宣传、发布或复制本邮件或其内容。若非该特定收件人,请勿阅读、复制、 使用或披露本邮件的任何内容。若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件的方式即刻告知发件人。无法保证互联网通信及时、安全、无误或防毒。发件人对任何错漏均不承担责任。