diff options
| author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2019-08-29 05:22:33 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 10:04:52 -0400 |
| commit | 44493062abc38e5895e0cf8d22698f2ca39a1e4d (patch) | |
| tree | 43300e21c254fceea83b77dab52b56c8f9cc7d21 /include/linux/device.h | |
| parent | 977607653cdd06a2c4d1d0f179ff46cc0cbe83a5 (diff) | |
device connection: Add fwnode_connection_find_match()
The fwnode_connection_find_match() function is exactly the
same as device_connection_find_match(), except it takes
struct fwnode_handle as parameter instead of struct device.
That allows locating device connections before the device
entries have been created.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1567070558-29417-7-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 47ccb2029bc3..b3aa7295b4cb 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -781,10 +781,14 @@ struct device_connection { | |||
| 781 | struct list_head list; | 781 | struct list_head list; |
| 782 | }; | 782 | }; |
| 783 | 783 | ||
| 784 | typedef void *(*devcon_match_fn_t)(struct device_connection *con, int ep, | ||
| 785 | void *data); | ||
| 786 | |||
| 787 | void *fwnode_connection_find_match(struct fwnode_handle *fwnode, | ||
| 788 | const char *con_id, void *data, | ||
| 789 | devcon_match_fn_t match); | ||
| 784 | void *device_connection_find_match(struct device *dev, const char *con_id, | 790 | void *device_connection_find_match(struct device *dev, const char *con_id, |
| 785 | void *data, | 791 | void *data, devcon_match_fn_t match); |
| 786 | void *(*match)(struct device_connection *con, | ||
| 787 | int ep, void *data)); | ||
| 788 | 792 | ||
| 789 | struct device *device_connection_find(struct device *dev, const char *con_id); | 793 | struct device *device_connection_find(struct device *dev, const char *con_id); |
| 790 | 794 | ||
