linux-automation / usbsdmux

USB-SD-Mux Project - Driver and Documentation
GNU Lesser General Public License v2.1
66 stars 19 forks source link

Add support for the USB-SD-Mux FAST #52

Closed SmithChart closed 1 year ago

SmithChart commented 1 year ago

The USB-SD-Mux FAST is a next generation prototype of the USB-SD-Mux. This new generation contains a new I2C GPIO expander and also provides two external open-drain outputs.

This PR adds support for this new hardware to this tooling.

For co-existence of old and new USB-SD-Muxes this PR also adds support to automatically detect the version of the USB-SD-Mux. This feature will also help to catch cases where the tooling is accidentally used on a another SCSI device (e.g. a hard drive or generic card reader).

KarlK90 commented 1 year ago

@SmithChart I've tested the PR with the new USD-SD-Mux and it works just fine.

SmithChart commented 1 year ago

Rebased onto master

SmithChart commented 1 year ago

In general, why does read_register return a list if all callers use [0] on the result?

Good point. This was introduced in https://github.com/linux-automation/usbsdmux/commit/c36df6096d367cbf81f38940691ef5df869d35d5 . Re-thinking this I have decided to do two things:

SmithChart commented 1 year ago

@jluebbe Addressed your feedback. Please give it another look!