I am reading Callen's Thermodynamics and introduction to Thermostatics (second edition).
In section $2.1$, Callen states that for a quasi-static process, we have
$$\delta Q = T d S \tag{1} $$
where a quasi-static process is defined as an (ideal) succession of equilibrium states.
Now, I know (see for example Fermi, Thermodynamics) that only for a reversible process between $A$ and $B$
$$\Delta S_{A\rightarrow B} = \int_A^B \frac{\delta Q}{T} \tag{2}$$
Since $(1)$ is basically an infinitesimal version of $(2)$, this would seem to imply that $\delta Q = T dS$ is only true for a reversible process.
Now, I know for a fact that Callen is not using the terms "quasi-static" and "reversible" interchangeably (see chapter $4$ in his book). Therefore, the only plausible conclusion I can think about to avoid a contradiction is that an infinitesimal, quasi-static process must also be reversible. Note that I am aware that in general quasi-static $\nRightarrow$ reversible (whereas reversible $\Rightarrow$ quasi-static), but I am asking about the particular case of an infinitesimal process.
Another possibility is that $(2)$ does not imply that the infinitesimal version $\delta Q= T dS$ is only valid for a reversible process, but I don't see how this could be.
Another way to rephrase my question (though slightly different) is: what is the condition to write $\delta Q = T dS$? That the process is reversible or that it is quasi-static? Or are these two conditions equivalent for an infinitesimal process?
I am aware that this could seem like an artificial problem, but I am trying to re-learn thermodynamics following an axiomatic approach, so it is very important for me to get all these conceptual issues right.