Here's hoping the coup succeeds and Erdogan is deposed, but nothing is final yet.
This is essentially the same thing that happened in Egypt, an Islamic ideologue was elected and immediately began dismantling the secular democracy in favor of an Islamist government.....and the military stepped in and kicked them out.
Obama should immediately encourage the coup and recognize the new government......but, I won't hold my breath as I imagine Obama likes the new Islamo-centric Erdogan the way he encouraged the coup in Egypt as the mythical Arab Spring, when in reality it was the Muslim Brotherhood seizing power.
UPDATE: Looks like the coup has failed and Erdogan will likely suspend the constitution and further concentrate power into his own hands. Going forward, Turkey will move toward a religious fundamentalist state and away from secular democracy.