include/linux/turris-omnia-mcu-interface.h
Source file repositories/reference/linux-study-clean/include/linux/turris-omnia-mcu-interface.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/turris-omnia-mcu-interface.h- Extension
.h- Size
- 11399 bytes
- Lines
- 398
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/bitops.hlinux/types.hlinux/unaligned.hasm/byteorder.h
Detected Declarations
struct i2c_clientenum omnia_commands_eenum omnia_flashing_commands_eenum omnia_sts_word_eenum omnia_ctl_byte_eenum omnia_features_eenum omnia_ext_sts_dword_eenum omnia_ext_ctl_eenum omnia_int_eenum omnia_cmd_led_mode_eenum omnia_cmd_led_state_eenum omnia_cmd_poweroff_eenum omnia_cmd_usb_ovc_prot_efunction omnia_cmd_writefunction omnia_cmd_write_u8function omnia_cmd_write_u16function omnia_cmd_write_u32function omnia_cmd_readfunction omnia_compute_reply_lengthfunction omnia_cmd_read_bitsfunction omnia_cmd_read_bitfunction omnia_cmd_read_u32function omnia_cmd_read_u16function omnia_cmd_read_u8
Annotated Snippet
#ifndef __TURRIS_OMNIA_MCU_INTERFACE_H
#define __TURRIS_OMNIA_MCU_INTERFACE_H
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/types.h>
#include <linux/unaligned.h>
#include <asm/byteorder.h>
enum omnia_commands_e {
OMNIA_CMD_GET_STATUS_WORD = 0x01, /* slave sends status word back */
OMNIA_CMD_GENERAL_CONTROL = 0x02,
OMNIA_CMD_LED_MODE = 0x03, /* default/user */
OMNIA_CMD_LED_STATE = 0x04, /* LED on/off */
OMNIA_CMD_LED_COLOR = 0x05, /* LED number + RED + GREEN + BLUE */
OMNIA_CMD_USER_VOLTAGE = 0x06,
OMNIA_CMD_SET_BRIGHTNESS = 0x07,
OMNIA_CMD_GET_BRIGHTNESS = 0x08,
OMNIA_CMD_GET_RESET = 0x09,
OMNIA_CMD_GET_FW_VERSION_APP = 0x0A, /* 20B git hash number */
OMNIA_CMD_SET_WATCHDOG_STATE = 0x0B, /* 0 - disable
* 1 - enable / ping
* after boot watchdog is started
* with 2 minutes timeout
*/
/* OMNIA_CMD_WATCHDOG_STATUS = 0x0C, not implemented anymore */
OMNIA_CMD_GET_WATCHDOG_STATE = 0x0D,
OMNIA_CMD_GET_FW_VERSION_BOOT = 0x0E, /* 20B Git hash number */
OMNIA_CMD_GET_FW_CHECKSUM = 0x0F, /* 4B length, 4B checksum */
/* available if FEATURES_SUPPORTED bit set in status word */
OMNIA_CMD_GET_FEATURES = 0x10,
/* available if EXT_CMD bit set in features */
OMNIA_CMD_GET_EXT_STATUS_DWORD = 0x11,
OMNIA_CMD_EXT_CONTROL = 0x12,
OMNIA_CMD_GET_EXT_CONTROL_STATUS = 0x13,
/* available if NEW_INT_API bit set in features */
OMNIA_CMD_GET_INT_AND_CLEAR = 0x14,
OMNIA_CMD_GET_INT_MASK = 0x15,
OMNIA_CMD_SET_INT_MASK = 0x16,
/* available if FLASHING bit set in features */
OMNIA_CMD_FLASH = 0x19,
/* available if WDT_PING bit set in features */
OMNIA_CMD_SET_WDT_TIMEOUT = 0x20,
OMNIA_CMD_GET_WDT_TIMELEFT = 0x21,
/* available if POWEROFF_WAKEUP bit set in features */
OMNIA_CMD_SET_WAKEUP = 0x22,
OMNIA_CMD_GET_UPTIME_AND_WAKEUP = 0x23,
OMNIA_CMD_POWER_OFF = 0x24,
/* available if USB_OVC_PROT_SETTING bit set in features */
OMNIA_CMD_SET_USB_OVC_PROT = 0x25,
OMNIA_CMD_GET_USB_OVC_PROT = 0x26,
/* available if TRNG bit set in features */
OMNIA_CMD_TRNG_COLLECT_ENTROPY = 0x28,
/* available if CRYPTO bit set in features */
OMNIA_CMD_CRYPTO_GET_PUBLIC_KEY = 0x29,
OMNIA_CMD_CRYPTO_SIGN_MESSAGE = 0x2A,
OMNIA_CMD_CRYPTO_COLLECT_SIGNATURE = 0x2B,
/* available if BOARD_INFO it set in features */
OMNIA_CMD_BOARD_INFO_GET = 0x2C,
OMNIA_CMD_BOARD_INFO_BURN = 0x2D,
/* available only at address 0x2b (LED-controller) */
/* available only if LED_GAMMA_CORRECTION bit set in features */
OMNIA_CMD_SET_GAMMA_CORRECTION = 0x30,
OMNIA_CMD_GET_GAMMA_CORRECTION = 0x31,
/* available only at address 0x2b (LED-controller) */
/* available only if PER_LED_CORRECTION bit set in features */
/* available only if FROM_BIT_16_INVALID bit NOT set in features */
OMNIA_CMD_SET_LED_CORRECTIONS = 0x32,
OMNIA_CMD_GET_LED_CORRECTIONS = 0x33,
};
enum omnia_flashing_commands_e {
OMNIA_FLASH_CMD_UNLOCK = 0x01,
OMNIA_FLASH_CMD_SIZE_AND_CSUM = 0x02,
OMNIA_FLASH_CMD_PROGRAM = 0x03,
OMNIA_FLASH_CMD_RESET = 0x04,
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/bitops.h`, `linux/types.h`, `linux/unaligned.h`, `asm/byteorder.h`.
- Detected declarations: `struct i2c_client`, `enum omnia_commands_e`, `enum omnia_flashing_commands_e`, `enum omnia_sts_word_e`, `enum omnia_ctl_byte_e`, `enum omnia_features_e`, `enum omnia_ext_sts_dword_e`, `enum omnia_ext_ctl_e`, `enum omnia_int_e`, `enum omnia_cmd_led_mode_e`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.