diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-05-13 17:36:11 -0400 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-05-13 17:42:23 -0400 |
commit | f79a917e69e1f5cd86e864b67f06147f1b0340f4 (patch) | |
tree | 561675103ee8a220365e7c907e51d6c362727ff7 /include/linux/soc/qcom/smd.h | |
parent | ed7cbbce544856b20e5811de373cf92e92499771 (diff) | |
parent | b853cb9628bfbcc4017da46d5f5b46e3eba9d8c6 (diff) |
Merge tag 'qcom-soc-for-4.7-2' into net-next
This merges the Qualcomm SOC tree with the net-next, solving the
merge conflict in the SMD API between the two.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/soc/qcom/smd.h')
-rw-r--r-- | include/linux/soc/qcom/smd.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h index 46a984f5e3a3..cbb0f06c41b2 100644 --- a/include/linux/soc/qcom/smd.h +++ b/include/linux/soc/qcom/smd.h | |||
@@ -26,6 +26,8 @@ struct qcom_smd_device { | |||
26 | struct qcom_smd_channel *channel; | 26 | struct qcom_smd_channel *channel; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | typedef int (*qcom_smd_cb_t)(struct qcom_smd_channel *, const void *, size_t); | ||
30 | |||
29 | /** | 31 | /** |
30 | * struct qcom_smd_driver - smd driver struct | 32 | * struct qcom_smd_driver - smd driver struct |
31 | * @driver: underlying device driver | 33 | * @driver: underlying device driver |
@@ -42,7 +44,7 @@ struct qcom_smd_driver { | |||
42 | 44 | ||
43 | int (*probe)(struct qcom_smd_device *dev); | 45 | int (*probe)(struct qcom_smd_device *dev); |
44 | void (*remove)(struct qcom_smd_device *dev); | 46 | void (*remove)(struct qcom_smd_device *dev); |
45 | int (*callback)(struct qcom_smd_device *, const void *, size_t); | 47 | qcom_smd_cb_t callback; |
46 | }; | 48 | }; |
47 | 49 | ||
48 | #if IS_ENABLED(CONFIG_QCOM_SMD) | 50 | #if IS_ENABLED(CONFIG_QCOM_SMD) |
@@ -50,8 +52,14 @@ struct qcom_smd_driver { | |||
50 | int qcom_smd_driver_register(struct qcom_smd_driver *drv); | 52 | int qcom_smd_driver_register(struct qcom_smd_driver *drv); |
51 | void qcom_smd_driver_unregister(struct qcom_smd_driver *drv); | 53 | void qcom_smd_driver_unregister(struct qcom_smd_driver *drv); |
52 | 54 | ||
55 | struct qcom_smd_channel *qcom_smd_open_channel(struct qcom_smd_channel *channel, | ||
56 | const char *name, | ||
57 | qcom_smd_cb_t cb); | ||
58 | void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel); | ||
59 | void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data); | ||
53 | int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len); | 60 | int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len); |
54 | 61 | ||
62 | |||
55 | #else | 63 | #else |
56 | 64 | ||
57 | static inline int qcom_smd_driver_register(struct qcom_smd_driver *drv) | 65 | static inline int qcom_smd_driver_register(struct qcom_smd_driver *drv) |
@@ -65,6 +73,29 @@ static inline void qcom_smd_driver_unregister(struct qcom_smd_driver *drv) | |||
65 | WARN_ON(1); | 73 | WARN_ON(1); |
66 | } | 74 | } |
67 | 75 | ||
76 | static inline struct qcom_smd_channel * | ||
77 | qcom_smd_open_channel(struct qcom_smd_channel *channel, | ||
78 | const char *name, | ||
79 | qcom_smd_cb_t cb) | ||
80 | { | ||
81 | /* This shouldn't be possible */ | ||
82 | WARN_ON(1); | ||
83 | return NULL; | ||
84 | } | ||
85 | |||
86 | void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel) | ||
87 | { | ||
88 | /* This shouldn't be possible */ | ||
89 | WARN_ON(1); | ||
90 | return NULL; | ||
91 | } | ||
92 | |||
93 | void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data) | ||
94 | { | ||
95 | /* This shouldn't be possible */ | ||
96 | WARN_ON(1); | ||
97 | } | ||
98 | |||
68 | static inline int qcom_smd_send(struct qcom_smd_channel *channel, | 99 | static inline int qcom_smd_send(struct qcom_smd_channel *channel, |
69 | const void *data, int len) | 100 | const void *data, int len) |
70 | { | 101 | { |