You do not need to clear all damage.
You do need to repair enough to place at least 1 unit, if you want to use it that turn.
For example: A minor factory can normally place 3 units. If it has 5 damage, you need to repair 3 damage to place 1 unit, 4 to place 2, and 5 to place all 3.
The amount you can place (for a minor) that turn is simply 3 - (damage). If damage is greater or equal to 3, then you can’t place.
A factory can be damaged for up to twice its output. Major = 20 damage max, Minor = 6 damage max.
See page 24 of the AAEurope1940 rulebook, second sentence of paragraph that starts with “Damaged Factories and Bases:”, “For each damage marker that is under a given industrial complex, that factory can mobilize one less unit.” - This implies it can still produce while damaged, just at a lesser output.