#include #include #include #include #include #include #include /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ struct _avm_hw_config *avm_current_hw_config = NULL; EXPORT_SYMBOL(avm_current_hw_config); /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ struct _avm_hw_config *avm_get_hw_config_table(void) { //set externally to table generated by device tree if(avm_current_hw_config) { return avm_current_hw_config; } pr_err("Error: GPIO Config Table not set from Device Tree\n"); prom_printf("[%s] error: No hardware configuration found\n", __FUNCTION__); BUG_ON(1); return NULL; } EXPORT_SYMBOL(avm_get_hw_config_table); /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ int init_gpio_config(void) { struct _avm_hw_config *config; config = avm_get_hw_config_table(); if(!config) return -1; // error: no hardware config found! // Hier gibt es nichts zu initialisieren. Das passiert in // avm_gpio.c / avm_gpio_init (device_initcall) return 0; }