diff options
author | Mallikarjun Kasoju <mkasoju@nvidia.com> | 2013-10-15 10:35:18 +0530 |
---|---|---|
committer | Mallikarjun Kasoju <mkasoju@nvidia.com> | 2013-10-15 22:24:04 -0700 |
commit | 62dfa503a614e5a2f23569ffc5fbcf33758a246c (patch) | |
tree | 937760f3241c66f2fa6008fd57e533dad88f4727 /drivers/extcon | |
parent | 0c646a98e3cebf4a056826ef4358c52331548d56 (diff) |
extcon: palmas: don't check line state
No need to check line state for getting cable state.
Bug 1360804
Change-Id: Id1b591939f5aa931281cbb32336d3234d0b23c4a
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/299294
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-palmas.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c index a95696b58415..ee6f716e3a20 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -99,7 +99,6 @@ static int palmas_usb_id_state_update(struct palmas_usb *palmas_usb) int new_state; int new_cable_index; int retry = 5; - unsigned int line_state; src_again: ret = palmas_read(palmas_usb->palmas, PALMAS_USB_OTG_BASE, @@ -147,27 +146,6 @@ src_again: new_cable_index = 0; } - ret = palmas_read(palmas_usb->palmas, PALMAS_INTERRUPT_BASE, - PALMAS_INT3_LINE_STATE, &line_state); - if (ret < 0) { - dev_err(palmas_usb->dev, - "INT3_LINE_STATE read failed: %d\n", ret); - return ret; - } - - /* Reconfirm the state by Line State */ - if (line_state & PALMAS_INT3_LINE_STATE_ID) { - if (new_state == PALMAS_USB_STATE_ID_FLOAT) { - new_state = PALMAS_USB_STATE_ID_GND; - new_cable_index = 1; - } - } else { - if (new_state != PALMAS_USB_STATE_ID_FLOAT) { - new_state = PALMAS_USB_STATE_ID_FLOAT; - new_cable_index = 0; - } - } - if (palmas_usb->id_linkstat == new_state) { dev_info(palmas_usb->dev, "No change in ID state: Old %d and New %d\n", |