]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: realtek: common rtl83xx module
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Fri, 9 Feb 2024 05:03:41 +0000 (02:03 -0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Feb 2024 10:42:17 +0000 (10:42 +0000)
commit8be040ecd94c1a9a137927d18534edfae0a9b68a
treeb9cee228f21d07324bbb6513a3a68c8153999fc3
parent4667a1db2f550d23e01ba655fce331196ead6e92
net: dsa: realtek: common rtl83xx module

Some code can be shared between both interface modules (MDIO and SMI)
and among variants. These interface functions migrated to a common
module:

- rtl83xx_lock
- rtl83xx_unlock
- rtl83xx_probe
- rtl83xx_register_switch
- rtl83xx_unregister_switch
- rtl83xx_shutdown
- rtl83xx_remove

The reset during probe was moved to the end of the common probe. This way,
we avoid a reset if anything else fails.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/realtek/Makefile
drivers/net/dsa/realtek/realtek-mdio.c
drivers/net/dsa/realtek/realtek-smi.c
drivers/net/dsa/realtek/realtek.h
drivers/net/dsa/realtek/rtl8365mb.c
drivers/net/dsa/realtek/rtl8366rb.c
drivers/net/dsa/realtek/rtl83xx.c [new file with mode: 0644]
drivers/net/dsa/realtek/rtl83xx.h [new file with mode: 0644]