power: supply: tps65217: Support USB charger interrupt
authorMilo Kim <woogyom.kim@gmail.com>
Sun, 18 Dec 2016 02:54:27 +0000 (11:54 +0900)
committerSebastian Reichel <sre@kernel.org>
Wed, 4 Jan 2017 21:00:18 +0000 (22:00 +0100)
commit20a7e173c2a3604c418242f3e60ca36a28108816
tree52ab341ffbdc95505ce435ed1df2d18cacbc9472
parent9ef0bf1184a6dfb6d6dca1feca4c28d0d8da519c
power: supply: tps65217: Support USB charger interrupt

TPS65217 has two charger interrupts - AC and USB power status change.

Interrupt number in the TPS65217 driver data:
  IRQ number is only used on requesting the interrupt, so no need to keep
  it inside the driver data.

Interrupt handler:
  Check not only AC but also USB charger status.
  In both cases, enable charging operation.

Interrupt request:
  If an interrupt number is invalid, then use legacy polling thread.
  Otherwise, create IRQ threads to handle AC and USB charger event.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/tps65217_charger.c