Re: [PATCH net-next v3 1/2] net/ethernet/realtek: Add Realtek automotive PCIe driver code
From: Andrew Lunn
Date: Mon Aug 21 2023 - 13:21:53 EST
> But I2C, SPI, MDIO are connected to the SoC through this chip's
> external pins, not on the PCIe bus.
Thanks, that was the information i was trying to get at.
> Actually, there is the other function in the PCIe GMAC(Multiple
> function) to manage the registers of Switch Core. Should they be
> integrated into the MFD driver?
Can you cleanly attach another PCI driver to those functions?
You need to use an MFD when there is a single top level addressable
block of hardware which has multiple functions. Thank of an I2C
device, which has a single address on the bus, but multiple functions.
Access to that one address needs to be shared via multiple
drivers. The MFD framework provides the glue to share access to the
hardware.
However, PCI identification and addressing is more flexible. So long
as they are separate PCI functions, you should be able to load two
drivers and not have problems. Then you don't need an MFD.
Andrew