diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2016-01-21 01:42:17 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-20 18:03:00 -0800 |
commit | ebe99d61815fea0ecece5ddb530b28339f8d5ed3 (patch) | |
tree | 2025fee89d00c715baa42dd42fa3f6f51049dc8d /drivers/staging/greybus/greybus_protocols.h | |
parent | 4b874134284b1dbb340f063fe0cf5141ffd416b1 (diff) |
greybus: svc: add key event handling
Add a new input device associated with the SVC to handle key events.
This new events are transfer over a new greybus svc operation which is
unidirectional.
It was selected the KEY_A for representing the KEY_ARA_BUTTON key code.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r-- | drivers/staging/greybus/greybus_protocols.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index 84fb6ab6deca..2a48d95ea1b8 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -781,6 +781,7 @@ struct gb_spi_transfer_response { #define GB_SVC_TYPE_ROUTE_DESTROY 0x0c #define GB_SVC_TYPE_INTF_SET_PWRM 0x10 #define GB_SVC_TYPE_INTF_EJECT 0x11 +#define GB_SVC_TYPE_KEY_EVENT 0x12 /* * SVC version request/response has the same payload as @@ -930,6 +931,15 @@ struct gb_svc_intf_set_pwrm_response { __le16 result_code; } __packed; +struct gb_svc_key_event_request { + __le16 key_code; +#define GB_KEYCODE_ARA 0x00 + + __u8 key_event; +#define GB_SVC_KEY_RELEASED 0x00 +#define GB_SVC_KEY_PRESSED 0x01 +} __packed; + /* RAW */ /* Version of the Greybus raw protocol we support */ |