diff options
| author | Tom Rini <[email protected]> | 2024-09-09 15:54:56 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-09-09 15:54:56 -0600 |
| commit | ca55cf8104c0dd78aae45fa66dd8400ef1b3d0ac (patch) | |
| tree | 90aa093631b4cbda08e4ef9244d3e51b192377cd /test | |
| parent | 48038bfb4dc2ef8ddb67c1301ffcd633fd1afa22 (diff) | |
| parent | e72e683e36a83214dbb2547d88d553b5fd816dc8 (diff) | |
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-usb into next
Diffstat (limited to 'test')
| -rw-r--r-- | test/dm/phy.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/dm/phy.c b/test/dm/phy.c index 9b4cff60e6a..194cad0bf70 100644 --- a/test/dm/phy.c +++ b/test/dm/phy.c @@ -243,20 +243,27 @@ static int dm_test_phy_setup(struct unit_test_state *uts) "gen_phy_user", &parent)); /* normal */ - ut_assertok(generic_setup_phy(parent, &phy, 0)); + ut_assertok(generic_setup_phy(parent, &phy, 0, PHY_MODE_USB_HOST, 0)); + ut_assertok(generic_shutdown_phy(&phy)); + + /* set_mode as USB Host passes, anything else is not supported */ + ut_assertok(generic_setup_phy(parent, &phy, 0, PHY_MODE_USB_HOST, 0)); + ut_assertok(generic_phy_set_mode(&phy, PHY_MODE_USB_HOST, 0)); + ut_asserteq(-EOPNOTSUPP, generic_phy_set_mode(&phy, PHY_MODE_USB_HOST, 1)); + ut_asserteq(-EINVAL, generic_phy_set_mode(&phy, PHY_MODE_USB_DEVICE, 0)); ut_assertok(generic_shutdown_phy(&phy)); /* power_off fail with -EIO */ - ut_assertok(generic_setup_phy(parent, &phy, 1)); + ut_assertok(generic_setup_phy(parent, &phy, 1, PHY_MODE_USB_HOST, 0)); ut_asserteq(-EIO, generic_shutdown_phy(&phy)); /* power_on fail with -EIO */ - ut_asserteq(-EIO, generic_setup_phy(parent, &phy, 2)); + ut_asserteq(-EIO, generic_setup_phy(parent, &phy, 2, PHY_MODE_USB_HOST, 0)); ut_assertok(generic_shutdown_phy(&phy)); /* generic_phy_get_by_index fail with -ENOENT */ ut_asserteq(-ENOENT, generic_phy_get_by_index(parent, 3, &phy)); - ut_assertok(generic_setup_phy(parent, &phy, 3)); + ut_assertok(generic_setup_phy(parent, &phy, 3, PHY_MODE_USB_HOST, 0)); ut_assertok(generic_shutdown_phy(&phy)); return 0; |
