Skip to content

Commit 91227b1

Browse files
tests: pm: power_domain: use default power domain driver
The power_domain test suite created its own device driver for its power domain, which is no longer required as there is a default one implemented, use the default driver instead. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 89daa8a commit 91227b1

File tree

1 file changed

+0
-34
lines changed
  • tests/subsys/pm/power_domain/src

1 file changed

+0
-34
lines changed

tests/subsys/pm/power_domain/src/main.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,6 @@ static const struct device *devc;
2121
static int testing_domain_on_notitication;
2222
static int testing_domain_off_notitication;
2323

24-
static int domain_pm_action(const struct device *dev,
25-
enum pm_device_action action)
26-
{
27-
int rc = 0;
28-
29-
switch (action) {
30-
case PM_DEVICE_ACTION_RESUME:
31-
/* Switch power on */
32-
pm_device_children_action_run(dev, PM_DEVICE_ACTION_TURN_ON, NULL);
33-
break;
34-
case PM_DEVICE_ACTION_SUSPEND:
35-
pm_device_children_action_run(dev, PM_DEVICE_ACTION_TURN_OFF, NULL);
36-
break;
37-
case PM_DEVICE_ACTION_TURN_ON:
38-
__fallthrough;
39-
case PM_DEVICE_ACTION_TURN_OFF:
40-
break;
41-
default:
42-
rc = -ENOTSUP;
43-
}
44-
45-
return rc;
46-
47-
}
48-
4924
static int deva_pm_action(const struct device *dev,
5025
enum pm_device_action pm_action)
5126
{
@@ -90,11 +65,6 @@ static int devb_pm_action(const struct device *dev,
9065
return ret;
9166
}
9267

93-
94-
PM_DEVICE_DT_DEFINE(TEST_DOMAIN, domain_pm_action);
95-
DEVICE_DT_DEFINE(TEST_DOMAIN, NULL, PM_DEVICE_DT_GET(TEST_DOMAIN),
96-
NULL, NULL, POST_KERNEL, 10, NULL);
97-
9868
PM_DEVICE_DT_DEFINE(TEST_DEVA, deva_pm_action);
9969
DEVICE_DT_DEFINE(TEST_DEVA, NULL, PM_DEVICE_DT_GET(TEST_DEVA),
10070
NULL, NULL, POST_KERNEL, 20, NULL);
@@ -225,10 +195,6 @@ ZTEST(power_domain_1cpu, test_power_domain_device_runtime)
225195
#define TEST_DOMAIN_BALANCED DT_NODELABEL(test_domain_balanced)
226196
#define TEST_DEV_BALANCED DT_NODELABEL(test_dev_balanced)
227197

228-
PM_DEVICE_DT_DEFINE(TEST_DOMAIN_BALANCED, domain_pm_action);
229-
DEVICE_DT_DEFINE(TEST_DOMAIN_BALANCED, NULL, PM_DEVICE_DT_GET(TEST_DOMAIN_BALANCED),
230-
NULL, NULL, POST_KERNEL, 10, NULL);
231-
232198
PM_DEVICE_DT_DEFINE(TEST_DEV_BALANCED, deva_pm_action);
233199
DEVICE_DT_DEFINE(TEST_DEV_BALANCED, NULL, PM_DEVICE_DT_GET(TEST_DEV_BALANCED),
234200
NULL, NULL, POST_KERNEL, 20, NULL);

0 commit comments

Comments
 (0)