Message type for INPUT_SETLEDS
Change-Id: I84ee6ee43d771409526468ce45f1ddc27e9ca986
This commit is contained in:
parent
4ed3f29e7f
commit
1a943bea52
5 changed files with 12 additions and 6 deletions
|
@ -378,7 +378,7 @@ static void set_leds(void)
|
|||
memset(&m, 0, sizeof(m));
|
||||
|
||||
m.m_type = INPUT_SETLEDS;
|
||||
m.INPUT_LED_MASK = locks[ccurrent] & ~ALT_LOCK;
|
||||
m.m_input_linputdriver_setleds.led_mask = locks[ccurrent] & ~ALT_LOCK;
|
||||
|
||||
if ((r = asynsend3(input_endpt, &m, AMF_NOREPLY)) != OK)
|
||||
printf("TTY: asynsend to INPUT %u failed (%d)\n", input_endpt, r);
|
||||
|
|
|
@ -1084,9 +1084,7 @@
|
|||
#define INPUT_RS_BASE 0x1580 /* from input driver to input server */
|
||||
|
||||
#define INPUT_CONF (INPUT_RQ_BASE + 0) /* configure driver */
|
||||
|
||||
#define INPUT_SETLEDS (INPUT_RQ_BASE + 1) /* set keyboard LEDs */
|
||||
# define INPUT_LED_MASK m7_i1 /* status mask of LEDs */
|
||||
|
||||
#define INPUT_EVENT (INPUT_RS_BASE + 0) /* send input event */
|
||||
|
||||
|
|
|
@ -640,6 +640,13 @@ typedef struct {
|
|||
} mess_input_linputdriver_input_conf;
|
||||
_ASSERT_MSG_SIZE(mess_input_linputdriver_input_conf);
|
||||
|
||||
typedef struct {
|
||||
uint32_t led_mask;
|
||||
|
||||
uint8_t padding[52];
|
||||
} mess_input_linputdriver_setleds;
|
||||
_ASSERT_MSG_SIZE(mess_input_linputdriver_setleds);
|
||||
|
||||
typedef struct {
|
||||
int id;
|
||||
int page;
|
||||
|
@ -1271,6 +1278,7 @@ typedef struct {
|
|||
mess_i2c_li2cdriver_busc_i2c_reserve m_i2c_li2cdriver_busc_i2c_reserve;
|
||||
|
||||
mess_input_linputdriver_input_conf m_input_linputdriver_input_conf;
|
||||
mess_input_linputdriver_setleds m_input_linputdriver_setleds;
|
||||
|
||||
mess_lc_pm_exec m_lc_pm_exec;
|
||||
mess_lc_pm_exit m_lc_pm_exit;
|
||||
|
|
|
@ -128,7 +128,7 @@ do_setleds(struct inputdriver *idp, message *m_ptr)
|
|||
return;
|
||||
}
|
||||
|
||||
mask = m_ptr->INPUT_LED_MASK;
|
||||
mask = m_ptr->m_input_linputdriver_setleds.led_mask;
|
||||
|
||||
if (idp->idr_leds)
|
||||
idp->idr_leds(mask);
|
||||
|
|
|
@ -212,7 +212,7 @@ input_set_leds(devminor_t minor, unsigned int mask)
|
|||
memset(&m, 0, sizeof(m));
|
||||
|
||||
m.m_type = INPUT_SETLEDS;
|
||||
m.INPUT_LED_MASK = mask;
|
||||
m.m_input_linputdriver_setleds.led_mask = mask;
|
||||
|
||||
/*
|
||||
* Send the request to all matching keyboard devices. As side effect,
|
||||
|
@ -621,7 +621,7 @@ input_other(message *m, int ipc_status)
|
|||
|
||||
case INPUT_SETLEDS:
|
||||
if (m->m_source == TTY_PROC_NR) {
|
||||
input_set_leds(KBDMUX_MINOR, m->INPUT_LED_MASK);
|
||||
input_set_leds(KBDMUX_MINOR, m->m_input_linputdriver_setleds.led_mask);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue