Maximum number of limit cycles for certain piecewise linear dynamical systems