高通msm8952平台如何修改SDP的充电电流

  支持usb3.0的电脑,SDP的最大充电电流如何修改。

具体路径kernel/drivers/usb/gadget/Composite.c里面的函数

 
 

You can check if the computer PC have SS flag or not to see if it support to USB 3.0--900mA. 

static int set_config(struct usb_composite_dev *cdev, 
const struct usb_ctrlrequest *ctrl, unsigned number) 


...... 

/* when we return, be sure our power usage is valid */ 
power = c->MaxPower ? c->MaxPower : CONFIG_USB_GADGET_VBUS_DRAW; 
done: 
usb_gadget_vbus_draw(gadget, power); 
if (result >= 0 && cdev->delayed_status) 
result = USB_GADGET_DELAYED_STATUS; 
return result; 


you can change power to 900ma. 

but the actual current need host SDP support. 
除了上面的修改,充电模块会限制到这个电流,同时需要在相应的dtsi里面修改qcom.thermal-mitigations = <1500 700 600 0>改为<1500 900 600 0>


你可能感兴趣的:(usb)