]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
r8152: add helper functions for PHY OCP registers
authorChih Kai Hsu <hsu.chih.kai@realtek.com>
Thu, 26 Mar 2026 07:39:25 +0000 (15:39 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 31 Mar 2026 08:28:26 +0000 (10:28 +0200)
commit7db154aa58e18bb663cc317f0b62631f8b3d2b87
tree4eb17f9a01c015b955a34a0e2d663fda1bff9cf0
parentd16133f177fea620d6b413990683b6a8b2641be5
r8152: add helper functions for PHY OCP registers

Add the following bitwise operation functions for PHY OCP registers to
simplify the code.

- ocp_reg_w0w1()
- ocp_reg_clr_bits()
- ocp_reg_set_bits()
- sram_write_w0w1()
- sram_clr_bits()
- sram_set_bits()
- r8152_mdio_clr_bit()
- r8152_mdio_set_bit()
- r8152_mdio_test_and_clr_bit()

In addition, remove variable set but not used from r8153_init(),
r8153b_init() and r8153c_init().

Signed-off-by: Chih Kai Hsu <hsu.chih.kai@realtek.com>
Reviewed-by: Hayes Wang <hayeswang@realtek.com>
Link: https://patch.msgid.link/20260326073925.32976-456-nic_swsd@realtek.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/usb/r8152.c