In this paper we study the well-posedness and stability of a class of switched linear passive systems. Instrumental in our approach is the result, also of interest in its own right, that any linear passive input-state-output system with strictly positive storage function can be written as a port-Hamiltonian system.