I'm a starter. I'll try to keep it short.

It's my first circuit I plan to actually use for a while. It's going to be a little desktop fan that can be powered by either a wall adapter or batteries. The fan is 12V 550mA (Noctua's NF-A14 3000RPM specifically. Yes, I know it's crazy overkill, and yes, I know it's suppose to be used in a PC).
When the wall adapter is plugged in, the P-channel MOSFET's gate to source voltage will be 0, so it will cut off the batteries and the fan will only be powered by the wall adapter. When the wall adapter is unplugged, the gate is at 0 volts, so the gate to source is -12V, and so the P-channel MOSFET will turn on and let the batteries power it.
R2 will be a potentiometer located on the front of the device. Unfortunately, the fan speed will be non-linear, but that's not
too much of an issue.
So, will this work? If not, what's causing the issue? (I'd really like to avoid using a switched barrel jack, but I can use one if it's 100% completely absolutely totally necessary.)
Thanks in advance!
