static int tavorevb_vbus_detect(void *func, int enable) { if (enable) { pmic_callback_register(PMIC_EVENT_USB, func); pxa3xx_pmic_set_pump(1); } else { pxa3xx_pmic_set_pump(0); pmic_callback_unregister(PMIC_EVENT_USB, func); } return 0; }
/****************************************************************** * pmic special functions ****************************************************************** */ static int otg_vbus_init(void) { int status = 0; #ifdef PXA3xx_OTG_VBUS_PMIC status = pxa3xx_pmic_set_pump(1); if (status) return OTG_I2C_ERROR; #endif return 0; }