mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
usb: msm_otg: support for slimport charger
msm_otg codes will be used for slimport charger detection. Change-Id: Ie2179a546366ef24fdd8f738034dae2f00501f28
This commit is contained in:
parent
6ff2586036
commit
222b2e47ee
1 changed files with 17 additions and 3 deletions
|
@ -41,6 +41,7 @@
|
|||
#include <linux/mfd/pm8xxx/misc.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/mhl_8334.h>
|
||||
#include <linux/slimport.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
|
@ -2066,6 +2067,13 @@ static void msm_chg_detect_work(struct work_struct *w)
|
|||
delay = MSM_CHG_DCD_POLL_TIME;
|
||||
break;
|
||||
case USB_CHG_STATE_WAIT_FOR_DCD:
|
||||
if (slimport_is_connected()) {
|
||||
msm_chg_block_off(motg);
|
||||
motg->chg_state = USB_CHG_STATE_DETECTED;
|
||||
motg->chg_type = USB_SDP_CHARGER;
|
||||
queue_work(system_nrt_wq, &motg->sm_work);
|
||||
return;
|
||||
}
|
||||
if (msm_chg_mhl_detect(motg)) {
|
||||
msm_chg_block_off(motg);
|
||||
motg->chg_state = USB_CHG_STATE_DETECTED;
|
||||
|
@ -2273,6 +2281,10 @@ static void msm_otg_sm_work(struct work_struct *w)
|
|||
} else if ((!test_bit(ID, &motg->inputs) ||
|
||||
test_bit(ID_A, &motg->inputs)) && otg->host) {
|
||||
pr_debug("!id || id_A\n");
|
||||
if (slimport_is_connected()) {
|
||||
work = 1;
|
||||
break;
|
||||
}
|
||||
if (msm_chg_mhl_detect(motg)) {
|
||||
work = 1;
|
||||
break;
|
||||
|
@ -2324,9 +2336,11 @@ static void msm_otg_sm_work(struct work_struct *w)
|
|||
case USB_SDP_CHARGER:
|
||||
msm_otg_notify_charger(motg,
|
||||
IDEV_CHG_MIN);
|
||||
msm_otg_start_peripheral(otg, 1);
|
||||
otg->phy->state =
|
||||
OTG_STATE_B_PERIPHERAL;
|
||||
if(!slimport_is_connected()) {
|
||||
msm_otg_start_peripheral(otg, 1);
|
||||
otg->phy->state =
|
||||
OTG_STATE_B_PERIPHERAL;
|
||||
}
|
||||
schedule_delayed_work(&motg->check_ta_work,
|
||||
MSM_CHECK_TA_DELAY);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue