twi: Finish the driver state machine.