start io subsystem

This commit is contained in:
2025-06-14 22:16:35 +01:00
parent 34ea87ded0
commit 49d5847980
8 changed files with 95 additions and 17 deletions

View File

@ -6,6 +6,8 @@
#include "ls7366r.h"
#include "trigger.h"
#include "leds.h"
#include "io.h"
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Wolfgang Hottgenroth");
@ -15,6 +17,12 @@ MODULE_DESCRIPTION("Driver for the MainsCnt measurement hat");
/* module loading and unloading */
static int __init my_init(void) {
printk("counter - Loading IO subsystem...\n");
if (io_init()) {
printk("counter - Error! Could not load IO subsystem\n");
return -1;
}
printk("counter - Loading the leds driver...\n");
if(platform_driver_register(&leds_driver)) {
printk("counter - Error! Could not load leds driver\n");
@ -45,6 +53,9 @@ static void __exit my_exit(void) {
printk("counter - Unloading the interrupt driver...\n");
platform_driver_unregister(&interrupt_driver);
printk("counter - Unloading IO subsystem...\n");
io_exit();
}
module_init(my_init);