extcon: palmas: enable ID_GND and ID_FLOAT detection always
authorLaxman Dewangan <ldewangan@nvidia.com>
Tue, 9 Jul 2013 13:04:22 +0000 (18:34 +0530)
committerChanwoo Choi <cw00.choi@samsung.com>
Sun, 4 Aug 2013 23:53:34 +0000 (08:53 +0900)
commit002945f014ab51c470fdbd30b199fa85f715280d
tree13a25899562aef60b583952d61d98dd6b016cebf
parent43e3f38892a6a521ff5901cdb97cf6985101badd
extcon: palmas: enable ID_GND and ID_FLOAT detection always

When integrating driver with Tegra platform, it is found that
the ID pins get detected only once after booting system and
further removal and re-insert does not detect the ID pin.

Fixing this issue with enabling interrupt on ID_GND and ID_FLOAT
always  and clearing the status on LATCH register which actually
occurred.

Also if interrupt occurs with line status as zero then based on
previous status, set the cable state.

Add debug prints to display the cable state when any cable
insertion/removal happen.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
drivers/extcon/extcon-palmas.c