diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-08-31 22:18:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-01 21:16:38 +0200 |
commit | dc272f600eb3c3453c1289b095c6749d3241ae81 (patch) | |
tree | b43ab2dcb6f5ca0d5051433b7ed7308b0795fe7a /drivers/net/dsa/mv88e6xxx/chip.h | |
parent | net: dsa: mv88e6xxx: merge mv88e6352_serdes_power_set (diff) | |
download | linux-dc272f600eb3c3453c1289b095c6749d3241ae81.tar.xz linux-dc272f600eb3c3453c1289b095c6749d3241ae81.zip |
net: dsa: mv88e6xxx: pass lane to .serdes_power
Now the first step of all .serdes_power implementations is getting
the lane mapping. Since we have an operation for that, call it in
the wrapper and pass the lane down to the .serdes_power operation.
This also allows to avoid querying the SERDES lane twice in
mv88e6xxx_port_set_cmode.
At the same time provide mv88e6xxx_serdes_power_{up,down} helpers
and prefer up/down instead of on/off as in the documentation.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.h')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h index add0ec5188ec..724ce2bf8258 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -441,7 +441,8 @@ struct mv88e6xxx_ops { int (*mgmt_rsvd2cpu)(struct mv88e6xxx_chip *chip); /* Power on/off a SERDES interface */ - int (*serdes_power)(struct mv88e6xxx_chip *chip, int port, bool on); + int (*serdes_power)(struct mv88e6xxx_chip *chip, int port, u8 lane, + bool up); /* SERDES lane mapping */ u8 (*serdes_get_lane)(struct mv88e6xxx_chip *chip, int port); |