turris-omnia-mcu-interface.h: Move macro definitions outside of enums

Move the definitions of enumerator related macros outside of the
enumerator definitions.

Suggested-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/linux-leds/20241212183357.GK7139@google.com/
Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20241215211323.23364-1-kabel@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Marek Behún 2024-12-15 22:13:23 +01:00 committed by Lee Jones
parent 3d69760479
commit 1c896113f0

View File

@ -241,16 +241,18 @@ enum omnia_int_e {
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),
};
#define OMNIA_CMD_LED_MODE_LED(_l) FIELD_PREP(OMNIA_CMD_LED_MODE_LED_MASK, _l)
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),
};
#define OMNIA_CMD_LED_STATE_LED(_l) FIELD_PREP(OMNIA_CMD_LED_STATE_LED_MASK, _l)
enum omnia_cmd_poweroff_e {
OMNIA_CMD_POWER_OFF_POWERON_BUTTON = BIT(0),
OMNIA_CMD_POWER_OFF_MAGIC = 0xdead,