diff options
| author | Oleksij Rempel <[email protected]> | 2022-08-26 10:56:26 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-08-31 08:41:23 +0000 |
| commit | ec6ba50c65c1e30218f69055a556bdd133af6da5 (patch) | |
| tree | 2f74192020fdf40c45289c2487897877f17a2d0e /drivers/net/dsa/microchip/ksz_spi.c | |
| parent | net: dsa: microchip: KSZ9893: do not write to not supported Output Clock Cont... (diff) | |
| download | kernel-ec6ba50c65c1e30218f69055a556bdd133af6da5.tar.gz kernel-ec6ba50c65c1e30218f69055a556bdd133af6da5.zip | |
net: dsa: microchip: add support for regmap_access_tables
This is complex driver with support for different chips with different
layouts. To detect at least some bugs earlier, we should validate register
accesses by using regmap_access_table support.
Signed-off-by: Oleksij Rempel <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_spi.c')
| -rw-r--r-- | drivers/net/dsa/microchip/ksz_spi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c index 746b725b09ec..44c2d9912406 100644 --- a/drivers/net/dsa/microchip/ksz_spi.c +++ b/drivers/net/dsa/microchip/ksz_spi.c @@ -66,7 +66,10 @@ static int ksz_spi_probe(struct spi_device *spi) for (i = 0; i < ARRAY_SIZE(ksz8795_regmap_config); i++) { rc = regmap_config[i]; rc.lock_arg = &dev->regmap_mutex; + rc.wr_table = chip->wr_table; + rc.rd_table = chip->rd_table; dev->regmap[i] = devm_regmap_init_spi(spi, &rc); + if (IS_ERR(dev->regmap[i])) { ret = PTR_ERR(dev->regmap[i]); dev_err(&spi->dev, |
