Study of 16O, 20Ne, 22Ne, 28Si and 32S by inelastic scattering of polarized protons