diff options
author | Li Jun <jun.li@nxp.com> | 2016-07-20 16:02:42 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@nxp.com> | 2016-09-14 10:58:13 +0800 |
commit | 9dba516ed282e3d16481051be547b54caa312029 (patch) | |
tree | ec7084ebf573cf90dc78098213eb57f87691e7a5 /drivers/usb/chipidea/ci_hdrc_imx.c | |
parent | e5b3253dcc8c6a2cb2b13916e77afe9fdfe55d27 (diff) | |
download | blackbird-op-linux-9dba516ed282e3d16481051be547b54caa312029.tar.gz blackbird-op-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.c | 3 |
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; |