mfd: Deny ab8500 suspend if i2c transfer is ongoing
authorJonas Aaberg <jonas.aberg@stericsson.com>
Tue, 17 Apr 2012 07:30:33 +0000 (09:30 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 1 May 2012 11:33:18 +0000 (13:33 +0200)
commit112a80d29b529d4057777ac2cb4ec15ff5b6d210
treea649f58551524d4f07c083623ea084b6ecaf5ca1
parent7e82d6ff5d2c5e35d1fcb8c673287f7d780a13bb
mfd: Deny ab8500 suspend if i2c transfer is ongoing

If we are in the middle of an I2C transfer we need to deny suspend
of the AB8500 core. Implement an atomic reference counter for the
I2C operations to make sure we don't do this.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab8500-core.c
include/linux/mfd/abx500/ab8500.h