This paper investigates the design of a robust linear parameter-varying (LPV) controller for speed regulation of surface permanent magnet synchronous motors (SPMSMs). Motor dynamics is defined in the α-β stationary frame and a parameter-varying model formulation is provided to describe its nonlinear dynamics. A robust gain-scheduled LPV dynamic output-feedback controller is designed to guarantee the asymptotic stability and performance requirements, as well as, guarantee robustness against parameter perturbations and torque load disturbances. As a novel aspect in the SPMSM control, the real-time impact of temperature variation on the winding resistance and magnet flux during motor operation is explicitly considered in the LPV modeling as a scheduling parameter and the subsequent LPV control design compensating for demagnetization effects in the motor response. The controller synthesis conditions guaranteeing stability and robust performance to norm-bounded uncertainty in the system matrices are formulated in a convex linear matrix inequality (LMI) optimization framework. Finally, the validity of the proposed method is assessed in simulation studies. The closed-loop simulation studies demonstrate that the proposed LPV controller provides improved transient response with respect to settling time, overshoot, and disturbance rejection in tracking the velocity profile under the influence of parameter perturbation, temperature variations, and load disturbances.