Commit 6f1b986a authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Paolo Abeni

net: dsa: microchip: add ksz_rmw8() function

Add ksz_rmw8(), it will be used in the next patch.
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Acked-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 1d0a1a6d
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment