power: rk818 charger: fix otg supply on/off error
authorJianhong Chen <chenjh@rock-chips.com>
Fri, 23 Sep 2016 06:42:20 +0000 (14:42 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 30 Sep 2016 07:29:49 +0000 (15:29 +0800)
commita2b672fd1b2ce85931c96948d9a0dfd0dfc950cb
tree9f2885465c7743a5290034ef010babb42a504a3b
parentfffb397c49f0687cac8816b296eb1d4650c5d746
power: rk818 charger: fix otg supply on/off error

As we register regmap irq to manage rk818 irqs, it should
not enable/disable irq by modifying register directly. And
check otg on/off line state before setting new state.

Change-Id: I45d45d62bea05b1c489337ac7f3334fbafcd4166
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
drivers/power/rk818_charger.c