Easy..
First off, download titanium backup from the market and backup all your apps and data! Then, run
unrevoked forever on your phone
assuming you are already rooted.
Now,...to downgrade back to 2.1 build then follow this
link. Download the 1.47.651.1 Ruu. That will be what you use to get your phone back to the state it was when you bought it.
Next, do the official 2.2 OTA by going to update HTC software on your phone. Now, Because I had used
unrevoked forever, after you update to 2.2 you can easily get root access again by first putting a custom recovery on your phone. I used clockwork mod recovery. All you have to do is place the PC36IMG on your SDcard (google search or search on xda-forums "clockwork mod recovery PC36IMG", or PM me I can send it to you). Turn off phone. Boot into recovery by holding the down arrow and pressing power. Then choose to update. It's easy.
Now that you have a custom recovery on your phone again, all you need now is superuser access. The easy way is to email the superuser apk to your google email and just open and download on your phone. If you can't do this, go to xda forums and download the new superuser 2.3.1 update.zip. Put this on your SD card (be sure to delete the PC36IMG file you just used). Turn off phone. Now boot back into recovery again by pressing down and power. This time go to recovery. Pick, install update.zip from SD card and confirm.
Now, you're good. Reboot phone and you are on official 2.2 Froyo which is also rooted. Go to the market, install Titanium Backup and then restore all your apps and app data from titanium! PM me if you have any questions.