Loading drivers/soc/qcom/service-notifier.h→drivers/soc/qcom/service-notifier-private.h +0 −8 Original line number Diff line number Diff line Loading @@ -30,14 +30,6 @@ #define QMI_SERVREG_NOTIF_NAME_LENGTH_V01 64 enum qmi_servreg_notif_service_state_enum_type_v01 { QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MIN_VAL_V01 = INT_MIN, QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MAX_VAL_V01 = INT_MAX, SERVREG_NOTIF_SERVICE_STATE_DOWN_V01 = 0x0FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UP_V01 = 0x1FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UNINIT_V01 = 0x7FFFFFFF, }; struct qmi_servreg_notif_register_listener_req_msg_v01 { uint8_t enable; char service_name[QMI_SERVREG_NOTIF_NAME_LENGTH_V01 + 1]; Loading drivers/soc/qcom/service-notifier.c +2 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,8 @@ #include <soc/qcom/subsystem_notif.h> #include <soc/qcom/sysmon.h> #include <soc/qcom/service-locator.h> #include "service-notifier.h" #include <soc/qcom/service-notifier.h> #include "service-notifier-private.h" #define QMI_RESP_BIT_SHIFT(x) (x << 16) #define SERVREG_NOTIF_NAME_LENGTH QMI_SERVREG_NOTIF_NAME_LENGTH_V01 Loading include/soc/qcom/service-notifier.h 0 → 100644 +67 −0 Original line number Diff line number Diff line /* * Copyright (c) 2015, 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 * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Process Domain Service Notifier API header */ #ifndef _SERVICE_NOTIFIER_H #define _SERVICE_NOTIFIER_H enum qmi_servreg_notif_service_state_enum_type_v01 { QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MIN_VAL_V01 = INT_MIN, QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MAX_VAL_V01 = INT_MAX, SERVREG_NOTIF_SERVICE_STATE_DOWN_V01 = 0x0FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UP_V01 = 0x1FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UNINIT_V01 = 0x7FFFFFFF, }; #if defined(CONFIG_MSM_SERVICE_NOTIFIER) /* service_notif_register_notifier() - Register a notifier for a service * On success, it returns back a handle. It takes the following arguments: * service_path: Individual service identifier path for which a client * registers for notifications. * instance_id: Instance id specific to a subsystem. * current_state: Current state of service returned by the registration * process. * notifier block: notifier callback for service events. */ void *service_notif_register_notifier(const char *service_path, int instance_id, struct notifier_block *nb, int *curr_state); /* service_notif_unregister_notifier() - Unregister a notifier for a service. * service_notif_handle - The notifier handler that was provided by the * service_notif_register_notifier function when the * client registered for notifications. * nb - The notifier block that was previously used during the registration. */ int service_notif_unregister_notifier(void *service_notif_handle, struct notifier_block *nb); #else static void *service_notif_register_notifier(const char *service_path, int instance_id, struct notifier_block *nb, int *curr_state) { return -ENODEV; } static int service_notif_unregister_notifier(void *service_notif_handle, struct notifier_block *nb) { return -ENODEV; } #endif /* CONFIG_MSM_SERVICE_NOTIFIER */ #endif Loading
drivers/soc/qcom/service-notifier.h→drivers/soc/qcom/service-notifier-private.h +0 −8 Original line number Diff line number Diff line Loading @@ -30,14 +30,6 @@ #define QMI_SERVREG_NOTIF_NAME_LENGTH_V01 64 enum qmi_servreg_notif_service_state_enum_type_v01 { QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MIN_VAL_V01 = INT_MIN, QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MAX_VAL_V01 = INT_MAX, SERVREG_NOTIF_SERVICE_STATE_DOWN_V01 = 0x0FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UP_V01 = 0x1FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UNINIT_V01 = 0x7FFFFFFF, }; struct qmi_servreg_notif_register_listener_req_msg_v01 { uint8_t enable; char service_name[QMI_SERVREG_NOTIF_NAME_LENGTH_V01 + 1]; Loading
drivers/soc/qcom/service-notifier.c +2 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,8 @@ #include <soc/qcom/subsystem_notif.h> #include <soc/qcom/sysmon.h> #include <soc/qcom/service-locator.h> #include "service-notifier.h" #include <soc/qcom/service-notifier.h> #include "service-notifier-private.h" #define QMI_RESP_BIT_SHIFT(x) (x << 16) #define SERVREG_NOTIF_NAME_LENGTH QMI_SERVREG_NOTIF_NAME_LENGTH_V01 Loading
include/soc/qcom/service-notifier.h 0 → 100644 +67 −0 Original line number Diff line number Diff line /* * Copyright (c) 2015, 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 * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Process Domain Service Notifier API header */ #ifndef _SERVICE_NOTIFIER_H #define _SERVICE_NOTIFIER_H enum qmi_servreg_notif_service_state_enum_type_v01 { QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MIN_VAL_V01 = INT_MIN, QMI_SERVREG_NOTIF_SERVICE_STATE_ENUM_TYPE_MAX_VAL_V01 = INT_MAX, SERVREG_NOTIF_SERVICE_STATE_DOWN_V01 = 0x0FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UP_V01 = 0x1FFFFFFF, SERVREG_NOTIF_SERVICE_STATE_UNINIT_V01 = 0x7FFFFFFF, }; #if defined(CONFIG_MSM_SERVICE_NOTIFIER) /* service_notif_register_notifier() - Register a notifier for a service * On success, it returns back a handle. It takes the following arguments: * service_path: Individual service identifier path for which a client * registers for notifications. * instance_id: Instance id specific to a subsystem. * current_state: Current state of service returned by the registration * process. * notifier block: notifier callback for service events. */ void *service_notif_register_notifier(const char *service_path, int instance_id, struct notifier_block *nb, int *curr_state); /* service_notif_unregister_notifier() - Unregister a notifier for a service. * service_notif_handle - The notifier handler that was provided by the * service_notif_register_notifier function when the * client registered for notifications. * nb - The notifier block that was previously used during the registration. */ int service_notif_unregister_notifier(void *service_notif_handle, struct notifier_block *nb); #else static void *service_notif_register_notifier(const char *service_path, int instance_id, struct notifier_block *nb, int *curr_state) { return -ENODEV; } static int service_notif_unregister_notifier(void *service_notif_handle, struct notifier_block *nb) { return -ENODEV; } #endif /* CONFIG_MSM_SERVICE_NOTIFIER */ #endif