i2c: designware: Always enable runtime PM to notify parent device
In cases when the device specific flag "pm_runtime_disable" is set,
->probe() will only call pm_runtime_forbid() for the device without
enabling runtime PM.
To enable a parent device to be runtime PM resumed in such case, also
enable runtime PM. To maintain the same behavior, we then need to change
from using pm_runtime_forbid(), into pm_runtime_get_noresume() as to
prevent userspace from enabling runtime suspend via sysfs.
Within this context, let's also make sure to drop the runtime PM usage
count accordingly in the error path of ->probe() and in ->remove(), which
currently isn't done.
Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
Loading
Please sign in to comment