What I've read about the revolution of 1979 does line up with that. It was, at least in the moment, a widespread sentiment in favor of change and not every Iranian group had the same beliefs. You had a grand alliance between the bazaar merchants, the rural conservatives, religious scholars, city liberals, student movements, pro-soviet communists, secularist politicians and others. It was ultimately the religious leadership that took final control over the new state structure, in practice, but for a few months and arguably years they had to share power and accommodate other interests.
The Shah, for all his modernist ways and secular sympathies, was still an authoritarian. Many groups had legitimate complaints against him. He both failed to grant sufficient democratic reforms when there was still plenty of time and also failed to properly deal with Khomeini, who ballooned into a much larger problem over the years and, if anything, his exile made him more famous. Much has been said about SAVAK, his repressive secret police, but in the end the Shah was also getting too old and sick, so he didn't want to go for a full bloodbath.
Unfortunately, the current ruling authorities of Iran are, in fact, more than willing to go for said bloodbath. If foreign forces don't carry out some kind of strategic move or surgical strikes, nobody is going to stop them.
I don't know as much about Turkey, but I get the impression that, despite Erdogan's best attempts to erode them, Turkey still has strong secularist roots.