diff options
| author | Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> | 2016-06-21 19:08:10 +0530 |
|---|---|---|
| committer | Puja Gupta <pujag@codeaurora.org> | 2016-07-22 14:32:23 -0700 |
| commit | 077bf167f0d11b42bcc0a6f2a38d1073abc0ef85 (patch) | |
| tree | fda5a2ed31f0d11c75f50c3e6f41ae4afd5c72d4 /include/soc/qcom | |
| parent | 3f4a2a724ebf6edfbc8c9a1f248c1b9fd0a006f2 (diff) | |
soc: qcom: Make service locator call asynchronous
Make get_service_location() asynchronous, which was a blocking call
before. This also means every client will have it's own thread and
doesn't need to create thread on their end.
CRs-Fixed: 1045353
Change-Id: Ibcccf56d41779b808d1835f62969e3c9365939e8
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Diffstat (limited to 'include/soc/qcom')
| -rw-r--r-- | include/soc/qcom/service-locator.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/soc/qcom/service-locator.h b/include/soc/qcom/service-locator.h index be1a2b431dd9..6bf8ac0be15f 100644 --- a/include/soc/qcom/service-locator.h +++ b/include/soc/qcom/service-locator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -51,16 +51,22 @@ struct pd_qmi_client_data { struct servreg_loc_entry_v01 *domain_list; }; +enum service_locator_state { + LOCATOR_DOWN = 0x0F, + LOCATOR_UP = 0x1F, +}; + #if defined(CONFIG_MSM_SERVICE_LOCATOR) /* - * Use this api to request information regarding the process domains on which - * a particular service runs. The client name and the service name inside the - * pd_qmi_client_data structure need to be filled in by the client calling the - * api. The total domains, db revision and the domain list will be filled in + * Use this api to request information regarding the process domains on + * which a particular service runs. The client name, the service name + * and notifier block pointer need to be provided by client calling the api. + * The total domains, db revision and the domain list will be filled in * by the service locator. * Returns 0 on success; otherwise a value < 0 if no valid subsystem is found. */ -int get_service_location(struct pd_qmi_client_data *data); +int get_service_location(char *client_name, char *service_name, + struct notifier_block *locator_nb); /* * Use this api to request information regarding the subsystem the process @@ -73,9 +79,10 @@ int find_subsys(const char *pd_path, char *subsys); #else -static inline int get_service_location(struct pd_qmi_client_data *data) +static inline int get_service_location(char *client_name, + char *service_name, struct notifier_block *locator_nb); { - return 0; + return -ENODEV; } static inline int find_subsys(const char *pd_path, const char *subsys) |
