but I find it ackward that there is no pullup resistor, I read many times a comparator needed one
- does it ?
- since the comparator appears to be powered by 5V USB, if there is no USB plugged in, is it's output low by default, so the FET is open letting any VIN supply go through ? how can I be sure of this ?
LMV358 are rail-to-rail OPs, not comparators, but can be of course used as comparators as well. The output is push-pull, no pull-ups required or useful.
The OP can work for the application, but I wonder why you don't use single channel LMV321?
Most comparators have open_collector or open_drain output, but there are also push-pull output comparators.
LMV358 is no comparator, it is an OPAMP. OPAMPs usually have push-pull ouput.
The comparator is powered by +5V node, derived from Vin and Vusb. In so far I don't understand the question.
You should pay attention to the MOSFET direction. It's main function is block reverse feeding the USB from VIN. It switches off if Vin > 6.6V, not strictly the expected safe behavior of an USB client according to USB standard.