In the MCUX SDK (https://github.com/NXPmicro/mcux-sdk) there are many variants of a driver for a particular peripheral. For example, consider a SPI peripheral for which there are many drivers:
mcux-sdk/drivers/spi/fsl_spi.c
mcux-sdk/drivers/flexcomm/fsl_spi.c
mcux-sdk/drivers/lpc_minispi/fsl_spi.c
mcux-sdk/drivers/ecspi/fsl_ecspi.c
mcux-sdk/drivers/lpspi/fsl_lpspi.c
etc. In addition, in many cases there are derivatives of these drivers for DMA use.
I understand the implementations are for different silicon implementations of the peripherals. For example, a SPI peripheral in i.MX RT1176 can be a different architecture/silicon design from the SPI peripheral in an LPC55S69, and therefore require a different driver implementation.
What is the correct way to identify the "right" driver for a given device?
The best I have found so far is to reference the appropriate mcux-sdk/devices/<device>/all_lib_device_<device>.cmake and look at the included drivers/*
Is this the recommended and most official way, or is there something else?