phy: Add .set_mode and .set_speed callbacks
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 19 Mar 2023 17:09:42 +0000 (18:09 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 7 Apr 2023 12:23:26 +0000 (14:23 +0200)
commitb0177a24d48e4ce13bfd7fce0d9c17dc0996f9a5
tree35132d34223ab4fe3ae58ee5f7ae811546d4ef87
parent12a8efbcdd6240e0f0a1e99b744eaed9ba6fba22
phy: Add .set_mode and .set_speed callbacks

Add two new callbacks matching the Linux ones. The .set_mode is used to set
PHY mode and submode, where mode is either USB, Ethernet, and so on, while
submode is e.g. for Ethernet case RGMII, RMII, and so on. The .set_speed is
used to configure link speed into the PHY. Unlike the existing configure
callback, which is used to pass arbitrary custom information to the PHY,
these two callbacks are used to pass standardized set of information to
the PHY.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/phy/phy-uclass.c
include/generic-phy.h