Even before Carter the US was partially to blame with insensitivity as to where they were. The US footprint in Iran was HUGE! I read (and I admit I don’t believe it!) it numbered up to 30K (military & oil worker civilians). That part of the world is NOT Europe! We treated it like it was! And yes, the Shah encouraged that US attitude. Resentment against the US was huge in Iran and fueled the revolution.
Carter messed that up. Big time.