summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gpio.h3
-rw-r--r--include/lightbar.h1
-rw-r--r--include/lpc_commands.h24
3 files changed, 18 insertions, 10 deletions
diff --git a/include/gpio.h b/include/gpio.h
index b3bd4258f4..bb19c91a6f 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -51,6 +51,9 @@ struct gpio_info {
void (*irq_handler)(enum gpio_signal signal);
};
+/* Signal information from board.c. Must match order from enum gpio_signal. */
+extern const struct gpio_info gpio_list[GPIO_COUNT];
+
/* Macro for signals which don't exist */
#define GPIO_SIGNAL_NOT_IMPLEMENTED(name) {name, LM4_GPIO_A, 0, 0, NULL}
diff --git a/include/lightbar.h b/include/lightbar.h
index 0cc19e2b9b..395166191d 100644
--- a/include/lightbar.h
+++ b/include/lightbar.h
@@ -35,6 +35,7 @@ enum lightbar_command {
LIGHTBAR_CMD_SEQ,
LIGHTBAR_CMD_REG,
LIGHTBAR_CMD_RGB,
+ LIGHTBAR_CMD_GET_SEQ,
LIGHTBAR_NUM_CMDS
};
diff --git a/include/lpc_commands.h b/include/lpc_commands.h
index 354c059b1f..c7f2530df1 100644
--- a/include/lpc_commands.h
+++ b/include/lpc_commands.h
@@ -349,7 +349,6 @@ struct lpc_params_pwm_set_keyboard_backlight {
* command to say "talk to the lightbar", we put the "and tell it to do X"
* part into a subcommand. We'll make separate structs for subcommands with
* different input args, so that we know how much to expect. */
-
#define EC_LPC_COMMAND_LIGHTBAR_CMD 0x28
struct lpc_params_lightbar_cmd {
union {
@@ -357,7 +356,7 @@ struct lpc_params_lightbar_cmd {
uint8_t cmd;
struct {
uint8_t cmd;
- } dump, off, on, init;
+ } dump, off, on, init, get_seq;
struct num {
uint8_t cmd;
uint8_t num;
@@ -373,14 +372,19 @@ struct lpc_params_lightbar_cmd {
} rgb;
} in;
union {
- uint8_t dump[69];
- uint8_t off[0];
- uint8_t on[0];
- uint8_t init[0];
- uint8_t brightness[0];
- uint8_t seq[0];
- uint8_t reg[0];
- uint8_t rgb[0];
+ struct dump {
+ struct {
+ uint8_t reg;
+ uint8_t ic0;
+ uint8_t ic1;
+ } vals[23];
+ } dump;
+ struct get_seq {
+ uint8_t num;
+ } get_seq;
+ struct {
+ /* no return params */
+ } off, on, init, brightness, seq, reg, rgb;
} out;
};
} __attribute__ ((packed));