]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
phy: renesas: rcar-gen3-usb2: store drvdata pointer in channel
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Fri, 8 Aug 2025 21:52:06 +0000 (22:52 +0100)
committerVinod Koul <vkoul@kernel.org>
Wed, 20 Aug 2025 16:51:51 +0000 (22:21 +0530)
commitf75806d26318c08ddb79652cce89086e4da17257
tree5501e4f37f25330c23cd851d0be0ed0691b86022
parentab9c8aeb2d208381a7c948ea2f753cbe8a451502
phy: renesas: rcar-gen3-usb2: store drvdata pointer in channel

Store the SoC-specific driver data pointer (struct rcar_gen3_phy_drv_data)
directly in struct rcar_gen3_chan instead of copying individual flags into
separate channel members.

Obtain the drvdata with of_device_get_match_data() in probe and assign it
to channel->phy_data. Update all call sites to reference
`channel->phy_data->*` for SoC-specific behaviour (for example no_adp_ctrl
and utmi_ctrl). Remove the redundant soc_no_adp_ctrl and utmi_ctrl fields
from struct rcar_gen3_chan.

This simplifies the probe path, reduces duplication, and makes it easier
to extend the driver with additional platform-specific fields in the
future.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20250808215209.3692744-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/renesas/phy-rcar-gen3-usb2.c