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
+2 -3
View File
@@ -23,11 +23,10 @@ struct Configuration {
/**
* @brief Main entry point for Tactility.
* @param platformModule Platform module to start (non-null).
* @param deviceModule Device module to start (non-null).
* @param dtsModules List of modules from devicetree, null-terminated, non-null parameter
* @param dtsDevices Array that is terminated with DTS_DEVICE_TERMINATOR
*/
void run(const Configuration& config, Module* platformModule, Module* deviceModule, struct DtsDevice dtsDevices[]);
void run(const Configuration& config, Module* dtsModules[], DtsDevice dtsDevices[]);
/**
* While technically nullable, this instance is always set if tt_init() succeeds.
+4 -8
View File
@@ -323,23 +323,19 @@ void registerApps() {
registerInstalledAppsFromSdCards();
}
void run(const Configuration& config, Module* platformModule, Module* deviceModule, DtsDevice dtsDevices[]) {
void run(const Configuration& config, Module* dtsModules[], DtsDevice dtsDevices[]) {
LOGGER.info("Tactility v{} on {} ({})", TT_VERSION, CONFIG_TT_DEVICE_NAME, CONFIG_TT_DEVICE_ID);
assert(config.hardware);
LOGGER.info(R"(Calling kernel_init with modules: "{}" and "{}")", platformModule->name, deviceModule->name);
if (kernel_init(platformModule, deviceModule, dtsDevices) != ERROR_NONE) {
LOGGER.info("Initializing kernel");
if (kernel_init(dtsModules, dtsDevices) != ERROR_NONE) {
LOGGER.error("Failed to initialize kernel");
return;
}
// hal-device-module
check(module_construct(&hal_device_module) == ERROR_NONE);
check(module_add(&hal_device_module) == ERROR_NONE);
check(module_start(&hal_device_module) == ERROR_NONE);
const hal::Configuration& hardware = *config.hardware;
check(module_construct_add_start(&hal_device_module) == ERROR_NONE);
// Assign early so starting services can use it
config_instance = &config;