@@ -700,13 +700,16 @@ static int ci_get_platdata(struct device *dev,
if (usb_get_maximum_speed(dev) == USB_SPEED_FULL)
platdata->flags |= CI_HDRC_FORCE_FULLSPEED;
- of_property_read_u32(dev->of_node, "phy-clkgate-delay-us",
- &platdata->phy_clkgate_delay_us);
+ if (of_property_read_u32(dev->of_node, "phy-clkgate-delay-us",
+ &platdata->phy_clkgate_delay_us))
+ dev_dbg(dev, "Missing phy-clkgate-delay-us property\n");
platdata->itc_setting = 1;
- of_property_read_u32(dev->of_node, "itc-setting",
- &platdata->itc_setting);
+ if (of_property_read_u32(dev->of_node, "itc-setting",
+ &platdata->itc_setting))
+ dev_dbg(dev, "Missing itc-setting property\n");
+
ret = of_property_read_u32(dev->of_node, "ahb-burst-config",
&platdata->ahb_burst_config);
@@ -168,6 +168,7 @@ static int hw_wait_vbus_lower_bsv(struct ci_hdrc *ci)
static void ci_handle_id_switch(struct ci_hdrc *ci)
{
enum ci_role role = ci_otg_role(ci);
+ int ret;
if (role != ci->role) {
dev_dbg(ci->dev, "switching from %s to %s\n",
@@ -193,7 +194,10 @@ static void ci_handle_id_switch(struct ci_hdrc *ci)
*/
hw_wait_vbus_lower_bsv(ci);
- ci_role_start(ci, role);
+ ret = ci_role_start(ci, role);
+ if (ret < 0)
+ dev_dbg(ci->dev, "switching err %d\n", ret);
+
/* vbus change may have already occurred */
if (role == CI_ROLE_GADGET)
ci_handle_vbus_change(ci);