A general mechanism for the generation of frequency combs referenced to atomic resonances is put forward. The mechanism is based on the periodic phase control of a quantum systems dipole response. We develop an analytic description of the comb spectral structure, depending on both the atomic and the phase-control properties. We further suggest an experimental implementation of our scheme: Generating a frequency comb in the soft-x-ray spectral region, which can be realized with currently available techniques and radiation sources. The universality of this mechanism allows the generalization of frequency-comb technology to arbitrary frequencies, including the hard-x-ray regime by using reference transitions in highly charged ions.