diff options
author | Joel Porquet <porquet_joel@projectara.com> | 2016-06-24 14:41:36 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-06-24 15:46:52 -0700 |
commit | c0e65d026c297c53eeb5412c31a5410317225945 (patch) | |
tree | 2611d50078d937204f5e3e55041f726b96b10324 /drivers/staging/greybus/greybus_protocols.h | |
parent | 6f7f2ae5df786bf9ced3247fda51a0a7aeb9cd0c (diff) | |
download | op-kernel-dev-c0e65d026c297c53eeb5412c31a5410317225945.zip op-kernel-dev-c0e65d026c297c53eeb5412c31a5410317225945.tar.gz |
greybus: add support for the log protocol
Add support for the new Log class/protocol. This protocol allows modules
to send their internal logging messages to the AP in order to make
module debugging easier.
The protocol is, for now, composed a single module-initiated request.
This request contains a message and associated length. The message is
integrated in the kernel log with dev_dbg(). In order to be displayed
with 'dmesg', the following command needs to be entered first:
$ echo "file log.c +p" > /sys/kernel/debug/dynamic_debug/control
The major portion of this file was initially written by Greg KH.
Signed-off-by: Joel Porquet <porquet_joel@projectara.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 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index 63dd204..203bc46 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -2136,5 +2136,19 @@ struct gb_audio_send_data_request { __u8 data[0]; } __packed; + +/* Log */ + +/* operations */ +#define GB_LOG_TYPE_SEND_LOG 0x02 + +/* length */ +#define GB_LOG_MAX_LEN 1024 + +struct gb_log_send_log_request { + __le16 len; + __u8 msg[0]; +} __packed; + #endif /* __GREYBUS_PROTOCOLS_H */ |