Ok... During the init, I attempt an eink update using one structure layout, then if that fails I use the other structure layout for all future calls. There is no reason to use the eink include files if I need to define renamed structures anyway.
Yes! It now works in both 5.1.0 main and 5.1.0 diags, so it should work anywhere.
The problem is that I already had 7 different eink configurations to test, and now I need to test different eink driver STRUCTURE layout versions too.
The information returned by ioctl calls is identical for both structure layouts, so the only way to tell them apart is to try both and use the one that does not return an error code. Yuck. But at least I got it working now. Goodbye eink header files!
And by the way, besides replacing the structure layout, I have to xor the eink update code with 0x80000, which I found by using strace on both versions of eips. Both update code values have the same #define name though, just like the structure layouts -- one more reason to trash the eink header files...
I suspect my eink 5.x compatibility hack will break again on the next firmware update. What were those guys thinking?