It is Illegal to Withhold the Passport by "Any" Company, be it Private Ltd or Public Ltd....

Yes! Its the Right of the Employee to Resign Whenever He/She wants too & Employer has to accept that without creating any hassle...