]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: add DM_SPI_FLASH compatibility inline functions
authorNeil Armstrong <neil.armstrong@linaro.org>
Tue, 1 Oct 2024 16:06:11 +0000 (18:06 +0200)
committerMattijs Korpershoek <mkorpershoek@baylibre.com>
Thu, 24 Oct 2024 07:41:52 +0000 (09:41 +0200)
commit0872ac098a400632f02ae442dde65d77cc7eb1cb
tree77e014744da13e6ec7cc7eeb6f411c42a08d9d4b
parent7af813341d5df064aeee764c31ffb50ffcdf4eb6
spi: add DM_SPI_FLASH compatibility inline functions

To smoothly handle the transition from the legacy SPI FLASH
API to the driver model API, add the DM functions
as dummy inline functions.

Today, client code uses #if/#else conditionals, but it's better
to use if(IS_ENABLED()) to make sure all code builds fine
and avoid configuration hell, leaving the compiler remove
the dead code.

An example is cmd/sf, which could make use of those dummy
functions to drop the conditional compilation.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20241001-uboot-topic-dfu-sf-dt-v2-1-67f7acfa3ff5@linaro.org
[mkorpershoek: removed duplicate "the" from commit msg]
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
include/spi_flash.h