[PATCH v6 2/9] phy: phy-can-transceiver: Introduce can_transceiver_priv
Marc Kleine-Budde
mkl at pengutronix.de
Fri Sep 19 12:08:12 PDT 2025
On 09.09.2025 13:40:12, Peng Fan wrote:
> To prepare for dual-channel phy support, introduce can_transceiver_priv as
> a higher level encapsulation for phy and mux_state.
>
> No functional changes.
>
> Reviewed-by: Frank Li <Frank.Li at nxp.com>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
> drivers/phy/phy-can-transceiver.c | 41 ++++++++++++++++++++++++++-------------
> 1 file changed, 27 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c
> index f59caff4b3d4c267feca4220bf1547b6fad08f95..6415c6af0e8414a6cc8d15958a17ee749a3f28e9 100644
> --- a/drivers/phy/phy-can-transceiver.c
> +++ b/drivers/phy/phy-can-transceiver.c
> @@ -23,6 +23,11 @@ struct can_transceiver_phy {
> struct phy *generic_phy;
> struct gpio_desc *standby_gpio;
> struct gpio_desc *enable_gpio;
> + struct can_transceiver_priv *priv;
Can you convert this into a flexible-array? This reduces the overhead of
a 2nd allocation.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250919/79f154e7/attachment.sig>
More information about the linux-arm-kernel
mailing list