usb: dwc2: Clean up with bitfield macros
authorKongyang Liu <seashell11234455@gmail.com>
Fri, 10 Jan 2025 13:55:23 +0000 (21:55 +0800)
committerMattijs Korpershoek <mkorpershoek@kernel.org>
Mon, 2 Jun 2025 07:57:25 +0000 (09:57 +0200)
commita5699130f4ad3f08d5192a459d116cd0ffc9ee4d
tree6937b534dc0d68b149c3d55de37d2e627d718a17
parentbd6ef5097dd6c6219f12c0f2866ee4d578f190e9
usb: dwc2: Clean up with bitfield macros

Use FIELD_PREP, FIELD_GET, BIT, and GENMASK macros to standardize bit
manipulation across the DWC2 code, improving readability and
maintainability without altering functionality.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Link: https://lore.kernel.org/r/20250110-dwc2-dev-v4-4-987f4fd6f8b2@pigmoral.tech
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
drivers/usb/gadget/dwc2_udc_otg.c
drivers/usb/gadget/dwc2_udc_otg_regs.h
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
drivers/usb/host/dwc2.c
drivers/usb/host/dwc2.h