Flame retardant functional textiles