Non-equilibrium thermodynamic approach to spin pumping and spin Hall torque effects