*** How the I2C protocol on the power board works: *** Since the Linux driver for the Slug's bit-banged i2c adapter doesn't support block read or write operations, it's necessary to do some fudgery to sort out the transfers. Unfortunately, read is now different to write: * Block Write Operations These are pretty straightforward, and their format is the same as smbus block writes: Address R/W, Command, Length, Data x N, PEC This can be hacked up from userspace, including the checksum. * Read Commands These are more complex, because the number of bytes to be read are received during a read operation -- which isn't a supported feature from userspace. So, rather than implement the block transfer for the kernel, which would be a little experimental for this project, It's necessary to set the command that we're doing: Address W, Command Address R, Length, *Command*, Data * N, PEC The important thing is that the read operation contains the command byte again -- which verifies that the write operation (which set the command) was successful.