  We derive a linear thermodynamics theory for general Markov dynamics with
both steady-state and time-periodic drivings. Expressions for thermodynamic
quantities, such as mechanical and chemical work, heat and entropy production
are obtained in terms of equilibrium probability distribution and the drivings.
The entropy production is derived as a bilinear function of thermodynamic
forces and the associated fluxes. We derive explicit formulae for the Onsager
coefficients and use them to verify the Onsager-Casimir reciprocal relations.
Our results are illustrated on a periodically driven quantum dot in contact
with two electron reservoirs and optimization protocols are discussed.
