Commit 9845217d authored by Mark Brown's avatar Mark Brown Committed by David S. Miller

net: dsa: ar9331: Use explict flags for regmap single read/write

The at9331 is only able to read or write a single register at once.  The
driver has a custom regmap bus and chooses to tell the regmap core about
this by reporting the maximum transfer sizes rather than the explicit
flags that exist at the regmap level.  Since there are a number of
problems with the raw transfer limits and the regmap level flags are
better integrated anyway convert the driver to use the flags.

No functional change.
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5e1627cb
...@@ -1002,6 +1002,8 @@ static const struct regmap_config ar9331_mdio_regmap_config = { ...@@ -1002,6 +1002,8 @@ static const struct regmap_config ar9331_mdio_regmap_config = {
.val_bits = 32, .val_bits = 32,
.reg_stride = 4, .reg_stride = 4,
.max_register = AR9331_SW_REG_PAGE, .max_register = AR9331_SW_REG_PAGE,
.use_single_read = true,
.use_single_write = true,
.ranges = ar9331_regmap_range, .ranges = ar9331_regmap_range,
.num_ranges = ARRAY_SIZE(ar9331_regmap_range), .num_ranges = ARRAY_SIZE(ar9331_regmap_range),
...@@ -1018,8 +1020,6 @@ static struct regmap_bus ar9331_sw_bus = { ...@@ -1018,8 +1020,6 @@ static struct regmap_bus ar9331_sw_bus = {
.val_format_endian_default = REGMAP_ENDIAN_NATIVE, .val_format_endian_default = REGMAP_ENDIAN_NATIVE,
.read = ar9331_mdio_read, .read = ar9331_mdio_read,
.write = ar9331_sw_bus_write, .write = ar9331_sw_bus_write,
.max_raw_read = 4,
.max_raw_write = 4,
}; };
static int ar9331_sw_probe(struct mdio_device *mdiodev) static int ar9331_sw_probe(struct mdio_device *mdiodev)
......
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