Treasury has worked out a deal with Chrysler that gives the United Auto Workers a majority stake in the company.