mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net: dsa: microchip: add ksz_rmw8() function
[ Upstream commit 6f1b986a43 ]
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>
Stable-dep-of: bb9869043438 ("net: dsa: microchip: Fix LAN937X set_ageing_time function")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f7954e8575
commit
9d00ab0e0d
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user