Ah, the good ol' P0401. The possibility are endless. First, the Gas cap won't set off a EGR code. The problem is that there's not enough flow to the EGR. You can clean the EGR and the lines.
Possible Problems:
EGR valve stuck closede
EGR Vacuum Switching Valve (VSV) <- Most common
Open or short in VSV circuit for EGR
EGR valve position sensor open or short circuit
Vacuum or EGR hose disconnected
EGR valve position sensor
Manifold absolute pressure sensor malfunction
On the Camry, t the most common cause for P0401 is the EGR VSV. (vacuum switching valve) It is mounted behind the engine block. I had this same code four years ago. I removed it and found it to be jammed up with gunk. Clean it out, made sure it work, and reinstall it. Code went away. But jammed out again and I brought a new one at the part store for $50. The Camry has three VSVs so be sure to get the of the EGR.
The second most common cause for P0401 is heavy carbon build up in the EGR valve itself. This is more common on higher mileage Camry and requires removal of the EGR to clean it and the pipe running to it.
The VSV is shown here by the red arrow and this is looking at it from behind the right front wheel right under the intake on the 2.2L. It's held on by one 10mm bolt and has two vacuum lines and one wire plug. Clean the vacuum line too, one of them goes to the EGR and might be clog.