OSDN Git Service

phy: rcar-gen3-usb2: check dr_mode for otg mode
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 12 Oct 2017 06:34:45 +0000 (15:34 +0900)
committerKishon Vijay Abraham I <kishon@ti.com>
Mon, 23 Oct 2017 05:49:26 +0000 (11:19 +0530)
commit7e0540f41332cb07055c5fe6629dc83c71974c82
tree773b17a3dd9c876ba4a56ee5ad3a385c919d2451
parentf7da4e6d29539bad2c29dd8ccb4ac628fe19f82b
phy: rcar-gen3-usb2: check dr_mode for otg mode

The previous code assumed a channel has otg capability if a channel
has interrupt property. But, it is not good because:
 - Battery charging feature also needs interrupt property.
 - Some R-Car Gen3 SoCs (e.g. R-Car D3) don't have OTG capability.

So, this patch checks whether usb 2.0 host node has dr_mode property or
not. If it has 'dr_mode = "otg";', this driver enables otg capability.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/renesas/phy-rcar-gen3-usb2.c