pm: Remove state lock/unlock API
This API is not widely used and it is actually broken since device runtime power management is not checking it when suspending and resuming. On top of that, this API is very close to pm_device_busy* API, close enough to consolidate in only one API. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
e85226fd1a
commit
3b895064af
6 changed files with 0 additions and 119 deletions
|
@ -250,18 +250,6 @@ ZTEST(device_runtime_api, test_api)
|
|||
/* Put operation should fail due the state be locked. */
|
||||
ret = pm_device_runtime_disable(test_dev);
|
||||
zassert_equal(ret, 0);
|
||||
|
||||
pm_device_state_lock(test_dev);
|
||||
|
||||
/* This operation should not succeed. */
|
||||
ret = pm_device_runtime_enable(test_dev);
|
||||
zassert_equal(ret, -EPERM);
|
||||
|
||||
/* After unlock the state, enable runtime should work. */
|
||||
pm_device_state_unlock(test_dev);
|
||||
|
||||
ret = pm_device_runtime_enable(test_dev);
|
||||
zassert_equal(ret, 0);
|
||||
}
|
||||
|
||||
DEVICE_DEFINE(pm_unsupported_device, "PM Unsupported", NULL, NULL, NULL, NULL,
|
||||
|
|
|
@ -437,21 +437,6 @@ ZTEST(power_management_1cpu, test_busy)
|
|||
zassert_false(busy);
|
||||
}
|
||||
|
||||
ZTEST(power_management_1cpu, test_device_state_lock)
|
||||
{
|
||||
pm_device_state_lock(device_a);
|
||||
zassert_true(pm_device_state_is_locked(device_a));
|
||||
|
||||
testing_device_lock = true;
|
||||
enter_low_power = true;
|
||||
|
||||
k_sleep(SLEEP_TIMEOUT);
|
||||
|
||||
pm_device_state_unlock(device_a);
|
||||
|
||||
testing_device_lock = false;
|
||||
}
|
||||
|
||||
ZTEST(power_management_1cpu, test_empty_states)
|
||||
{
|
||||
const struct pm_state_info *cpu_states;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue