  This paper is concerned with a boundary control problem for the
Cahn--Hilliard equation coupled with dynamic boundary conditions. In order to
handle the control problem, we restrict our analysis to the case of regular
potentials defined on the whole real line, assuming the boundary potential to
be dominant. The existence of optimal control, the Fr\'echet differentiability
of the control-to-state operator between appropriate Banach spaces, and the
first-order necessary conditions for optimality are addressed. In particular,
the necessary condition for optimality is characterized by a variational
inequality involving the adjoint variables.
