diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2021-05-13 11:47:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-21 21:05:32 +0300 |
commit | 3eb96e04be9918afa54b64fac943de86a9798bda (patch) | |
tree | ca104fe7cb854b5c8e7bf38d6070dd24cc4decf2 /drivers/usb/isp1760/isp1760-if.c | |
parent | a74f639c5b5618e2c9f311c93bc3e7405de8ca85 (diff) | |
download | linux-3eb96e04be9918afa54b64fac943de86a9798bda.tar.xz |
usb: isp1760: use dr_mode binding
There is already a binding to describe the dual role mode (dr_mode),
use that instead of defining a new one (port1-otg).
Update driver code and devicetree files that use that port1-otg
binding.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://lore.kernel.org/r/20210513084717.2487366-7-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/isp1760/isp1760-if.c')
-rw-r--r-- | drivers/usb/isp1760/isp1760-if.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/isp1760/isp1760-if.c b/drivers/usb/isp1760/isp1760-if.c index fb6701608cd8..cb3e4d782315 100644 --- a/drivers/usb/isp1760/isp1760-if.c +++ b/drivers/usb/isp1760/isp1760-if.c @@ -17,6 +17,7 @@ #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/usb/hcd.h> +#include <linux/usb/otg.h> #include "isp1760-core.h" #include "isp1760-regs.h" @@ -213,8 +214,8 @@ static int isp1760_plat_probe(struct platform_device *pdev) if (bus_width == 16) devflags |= ISP1760_FLAG_BUS_WIDTH_16; - if (of_property_read_bool(dp, "port1-otg")) - devflags |= ISP1760_FLAG_OTG_EN; + if (usb_get_dr_mode(&pdev->dev) == USB_DR_MODE_PERIPHERAL) + devflags |= ISP1760_FLAG_PERIPHERAL_EN; if (of_property_read_bool(dp, "analog-oc")) devflags |= ISP1760_FLAG_ANALOG_OC; |