Some usb module soc implementations can support usb charger type detection, which can be used by usb charger framework to control the charging current. User can define the charge detection api of the platform data if want to enable it. There are 2 api and one flag used for it, if the usb hardware can automatically complete the detection process, only platdata->usb_charger_det is required. Some imx platform need software implement the detection process, and need pull up and down DP line before and after secondary detection so platdata->usb_charger_secondary_det is also required and need set pull_dp_for_charger flag, tested with i.mx7d, support for i.mx6 will be added later. This patch set is based on Baolin's usb charger framework: http://comments.gmane.org/gmane.linux.power-management.general/74394 Changes for v2: - Merge patch 3/5 and 4/5 to be 3/4. - Rename functions name to be more readable, - Add comments for 2 added api and 1 flag in ci_hdrc_platform_data. Li Jun (4): usb: chipidea: add usb charger detection support usb: chipidea: imx: add usb charger dectection for imx platforms usb: chipidea: imx: add usb charger detection for imx7d doc: usb: ci-hdrc-usb2: add property usb-charger-detection .../devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 + drivers/usb/chipidea/ci_hdrc_imx.c | 47 ++++- drivers/usb/chipidea/ci_hdrc_imx.h | 3 + drivers/usb/chipidea/udc.c | 40 +++++ drivers/usb/chipidea/usbmisc_imx.c | 194 +++++++++++++++++++++ include/linux/usb/chipidea.h | 18 ++ 6 files changed, 303 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html