]> Git Repo - J-u-boot.git/commit
phy: test: Implement sandbox PHY .set_mode and DM test
authorMarek Vasut <[email protected]>
Sun, 8 Sep 2024 21:09:05 +0000 (23:09 +0200)
committerMarek Vasut <[email protected]>
Mon, 9 Sep 2024 15:18:04 +0000 (17:18 +0200)
commite72e683e36a83214dbb2547d88d553b5fd816dc8
tree68db84a91d50e1732e6c492bec881784f4d6bcd3
parenta1f841a33c4e0b90721468a28030cecdb1cfd953
phy: test: Implement sandbox PHY .set_mode and DM test

Implement trivial extension to the sandbox PHY, which makes it pretend
to support selecting USB Host mode and nothing else. Any other mode is
rejected with -EINVAL. Any submode except for default submode 0 is
rejected with -EOPNOTSUPP . The implementation behaves in this trivial
way to permit easy unit testing using test which is also added in this
commit.

To run the test, use e.g. sandbox64_defconfig and run U-Boot as follows:
$ ./u-boot -Tc 'ut dm phy_setup'

Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Marek Vasut <[email protected]>
drivers/phy/sandbox-phy.c
test/dm/phy.c
This page took 0.033379 seconds and 4 git commands to generate.