tps65090-charger: Fix AC detect
authorAndrew Chew <achew@nvidia.com>
Thu, 6 Jun 2013 21:12:43 +0000 (14:12 -0700)
committerAnton Vorontsov <anton@enomsg.org>
Sun, 9 Jun 2013 17:07:34 +0000 (10:07 -0700)
commite24142178fc2f60824af4312d326edacdcd667a3
tree9cfdfac74ecff5b45b94baba14fa3527a74789c0
parent9d5e2a023eee96b2326f9b0830a753b400917280
tps65090-charger: Fix AC detect

The VACG interrupt was not being enabled.  Thus, interrupts were never
generated when AC status changes.  In addition, interrupts were never
cleared after taking and processing the interrupt.

Added the register offset for the INTR_MASK register, since this is needed
to unmask the VACG interrupt.

Enabled the VACG interrupt in tps65090_config_charger().

Cleared interrupts after processing, in tps65090_charger_isr().

Also removed unused variable "enable" in tps65090_enable_charging(), and
fixed a typo in one of the dev_err() prints.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Tested-by: Rhyland Klein <rklein@nvidia.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/tps65090-charger.c