OSDN Git Service

slimbus: Add messaging APIs to slimbus framework
authorSagar Dharia <sdharia@codeaurora.org>
Mon, 11 Dec 2017 23:43:00 +0000 (23:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2017 10:01:02 +0000 (11:01 +0100)
commitafbdcc7c384b0d446da08b1e0901dc176b41b9e0
treeb3312025c6afd18c59c89de96075e470db754e70
parent7588a511bdb41ee028c009c0d188738f50dbaa93
slimbus: Add messaging APIs to slimbus framework

SLIMbus devices use value-element, and information elements to
control device parameters (e.g. value element is used to represent
gain for codec, information element is used to represent interrupt
status for codec when codec interrupt fires).
Messaging APIs are used to set/get these value and information
elements. SLIMbus specification uses 8-bit "transaction IDs" for
messages where a read-value is anticipated. Framework uses a table
of pointers to store those TIDs and responds back to the caller in
O(1).
Caller can do synchronous and asynchronous reads/writes.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviwed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/slimbus/Makefile
drivers/slimbus/messaging.c [new file with mode: 0644]
drivers/slimbus/slimbus.h
include/linux/slimbus.h