Single Stage Flyback and PFC Controller with Primary Side Control for LED Lighting and Multistage Dimming Mode