drivers: usb: otg: Enable the host mode of usb otg only when the host mode isn't enabled.

Change-Id: I1c2d2c06b68b391119d3fae2f777a21d30a92255
This commit is contained in:
yi-hsin_hung 2013-03-12 08:46:19 +08:00 committed by Iliyan Malchev
parent 9189b562aa
commit f93fd69ed0

View file

@ -3143,7 +3143,8 @@ static void id_pin_irq_work_function(struct work_struct *work)
if (slimport_is_connected())
pr_info("%s: slimport_is_connected\n", __func__);
else {
if (gpio == 0) {
pr_debug("%s: gpio_get_value(APQ_OTG_ID_PIN) = %d\n", __func__, gpio_get_value(APQ_OTG_ID_PIN));
if (gpio == 0 && otg_host_on == 0) {
pr_info("%s: APQ_OTG_ID_PIN is low : Host mode\n", __func__);
set_bit(A_BUS_REQ, &motg->inputs);
clear_bit(ID, &motg->inputs);