Ref2: https://www.youtube.com/watch?v=Vqhnd-ZweDA
Recently bought a PS3 DUALSHOCK 3 controller for my Xperia Z1. Was desperately looking for charger as i didn't want to spend any more $ buying a dedicated DUALSHOCK 3 charger dock as i don't own a PS3.
Stumbled upon the above 2 links.
In essence it is this:
"Go to your Device Manager and then to your Human Interface Devices section before plugging in your PS3 controller. Then plug in your PS3 controller and you will see "HID-compliant game controller". Right click and disable "HID-compliant game controller" then unplug and replug in your PS3 controller and it should charge fine."
If that doesn't read well then following this video:
Cheers.