role of atp synthase in photosynthesis