We analyse closed classes in k-valued logics containing all linear functions modulo k. The classes are determined by divisors d of a number k and canonical formulas for functions. We construct the lattice of all such classes for k = p
2, where p is a prime, and construct fragments of the lattice for other composite k.