diff options
author | Marek BehĂșn <kabel@kernel.org> | 2024-11-11 11:03:47 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-12-12 18:37:36 +0000 |
commit | d665d7f2800fff5da9311e4c8c236966ba57d440 (patch) | |
tree | 588a3f52aebf8f7416258e8914f310404a38b2df | |
parent | b4c3960da27dd91412e04bc263311c16e6c46fb0 (diff) |
turris-omnia-mcu-interface.h: Add LED commands related definitions to global header
Add definitions for contents of the OMNIA_CMD_LED_MODE and
OMNIA_CMD_LED_STATE commands to the global turris-omnia-mcu-interface.h
header.
Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Link: https://lore.kernel.org/r/20241111100355.6978-4-kabel@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r-- | include/linux/turris-omnia-mcu-interface.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/turris-omnia-mcu-interface.h b/include/linux/turris-omnia-mcu-interface.h index 7f24cc682780..06c94e032c6f 100644 --- a/include/linux/turris-omnia-mcu-interface.h +++ b/include/linux/turris-omnia-mcu-interface.h @@ -239,6 +239,18 @@ enum omnia_int_e { OMNIA_INT_LAN5_LED1 = BIT(31), }; +enum omnia_cmd_led_mode_e { + OMNIA_CMD_LED_MODE_LED_MASK = GENMASK(3, 0), +#define OMNIA_CMD_LED_MODE_LED(_l) FIELD_PREP(OMNIA_CMD_LED_MODE_LED_MASK, _l) + OMNIA_CMD_LED_MODE_USER = BIT(4), +}; + +enum omnia_cmd_led_state_e { + OMNIA_CMD_LED_STATE_LED_MASK = GENMASK(3, 0), +#define OMNIA_CMD_LED_STATE_LED(_l) FIELD_PREP(OMNIA_CMD_LED_STATE_LED_MASK, _l) + OMNIA_CMD_LED_STATE_ON = BIT(4), +}; + enum omnia_cmd_poweroff_e { OMNIA_CMD_POWER_OFF_POWERON_BUTTON = BIT(0), OMNIA_CMD_POWER_OFF_MAGIC = 0xdead, |