Merge pull request #20 from brain-hackers/brain-i2c-fix
Fix usb and i2c
This commit is contained in:
commit
f50b08037d
|
@ -206,3 +206,5 @@ CONFIG_STACKTRACE=y
|
|||
CONFIG_STRICT_DEVMEM=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_TOUCHSCREEN_SX8654=y
|
||||
CONFIG_INPUT_PWM_BEEPER=y
|
||||
CONFIG_TINYDRM_BRAIN_ST7586=y
|
||||
|
|
|
@ -840,9 +840,12 @@ static int mxs_i2c_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* Setup the DMA */
|
||||
i2c->dmach = dma_request_slave_channel(dev, "rx-tx");
|
||||
if (!i2c->dmach) {
|
||||
dev_err(dev, "Failed to request dma\n");
|
||||
i2c->dmach = dma_request_chan(dev, "rx-tx");
|
||||
if (IS_ERR(i2c->dmach)) {
|
||||
if (PTR_ERR(i2c->dmach) == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
dev_err(dev, "Failed to request dma: %ld\n", PTR_ERR(i2c->dmach));
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
@ -470,13 +470,15 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
goto err_clk;
|
||||
}
|
||||
|
||||
if (!IS_ERR(pdata.id_extcon.edev) ||
|
||||
of_property_read_bool(np, "usb-role-switch"))
|
||||
data->usbmisc_data->ext_id = 1;
|
||||
if ((!IS_ERR(pdata.id_extcon.edev) ||
|
||||
of_property_read_bool(np, "usb-role-switch")) &&
|
||||
!IS_ERR_OR_NULL(data->usbmisc_data))
|
||||
data->usbmisc_data->ext_id = 1;
|
||||
|
||||
if (!IS_ERR(pdata.vbus_extcon.edev) ||
|
||||
of_property_read_bool(np, "usb-role-switch"))
|
||||
data->usbmisc_data->ext_vbus = 1;
|
||||
if ((!IS_ERR(pdata.vbus_extcon.edev) ||
|
||||
of_property_read_bool(np, "usb-role-switch")) &&
|
||||
!IS_ERR_OR_NULL(data->usbmisc_data))
|
||||
data->usbmisc_data->ext_vbus = 1;
|
||||
|
||||
ret = imx_usbmisc_init_post(data->usbmisc_data);
|
||||
if (ret) {
|
||||
|
@ -485,7 +487,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* usbmisc needs to know dr mode to choose wakeup setting */
|
||||
data->usbmisc_data->available_role =
|
||||
if (!IS_ERR_OR_NULL(data->usbmisc_data))
|
||||
data->usbmisc_data->available_role =
|
||||
ci_hdrc_query_available_role(data->ci_pdev);
|
||||
|
||||
if (data->supports_runtime_pm) {
|
||||
|
|
Loading…
Reference in New Issue