Let $M$ be a smooth manifold, and let $TM$ denote its tangent bundle. Under what conditions does $TM$ admit a flat connection $\omega$?

**Edit:** Formerly, I asked about a flat connection on the frame bundle, but Deane Yang points out that a connection on the frame bundle is the same thing as one on the tangent bundle. I am imposing no other assumptions on the manifold other than smoothness, and I am seeking what assumptions may obstruct the existence of a flat connection.

affine structure. The Levi-Civita connection of a Riemannian metric is always torsion-free. $\endgroup$ – F. C. Mar 21 '12 at 20:55