The XFree86-Touch-Screen-HOWTO describes how to setup X11 for touchscreens. There is also a short survey of Linux laptops, which feature a touchscreen and/or have a pen as an input device and a survey about Linux on Tablet PCs.
Some XFree86 drivers support a rotation of the display content. Use this entry in the configuration file (DEGREE can become CW - 90 degree clockwise , CCW - 90 degree counterclockwise , UD - 180 degree upside down, but which options actually work depends on the drivers:
Option "Rotate" "DEGREE"
From version 4.3 on XFree86 contains the RandR extension (X resize and Rotate Extension), which makes it possible to change the display resolution on the fly without restarting X11. The tool xrandr supports only resolution settings but no rotation. But the Tiny-X server by RandR developer Keith Packard (Xkdrive) implements all of the RandR features. But this is usually not included in the major distributions. Currently X.Org doesn't seem to support rotate and resize.
There are some rotation utilities for Linux PDAs available, but I haven't tested them for Tablet PCs yet. Search the Zaurus Software Index - ZSI.