#ifndef __HUI_INTERNAL_H__ #define __HUI_INTERNAL_H__ #include #define AVM_LED_INTERNAL #include #include #include "leds.h" int hui_sysfs_init(void); void hui_sysfs_exit(void); void events_init(void); void events_update(void); void events_exit(void); int leds_init(void); void leds_update(void); void leds_exit(void); int button_init(void); void button_exit(void); int generic_gpio_init(void); void generic_gpio_exit(void); #if IS_ENABLED(CONFIG_SPI) int stm32_init(void); void stm32_exit(void); #else static inline int stm32_init(void) { return 0; } static inline void stm32_exit(void) { } #endif int device_init(void); extern struct mutex hui_update_mutex; extern void hui_disable_updates(void); extern void hui_enable_updates(void); extern void hui_schedule_update(void); extern int avm_hui_send_button_event(unsigned int button_id, unsigned int pressed_time); extern void *event_source; struct hui { struct colored_kobject obj; // 0-100% u8 brightness; }; extern struct hui *hui_kobj; /* * On some (older) platforms the firmware is flashed from within the kernel. * * However the kernel is barley functional at this point, so we need to side * step most of the code. * * One good thing: The flash code only wants to turn the update led on/off. */ #if IS_ENABLED(CONFIG_AVM_FLASH_UPDATE) extern int hui_bare_handle_event(enum _led_event event, int val); #else static inline int hui_bare_handle_event(enum _led_event event, int val) { return 0; } #endif #endif