In both photosynthesis and respiration, an electrochemical proton gradient drives chemiosmosis. what establishes the electrochemical gradient across a membrane to provide energy for atp production?