Tab5 power expander driver and devicetree parsing improvements (#507)

* **New Features**
  * PI4IOE5V6408 I2C I/O expander driver with public GPIO APIs
  * CLI tool to list devicetree dependencies

* **Device Tree Updates**
  * M5Stack Tab5 configured with two I2C IO expanders; PI4IOE5V6408 binding added

* **Build / Tooling**
  * Devicetree code generation integrated into build; generated artifacts and dynamic dependency resolution exposed

* **Refactor**
  * Kernel/run APIs updated to accept a null‑terminated devicetree modules array; many module symbols renamed

* **Documentation**
  * Added README and Apache‑2.0 license for new driver module
This commit is contained in:
Ken Van Hoeylandt
2026-02-17 22:59:30 +01:00
committed by GitHub
parent f0f764baff
commit d2048e01b6
82 changed files with 749 additions and 253 deletions
@@ -116,7 +116,7 @@ const static GpioControllerApi esp32_gpio_api = {
.get_native_pin_number = get_native_pin_number
};
extern struct Module platform_module;
extern struct Module platform_esp32_module;
Driver esp32_gpio_driver = {
.name = "esp32_gpio",
@@ -125,7 +125,7 @@ Driver esp32_gpio_driver = {
.stop_device = stop,
.api = (void*)&esp32_gpio_api,
.device_type = &GPIO_CONTROLLER_TYPE,
.owner = &platform_module,
.owner = &platform_esp32_module,
.internal = nullptr
};
@@ -245,7 +245,7 @@ static constexpr I2cControllerApi ESP32_I2C_API = {
.write_register = write_register
};
extern Module platform_module;
extern Module platform_esp32_module;
Driver esp32_i2c_driver = {
.name = "esp32_i2c",
@@ -254,7 +254,7 @@ Driver esp32_i2c_driver = {
.stop_device = stop,
.api = &ESP32_I2C_API,
.device_type = &I2C_CONTROLLER_TYPE,
.owner = &platform_module,
.owner = &platform_esp32_module,
.internal = nullptr
};
@@ -287,7 +287,7 @@ const static I2sControllerApi esp32_i2s_api = {
.reset = reset
};
extern struct Module platform_module;
extern struct Module platform_esp32_module;
Driver esp32_i2s_driver = {
.name = "esp32_i2s",
@@ -296,7 +296,7 @@ Driver esp32_i2s_driver = {
.stop_device = stop,
.api = (void*)&esp32_i2s_api,
.device_type = &I2S_CONTROLLER_TYPE,
.owner = &platform_module,
.owner = &platform_esp32_module,
.internal = nullptr
};
@@ -142,7 +142,7 @@ const static struct SpiControllerApi esp32_spi_api = {
.unlock = unlock
};
extern struct Module platform_module;
extern struct Module platform_esp32_module;
Driver esp32_spi_driver = {
.name = "esp32_spi",
@@ -151,7 +151,7 @@ Driver esp32_spi_driver = {
.stop_device = stop,
.api = (void*)&esp32_spi_api,
.device_type = &SPI_CONTROLLER_TYPE,
.owner = &platform_module,
.owner = &platform_esp32_module,
.internal = nullptr
};
@@ -402,7 +402,7 @@ const static UartControllerApi esp32_uart_api = {
.flush_input = flush_input
};
extern struct Module platform_module;
extern struct Module platform_esp32_module;
Driver esp32_uart_driver = {
.name = "esp32_uart",
@@ -411,7 +411,7 @@ Driver esp32_uart_driver = {
.stop_device = stop,
.api = (void*)&esp32_uart_api,
.device_type = &UART_CONTROLLER_TYPE,
.owner = &platform_module,
.owner = &platform_esp32_module,
.internal = nullptr
};
+1 -2
View File
@@ -32,8 +32,7 @@ static error_t stop() {
return ERROR_NONE;
}
// The name must be exactly "platform_module"
struct Module platform_module = {
struct Module platform_esp32_module = {
.name = "platform-esp32",
.start = start,
.stop = stop,