Clock handling code is now equal between A10 and A13, so it is easier to have one unified driver.
And in pending is a strange part of code, that is working with power regulator doesn't belonging to USB, like this:
static u32 alloc_pin(struct sw_hci_hcd *sw_hci, user_gpio_set_t *gpio_list)
{
u32 pin_handle = 0;
char name[32];
memset(name, 0, 32);
if(gpio_list->port == 0xffff){ //axp
if(gpio_list->port_num >= USB_EXTERN_PIN_LDO_MASK){
#ifdef CONFIG_REGULATOR
switch((gpio_list->port_num - USB_EXTERN_PIN_LDO_MASK)){
case 1:
strcpy(name, "axp20_rtc");
break;
case 2:
strcpy(name, "axp20_analog/fm");
break;
case 3:
strcpy(name, "axp20_pll");
break;
case 4:
strcpy(name, "axp20_hdmi");
break;
default:
DMSG_PANIC("ERR: unkown gpio_list->port_num(%d)\n", gpio_list->port_num);
goto failed;
}
pin_handle = (u32)regulator_get(NULL, name);
if(pin_handle == 0){
DMSG_PANIC("ERR: regulator_get failed\n");
return 0;
}
regulator_force_disable((struct regulator*)pin_handle);
#else
DMSG_PANIC("CONFIG_REGULATOR is not define\n");
#endif
}else{
axp_gpio_set_io(gpio_list->port_num, gpio_list->mul_sel);
axp_gpio_set_value(gpio_list->port_num, gpio_list->data);
return (100 + gpio_list->port_num);
}
}else{ //gpio
pin_handle = gpio_request(gpio_list, 1);
if(pin_handle == 0){
DMSG_PANIC("ERR: gpio_request failed\n");
return 0;
}
/* set config, ouput */
gpio_set_one_pin_io_status(pin_handle, 1, NULL);
/* reserved is pull down */
gpio_set_one_pin_pull(pin_handle, 2, NULL);
}
failed:
return pin_handle;
}
I believe that USB driver should not to mess with HDMI or others. So it is still in pending.