I wrote a couple of kernel drivers for GPIO devices which code uses a conditional inclusion based on an FDT flag.
I use it for a device definition using either FDT overlays or a device.hints file.
Just now I place a string "#define FDT" right to the top of a main C-file (or comment it).
Is it a correct way to set that flag?
Maybe there is a way to inherit somehow the FDT value actual for my system, at compile time?
Thanks
I use it for a device definition using either FDT overlays or a device.hints file.
C:
#ifdef FDT
if ((err = rcrecv_fdt_setup_pin(sc)) == 0)
rcrecv_fdt_get_params(sc);
#else
err = ENOENT;
#endif
if (err != 0) {
Just now I place a string "#define FDT" right to the top of a main C-file (or comment it).
Is it a correct way to set that flag?
Maybe there is a way to inherit somehow the FDT value actual for my system, at compile time?
Thanks