The function of ATP synthase is to synthesize ATP from ADP and inorganic phosphate (Pi) in the F1 sector. This is possible due to energy derived from a gradient of protons which cross the inner mitochondrial membrane from the intermembrane space into the matrix through the Fo portion of the enzyme.
Osmosis is the process of diffusion of water molecules across a selectively permeable membrane. Chemiosmosis is the process of diffusion of ions (usually H+ ions, also known as protons) across a selectively permeable membrane.