Have a look at the resol binding. If your device supports vbus you are close to a very well working solution