phy/micrel: move flag handling to function for common use