Commit a63c2252 authored by Ulf Hansson's avatar Ulf Hansson Committed by Guodong Xu
Browse files

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5ac79ec8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment