No matter who comes home early, he has to cook dinner for his family, which is his family's rule.
Analysis:
Both are 1. Who and who can guide noun clauses, who and who are equivalent to who who. For example:
Whoever comes will be welcome.
Anyone is welcome to come.
Give it to whoever you like.
Give it to whoever you like.
2. Under what circumstances, the key is to see whether the sentence emphasizes "anyone". If you don't emphasize it, you can use who For example:
My question is who will take over as chairman of the foundation.
My question is who will take over as chairman of the foundation.