summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/ci_hdrc_imx.c
diff options
context:
space:
mode:
authorLi Jun2016-07-20 10:02:42 +0200
committerPeter Chen2016-09-14 04:58:13 +0200
commit9dba516ed282e3d16481051be547b54caa312029 (patch)
treeec7084ebf573cf90dc78098213eb57f87691e7a5 /drivers/usb/chipidea/ci_hdrc_imx.c
parentdoc: usb: ci-hdrc-usb2: add property over-current-active-high (diff)
downloadkernel-qcow2-linux-9dba516ed282e3d16481051be547b54caa312029.tar.gz
kernel-qcow2-linux-9dba516ed282e3d16481051be547b54caa312029.tar.xz
kernel-qcow2-linux-9dba516ed282e3d16481051be547b54caa312029.zip
usb: chipidea: imx: set over current polarity per dts setting
imx usb over current polarity is low active by default, with over-current-active-high property added, user can config it to be high active. Meanwhile keep this setting unchanged for existing platforms so new platform must set the right value for active low by its usbmisc init function if over current is enabled. Signed-off-by: Li Jun <jun.li@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/chipidea/ci_hdrc_imx.c')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index dedc33e589f4..099179457f60 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -140,6 +140,9 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev)
if (of_find_property(np, "disable-over-current", NULL))
data->disable_oc = 1;
+ if (of_find_property(np, "over-current-active-high", NULL))
+ data->oc_polarity = 1;
+
if (of_find_property(np, "external-vbus-divider", NULL))
data->evdo = 1;