Although Ataturk was a muslim, he did two things which infuriated Turkish muslims: he abolished the caliphate and outlawed the fez. He secularized Turkey while Eardogan invigorated Islam, at least he has tried. In either case, the problem is a false religion started by an epileptic murderer, thief, liar, adulterer, pedophile and false prophet known as Mahomet.
Ataturk was an atheist.
He answered to nobody on earth once in power. He did what he wanted. Nobody held him accountable.
Good side, he wanted Turkey to embrace the West and not be backward. Bad side, he was totally ruthless. Turkish history is an illusion and truth is not in print.
Kemal sought to establish Turkey as a post-imperial secular modern state. He eliminated the religious influence from government And included provision for the Army to take action to prevent Islamic extremists from attempting to seize power. This was necessary and happened a couple times. But Kemalism is dead for now, Erdogan took power after islamists subverted the military. He has sough to turn back the clock, and is doing so. It does not promise to end well.