If you use RP3 B2 please check out the reworked ps3 module: https://www.petrockblock.com/forums/topic/ps3-controller-on-bluetooth-anyway-to-save-the-emulation-station-settings/#post-96127
If a bluetooth dongle is present and you connect a ps3 controller over USB the controller will be paired instantly. Remove USB cable from PS3 controller, press PS button and have fun.
-Bluetooth dongle + wired PS3 controller is not possible at the same time. Remove bluetooth dongle to get wired connection working.