diff mbox series

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

Message ID 20230712-net-at9331-regmap-v1-1-ebe66e81ed83@kernel.org (mailing list archive)
State Accepted
Commit 9845217d60d01d151b45842ef2017a65e8f39f5a
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: ar9331: Use explict flags for regmap single read/write | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1341 this patch: 1341
netdev/cc_maintainers warning 2 maintainers not CCed: yangyingliang@huawei.com hi@atinb.me
netdev/build_clang success Errors and warnings before: 1364 this patch: 1364
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1364 this patch: 1364
netdev/checkpatch warning WARNING: 'explict' may be misspelled - perhaps 'explicit'?
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Mark Brown July 12, 2023, 11:16 a.m. UTC
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: Mark Brown <broonie@kernel.org>
---
 drivers/net/dsa/qca/ar9331.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


---
base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
change-id: 20230708-net-at9331-regmap-02ecf2c1aa59

Best regards,

Comments

Simon Horman July 13, 2023, 10:33 a.m. UTC | #1
On Wed, Jul 12, 2023 at 12:16:16PM +0100, Mark Brown wrote:
> 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: Mark Brown <broonie@kernel.org>

Reviewed-by: Simon Horman <simon.horman@corigine.com>

nit: there is a typo in the subject
     explict -> explicit
patchwork-bot+netdevbpf@kernel.org July 14, 2023, 7:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 12 Jul 2023 12:16:16 +0100 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - net: dsa: ar9331: Use explict flags for regmap single read/write
    https://git.kernel.org/netdev/net/c/9845217d60d0

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c
index b2bf78ac485e..3b0937031499 100644
--- a/drivers/net/dsa/qca/ar9331.c
+++ b/drivers/net/dsa/qca/ar9331.c
@@ -1002,6 +1002,8 @@  static const struct regmap_config ar9331_mdio_regmap_config = {
 	.val_bits = 32,
 	.reg_stride = 4,
 	.max_register = AR9331_SW_REG_PAGE,
+	.use_single_read = true,
+	.use_single_write = true,
 
 	.ranges = ar9331_regmap_range,
 	.num_ranges = ARRAY_SIZE(ar9331_regmap_range),
@@ -1018,8 +1020,6 @@  static struct regmap_bus ar9331_sw_bus = {
 	.val_format_endian_default = REGMAP_ENDIAN_NATIVE,
 	.read = ar9331_mdio_read,
 	.write = ar9331_sw_bus_write,
-	.max_raw_read = 4,
-	.max_raw_write = 4,
 };
 
 static int ar9331_sw_probe(struct mdio_device *mdiodev)