diff options
author | Yin, Fengwei <fengwei.yin@linaro.org> | 2015-10-20 10:33:25 +0800 |
---|---|---|
committer | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2015-11-17 16:53:52 +0000 |
commit | f7717639225c88a9de518598268795aca5114e41 (patch) | |
tree | ca9e3675538d50d12f8b12ffc6e1041b3cb4c317 /include | |
parent | 01ea8437f3e47e7c663811d7e6ee84248e726413 (diff) |
soc: qcom: smd: Implement id_table driver matching
Implement a id_table based driver maching mechanism for drivers that
binds to fixed channels and doesn't need any additional configuration,
e.g. IPCRTR and DIAG.
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/soc/qcom/smd.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h index 13f56e855401..a2fe0372d205 100644 --- a/include/linux/soc/qcom/smd.h +++ b/include/linux/soc/qcom/smd.h @@ -54,6 +54,14 @@ struct qcom_smd_channel { }; /** + * struct qcom_smd_id - struct used for matching a smd device + * @name: name of the channel + */ +struct qcom_smd_id { + char name[20]; +}; + +/** * struct qcom_smd_device - smd device struct * @dev: the device struct * @channel: handle to the smd channel for this device @@ -66,6 +74,7 @@ struct qcom_smd_device { /** * struct qcom_smd_driver - smd driver struct * @driver: underlying device driver + * @smd_match_table: static channel match table * @probe: invoked when the smd channel is found * @remove: invoked when the smd channel is closed * @callback: invoked when an inbound message is received on the channel, @@ -74,6 +83,8 @@ struct qcom_smd_device { */ struct qcom_smd_driver { struct device_driver driver; + const struct qcom_smd_id *smd_match_table; + int (*probe)(struct qcom_smd_device *dev); void (*remove)(struct qcom_smd_device *dev); int (*callback)(struct qcom_smd_device *, const void *, size_t); |