summaryrefslogtreecommitdiff
path: root/include/linux/slimbus.h
diff options
context:
space:
mode:
authorSagar Dharia <sdharia@codeaurora.org>2017-12-11 23:42:58 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-19 11:01:02 +0100
commit46a2bb5a7f7ea2728be50f8f5b29a20267f700fe (patch)
tree593f156be08b9ac363e5f10d9db6e12cae8a7ea3 /include/linux/slimbus.h
parent3648e78ec701843ff8fab461071ba05067274f26 (diff)
slimbus: core: Add slim controllers support
This patch adds support to slim controllers in the slim core, including some utility functions invoked by the controller and slim device drivers. 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>
Diffstat (limited to 'include/linux/slimbus.h')
-rw-r--r--include/linux/slimbus.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/slimbus.h b/include/linux/slimbus.h
index 6b4ed290fbb0..aeed98a683be 100644
--- a/include/linux/slimbus.h
+++ b/include/linux/slimbus.h
@@ -37,11 +37,14 @@ enum slim_device_status {
SLIM_DEVICE_STATUS_RESERVED,
};
+struct slim_controller;
+
/**
* struct slim_device - Slim device handle.
* @dev: Driver model representation of the device.
* @e_addr: Enumeration address of this device.
* @status: slim device status
+ * @ctrl: slim controller instance.
* @laddr: 1-byte Logical address of this device.
* @is_laddr_valid: indicates if the laddr is valid or not
*
@@ -52,6 +55,7 @@ enum slim_device_status {
struct slim_device {
struct device dev;
struct slim_eaddr e_addr;
+ struct slim_controller *ctrl;
enum slim_device_status status;
u8 laddr;
bool is_laddr_valid;
@@ -113,4 +117,8 @@ static inline void slim_set_devicedata(struct slim_device *dev, void *data)
{
dev_set_drvdata(&dev->dev, data);
}
+
+struct slim_device *slim_get_device(struct slim_controller *ctrl,
+ struct slim_eaddr *e_addr);
+int slim_get_logical_addr(struct slim_device *sbdev);
#endif /* _LINUX_SLIMBUS_H */