Driver is for RaspPi with direct communication thru SPI. I'm using microcontroller that is a brigde between chain of chips and host thru RS485 comm port. So I needed to write own "driver". Obviously I was looking at that piece of code, but it's not secret that looking at someone's code is painfull

It give me quite good amount of headache but it helped a little bit too. It only confirms that chip behavior is very dependent on command. exec_cmd function needs long list of parameters to be sucesfully executed...
Hm, I tried to write the driver source code as self-explanatory and readable as possible, sorry if it was not as helpful as it could have been. Anyway, for one prototype I once ported the code to an STM32 controller, and after adapting the access to the SPI interface, it worked mostly unchanged. Unless you have a very resource-limited uC working with, I won't expect any issues.
Otherwise feel free to ask for clarifications, I'm helping out as far as possible.
Zefir, your code in cgminer is some of cleanest there is in there. Please don't let anyone tell you otherwise.
I wrote my own test code for A1s using the Pi and my feedback about the datasheet is that it was well written and (mostly) easy to understand. In combination with this thread I was able to get going in no time. I mean compare this to the (missing) bitfury docs and you'll see the difference.