Skip to content

Commit b000be9

Browse files
bstreiffdavem330
authored andcommitted
net: dsa: mv88e6xxx: export g2 register accessors
Let the mv88e6xxx_g2_* register accessor functions be accessible outside of global2.c. Signed-off-by: Brandon Streiff <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 052fddf commit b000be9

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

drivers/net/dsa/mv88e6xxx/global2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
#include "global1.h" /* for MV88E6XXX_G1_STS_IRQ_DEVICE */
2121
#include "global2.h"
2222

23-
static int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val)
23+
int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val)
2424
{
2525
return mv88e6xxx_read(chip, chip->info->global2_addr, reg, val);
2626
}
2727

28-
static int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val)
28+
int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val)
2929
{
3030
return mv88e6xxx_write(chip, chip->info->global2_addr, reg, val);
3131
}
3232

33-
static int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update)
33+
int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update)
3434
{
3535
return mv88e6xxx_update(chip, chip->info->global2_addr, reg, update);
3636
}
3737

38-
static int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask)
38+
int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask)
3939
{
4040
return mv88e6xxx_wait(chip, chip->info->global2_addr, reg, mask);
4141
}

drivers/net/dsa/mv88e6xxx/global2.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ static inline int mv88e6xxx_g2_require(struct mv88e6xxx_chip *chip)
230230
return 0;
231231
}
232232

233+
int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val);
234+
int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val);
235+
int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update);
236+
int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask);
237+
233238
int mv88e6352_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port);
234239
int mv88e6390_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port);
235240

@@ -279,6 +284,26 @@ static inline int mv88e6xxx_g2_require(struct mv88e6xxx_chip *chip)
279284
return 0;
280285
}
281286

287+
static int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val)
288+
{
289+
return -EOPNOTSUPP;
290+
}
291+
292+
static int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val)
293+
{
294+
return -EOPNOTSUPP;
295+
}
296+
297+
static int mv88e6xxx_g2_update(struct mv88e6xxx_chip *chip, int reg, u16 update)
298+
{
299+
return -EOPNOTSUPP;
300+
}
301+
302+
static int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask)
303+
{
304+
return -EOPNOTSUPP;
305+
}
306+
282307
static inline int mv88e6352_g2_irl_init_all(struct mv88e6xxx_chip *chip,
283308
int port)
284309
{

0 commit comments

Comments
 (0)