extcon: max77693: Fix bug when detecting MHL/Dock-Audio with USB/TA cable
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 6 Dec 2012 12:36:18 +0000 (21:36 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 15 Jan 2013 06:42:16 +0000 (15:42 +0900)
commit0e2738f59c6db185a70a683059980bd2296571ca
tree83f85242972facb889d7b75ce62287ba8190a0ac
parent2b75799f5ae9f31ea9778003591fd295d3bc3159
extcon: max77693: Fix bug when detecting MHL/Dock-Audio with USB/TA cable

This patch fix bug that muic couldn't detect MHL/Dock-Audio with USB/TA
cable on exception situation. I explain detail case on following:

When MHL(with USB/TA cable) or Dock-Audio with USB/TA cable is attached,
the MUIC device happen following two interrupt.
- 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting MHL/Dock-Audio.
- 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting USB/TA cable connected to
MHL/Dock-Audio. Always, happen eariler MAX77693_MUIC_IRQ_INT1_ADC interrupt
than MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt.

If user attach MHL with USB/TA cable and immediately detach MHL with USB/TA
cable before MAX77693_MUIC_IRQ_INT2_CHGTYP interrupt is happened, USB/TA
connected to MHL cable remain connected state to target. But USB/TA connected
to MHL cable isn't connected to target. user be faced with unusual action.
So, driver should check this situation in spite of that, previous charger type
is N/A.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
drivers/extcon/extcon-max77693.c