Message ID | cover.1616571453.git.mchehab+huawei@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | Add support for the other MaxLinear/Exar UARTs | expand |
On Wed, Mar 24, 2021 at 08:41:04AM +0100, Mauro Carvalho Chehab wrote: > The current version of the xr_serial driver handles one one of the several > MaxLinear/Exar UARTs and UART bridges. There are currently 12 such > models. Only one is currently supported. As I mentioned earlier, proper handling of the CDC devices requires support in USB serial core, which I've now implemented. With that and by parsing the Union descriptor to determine the interface layout, probing can also be cleaned up quite a bit. Looking at this series I found a few things that have been overlooked, such as the device types having different register widths (and one even differing register address widths), the custom driver flag not being set and a memory leak. I'll comment on some of these separately. It also seems the type abstraction can be handled better by using a more structured approach, which also allows getting rid of some of the type conditionals spread throughout the code. Another key observation here is that it's the currently supported type which is the one that stands out from the rest. And while all four types supports CDC requests, it's only the SET_LINE_CODING one which is actually required to be used (by the three new types). This also allows for a cleaner implementation. I ended up implementing support myself in order to make sense of all the ways these device types differ while digging through the datasheets and thinking about how best to implement this. I'll be posting a fix and two series while keeping you on CC. Would you mind giving it a spin with your XR21B142X? Johan