Drivers that based on two underlying hardware devices


Jeff Brasen
 

Hi,

Trying to determine any recommendations for best practices for drivers that need to connect to multiple pieces of hardware and the interaction with the connection sequence. For example if a driver needs to talk to a given hardware component as well as an i2c device. With my understanding of the UEFI driver model seems to work there doesn't seem to be good way to support this without either needing to have a connect all or custom connection logic. If that is what is needed it isn't unworkable but thought I would ask if anyone has alternative ideas for this sort of devices and making a simplified connection approach for devices.

Thanks,
Jeff


Michael Brown
 

On 30/04/2021 21:56, Jeff Brasen wrote:
Trying to determine any recommendations for best practices for drivers that need to connect to multiple pieces of hardware and the interaction with the connection sequence. For example if a driver needs to talk to a given hardware component as well as an i2c device. With my understanding of the UEFI driver model seems to work there doesn't seem to be good way to support this without either needing to have a connect all or custom connection logic. If that is what is needed it isn't unworkable but thought I would ask if anyone has alternative ideas for this sort of devices and making a simplified connection approach for devices.
There should be a working example of this in almost any UEFI USB network driver, since most USB NICs require access to two USB-level interfaces but the EFI_USB_IO_PROTOCOL model exposes a single device handle per interface.

Hope that helps,

Michael