Skip to content

Commit

Permalink
Merge tag 'phy-attrs-5.10' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/phy/linux-phy into 5.10/dp-pull

New phy attributes slated for kernel release v5.10. These are needed by
the Cadence MHDP driver.
  • Loading branch information
Tomi Valkeinen committed Sep 18, 2020
2 parents b40be05 + 0ffcc37 commit 92ffad6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/phy/cadence/phy-cadence-torrent.c
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,10 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
cdns_phy->phys[node].num_lanes,
cdns_phy->max_bit_rate / 1000,
cdns_phy->max_bit_rate % 1000);

gphy->attrs.bus_width = cdns_phy->phys[node].num_lanes;
gphy->attrs.max_link_rate = cdns_phy->max_bit_rate;
gphy->attrs.mode = PHY_MODE_DP;
} else {
dev_err(dev, "Driver supports only PHY_TYPE_DP\n");
ret = -ENOTSUPP;
Expand Down
2 changes: 2 additions & 0 deletions include/linux/phy/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ struct phy_ops {
/**
* struct phy_attrs - represents phy attributes
* @bus_width: Data path width implemented by PHY
* @max_link_rate: Maximum link rate supported by PHY (in Mbps)
* @mode: PHY mode
*/
struct phy_attrs {
u32 bus_width;
u32 max_link_rate;
enum phy_mode mode;
};

Expand Down

0 comments on commit 92ffad6

Please sign in to comment.