We study the problem of state transition on a finite time interval with minimal energy supply for linear port-Hamiltonian systems. While the cost functional of minimal energy supply is intrinsic to the port-Hamiltonian structure, the necessary conditions of optimality resulting from Pontryagin's maximum principle may yield singular arcs. The underlying reason is the linear dependence on the control, which makes the problem of determining the optimal control as a function of the state and the adjoint more complicated or even impossible. To resolve this issue, we fully characterize regularity of the (differential-algebraic) optimality system by using the interplay of the cost functional and the dynamics. In the regular case, we fully determine the control on the singular arc. Otherwise, we provide rank-minimal perturbations by a quadratic control cost such that the optimal control problem becomes regular. We illustrate the applicability of our results by a general second-order mechanical system and a discretized boundary-controlled heat equation.