I am using the lastest version of Raspbian on the Raspberry Pi. I am using a 10 inch screen TFT touch screen. In /boot/config.txt, I've added the following 2 lines:
display_rotate=1 xinput set-prop "My Touchscreen driver" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
These are the coordinates given on a Wiki website: https://wiki.ubuntu.com/X/InputCoordinateTransformation and also in another post on Stack Exchange: https://askubuntu.com/questions/368317/rotate-touch-input-with-touchscreen-and-or-touchpad
When I use those coordinates, touching the 0, 0 location, the cursor shows up at the bottom right of the screen. When touching the top right, the cursor shows up at the bottom left of the screen. When touching the bottom left, that is the 0,0 location (top left). Touching the bottom left, puts the cursor at the top right.
The touch screen works correctly in landscape mode, there seems to be no combination that works for when I rotate the screen 90 degrees.