I have read that the entropy change of a system is greater than or equal to the integral of the heat added to it divided by its temperature. The case where entropy is equal to the integral is when the heat is reversibly added, i.e., through an infinitesimal temperature difference and by implication, an infinitesimal heat transfer rate. I assume the greater the temperature difference, and thus the greater the heat transfer rate, the greater the entropy change of the system.
Additionally, the heat added at constant pressure is equal to $mC_pdT$, so that for a given amount of heat addition and constant mass, there is a definite temperature change.
Now, consider a cylinder-piston setup. In one case we add heat very slowly (reversibly), and in another we add the heat fast (irreversibly). In both cases, we add the same amount of heat and do so at constant pressure, so that the final temperature and pressure are the same in both cases. The initial and final state variables are therefore the same between the two cases, including the entropy, however in the slow case heat is added reversibly and in the other case irreversibly.
So, I am confused, because I am told that rate of heat addition can affect the entropy of a system, but I cannot see how in my thought experiment. I was hoping someone might help me clear this up. Thanks!