
Dear Simon Glass,
In message CAPnjgZ1Oymaa2_gQGxw88jJG2Kr_fN6tJ5HDgUiOHPjw7jX2=g@mail.gmail.com you wrote:
Not sure I follow you: the added lines below do indeed add bitfield access macros, don't they?
No these are just for defining the shifts and masks. There is no access
But you write yourself in the comment: "...easily getting mask and shift values for bit fields".
The only benefit is to avoid having to calculate all of these masks and shifts in your head. It is basically just a shortcut and assists with checking code against datasheets. Of course I would prefer to have access through macros also but that was shot down so the code is now full of manual shifts and ANDs. I hope that at least this small convenience will be acceptable.
Sorry, but because such code is unportable we do not accept it, as it would lead to driver code that becomes unportable, too.
Best regards,
Wolfgang Denk