Re: [PATCH v1 1/9] mfd: Add core driver for Nuvoton NCT6694

Ming Yu
2024-11-01T05:35:20Z

> > Okay, so each child device may allocate a buffer like this during probe():
> > priv->xmit_buf = devm_kcalloc(dev, MAX_PACKET_SZ, sizeof(unsigned char),
> > GFP_KERNEL), right?
>
> basically yes, probably devm_kzalloc() or embed it into the priv struct
> directly with ____cacheline_aligned:
>
> | https://elixir.bootlin.com/linux/v6.11.5/source/drivers/net/can/spi/mcp251xfd/mcp251xfd.h#L498
>
> The size of the driver's RX and TX buffers depend on what they want to
> send and expect to receive. The next step would be to create structs the
> describe the RX and TX buffers for each driver. If you have a common
> header between each driver, create that first.
>
> regards,
> Marc
>

Understood, I'll make these modifications in the next patch.

Thanks,
Ming