i2c: qcom: geni: Turn off resources during system-suspend if needed

I2C clients may need the bus to do transactions while system suspend
is in progress. While Runtime-PM resume turns on resources
successfully for such transactions, runtime-suspend callback is not
called by put_sync method to avoid race between runtime PM and system
PM frameworks.
Turn off resources if this condition is detected during I2C bus
system suspend callback, and set the runtime-PM status to be
consistent with the hardware. If however, transaction is still
ongoing during noirq suspend callback, abort suspend by returning
-EBUSY.

Change-Id: Id93afa765bf97babcb6a9c6922d25f108afdc7f3
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
1 file changed