drivers: fpga: replace runtime checks with buildtime asserts in iCE40

Replace NULL checks for the set and clear registers with BUILD_ASSERTs
in the iCE40 device instantiation.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
This commit is contained in:
Benedikt Schmidt 2024-11-19 08:44:35 +01:00 committed by Henrik Brix Andersen
commit 53ae195f0d
2 changed files with 16 additions and 14 deletions

View file

@ -16,6 +16,10 @@ test_spi_fpga_ice40_gpio: ice40@0 {
load-mode-bitbang;
cdone-gpios = <&test_gpio 0 0>;
creset-gpios = <&test_gpio 0 0>;
clk-gpios = <&test_gpio 0 0>;
pico-gpios = <&test_gpio 0 0>;
gpios-set-reg = <0>;
gpios-clear-reg = <0>;
config-delay-us = <3900>;
};
@ -28,9 +32,5 @@ test_spi_fpga_ice40_spi: ice40@1 {
cdone-gpios = <&test_gpio 0 0>;
creset-gpios = <&test_gpio 0 0>;
clk-gpios = <&test_gpio 0 0>;
pico-gpios = <&test_gpio 0 0>;
gpios-set-reg = <0>;
gpios-clear-reg = <0>;
config-delay-us = <3900>;
};