There is no source code for moga mode A, so without source code..... They use propietary software. The mode B is just standard HID, at least in my moga pro.
Tincore has a mode M that supposedly emulates a MOGA, maybe you can try with it. Or gamepad helper I think it has the same option, not sure if it works. But it's more a problem of game developers giving support just for one gamepad instead of using generic HID. (probably because thet got money from Moga people). Fortunately most current games use standard hid controllers, and not many games depend on moga anymore.
Anyhow, if someone know to implement it, they can try . The kernel code is in my github in first post. I no longer have an XD and this rom is discontinued.