TCA9548A I2C switch register functionality
The polarity inversion register lets you do a logical NOT on any input line. It doesn't make an input into an output and vice versa.

Operation of this IC seems pretty straightforward:


Write to register 3 your specific input/output configuration
If you want the device to do a logical NOT (1->0, 0->1) on any of your input lines, set those bits in register 2
To read the input lines, read register 0
To write to the output lines, write to register 1