Protein which is part of a transmembrane protein complex that forms a hydrophilic channel across the lipid bilayer through which specific inorganic ions can diffuse down their electrochemical gradients. The channels are usually gated and only open in response to a specific stimulus, such as a change in membrane potential (voltage-gated) or the binding of a ligand (ligand-gated channel).