Major improvements to the ch341 driver v4

From: Grigori Goronzy
Date: Fri Apr 15 2016 - 17:18:23 EST


Hi,

here's a hopefully final v4 of my ch341 patchset. Changelog below
this time, because it's cleary better this way. Please review.

v4:
- Fix parity even/odd mixup introduced in v3.
- Fix compilation errors of intermediate commits introduced in v3.

v3:
- Use u8 shorthand for unsigned char.
- Get rid of an unused variable.
- Improve error handling in set_termios.
- Only set mark/space when parity is enabled.
- Use C_* macros and some other simplifications.
- Patch termios HW flags for default CS8 case.
- Drop most style fixes.
- Unify definitions for the "general status" register bits.

v2:
- Improve/fix B0 handling.
- Fix initial/default configuration.
- Add tx_empty callback.
- Split up one patch:
- Reinitialize chip on reconfiguration.
- Add support for parity, frame length, stop bits.

v1:
- Initial version

Best regards
Grigori