
Dear Ajay Bhargav,
In message 794341286.33968.1311143785027.JavaMail.root@ahm.einfochips.com you wrote:
Is there any specific reason for not using u32 for the padding as well?
nothing specific. It makes easy to find number of bytes than words.
If there is no specific reason (which I could not think of either), then please use u32 consistently.
If you think in number of bytes, feel free to write
u32 reserved[128/sizeof(u32)];
Why would you need this BASE + OFFSET notation when using a C struct for the registers? Thi smakes little sense to me.
Well I did use the C struct method, if you see my patches submitted earlier but according to Prafulla and Lie structure size is too big. so they want me
Who cares about the size of the struct? We never alocate any memory for such a structure - it is just an overlay over the existing register space, so nobody cares if this is 16 kB of 16 MB.
to use a mix of C struct and BASE + OFFSET notation. so I thought to break the big C struct into smaller grouped structures pointing each group with GPIO base + group offset. I would be glad if you can suggest me something better or smarter.
This may make sense of you have separate, logically independent IP blocks. But the reason for such a desicion is if the data belong together in any way or not.
The "size" of such a structure is completely irrelevant.
Best regards,
Wolfgang Denk