Very easy. There are tours in both directions - I went from San Pedro to Uyuni, and they go back as well. You join up to a 2 night tour, for example, and then it finishes in San Pedro de Atacama itself - and the town is tiny, so you can walk from one side to the other very simply. I went with Tierra Mystica, and aside from claiming to have an English driver (he spoke only Spanish) they were fine. Be careful about the altitude though, and drink lots of water.
If your tour returns to Uyuni, I don't know - there are ways to bus to San Pedro but it won't be through the fun part - you'd have to go up to La Paz, out to Iquique and back inland to San Pedro (2-3 days?) - it'd be FAR, far simpler to just do a tour that ends in San Pedro de Atacama.
If you'd like to see what happens on the tour, I did blog about it (albeit from San Pedro to Uyuni - so the reverse direction for you) - look for the Salt Flats posts about half way down my trip page.