Problem with 2007 Toyota Yaris
The offside door mirror has been knocked and now the electrics are playing up, so every time we switch the ignition on the complete mirror unit is powered and just performs a continuous ratcheting action. This can only be solved by holding the unit firm for a short period. Toyota say the only repair option is a new unit at $700! The glass adjusting motor still works as does the folding action.
Sounds like the main motor mount pin is snapped.
Unfortunately they are right, you will need to replace the mirror unit complete.
That said, I wouldn't be paying $700. Ring around wreckers and get a 2nd hand one. You'll likely find one in the right color for your vehicle..