High-side switches with embedded control functions