Skip to content

Commit

Permalink
net: dsa: microchip: add ksz_rmw8() function
Browse files Browse the repository at this point in the history
Add ksz_rmw8(), it will be used in the next patch.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Oleksij Rempel authored and Paolo Abeni committed Dec 7, 2022
1 parent 1d0a1a6 commit 6f1b986
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/dsa/microchip/ksz_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ static inline int ksz_write64(struct ksz_device *dev, u32 reg, u64 value)
return regmap_bulk_write(dev->regmap[2], reg, val, 2);
}

static inline int ksz_rmw8(struct ksz_device *dev, int offset, u8 mask, u8 val)
{
return regmap_update_bits(dev->regmap[0], offset, mask, val);
}

static inline int ksz_pread8(struct ksz_device *dev, int port, int offset,
u8 *data)
{
Expand Down

0 comments on commit 6f1b986

Please sign in to comment.