Syntax of files.* configuration
Vincent DEFERT <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
Hi! I want to write an I2C driver for the Allwinner Meson target, so I have explored the source tree to try and understand how existing drivers worked. I get how the C code works, but I struggle to understand the various build configuration files. If I take the UART driver as an example, I've found: - In arch/evbarm/conf/GENERIC64, the following line: mesonuart* at fdt? pass 4 # Amlogic Meson UART - In arch/arm/amlogic/files.meson, the following snippet: device mesonuart attach mesonuart at fdt with meson_uart file arch/arm/amlogic/meson_uart.c meson_uart I understand that: - the 'mesonuart' in GENERIC64 is the same as in files.meson - the * after mesonuart reflects the fact that there may be several instances of the driver - 'device' declares the new driver, and optionally the interfaces it implements, specified after a colon (i2cbus and i2cexec in my case) - 'attach' means the driver is attached to the matching devices from the device tree based on their 'compatible' identifier - 'file' declares the C module implementing the driver when the optional boolean expression after the file name is true I don't understand: - what the ? after 'fdt' and 'pass 4' mean - what the optional 'with meson_uart' means - where and how the 'meson_uart' boolean is set - whether there is a relationship between the names in those configuration files and the first argument of the CFATTACH_DECL_NEW macro Is there any documentation explaining this syntax? Or alternatively, could you please clarify these points? Thank you in advance! Vincent