The QMI framework proposes a set of services which are defined by an
integer identifier. The different QMI client lookup for the services
via this identifier. Moreover, the function qmi_add_lookup() and
qmi_add_server() must match the service ID but the code in different
places set the same value but with a different macro name. These
macros are spreaded across the different subsystems implementing the
protocols associated with a service. It would make more sense to
define them in the QMI header for the sake of consistency and clarity.
This change use an unified naming for the services and enumerate the
ones implemented in the Linux kernel. More services can come later and
put the service ID in this same header.
Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
---
include/linux/soc/qcom/qmi.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/linux/soc/qcom/qmi.h b/include/linux/soc/qcom/qmi.h
index 291cdc7ef49c..b8d07f2c07e7 100644
--- a/include/linux/soc/qcom/qmi.h
+++ b/include/linux/soc/qcom/qmi.h
@@ -92,6 +92,18 @@ struct qmi_elem_info {
#define QMI_ERR_INCOMPATIBLE_STATE_V01 90
#define QMI_ERR_NOT_SUPPORTED_V01 94
+/*
+ * Enumerate the IDs of the QMI services
+ */
+#define QMI_SERVICE_ID_TEST 0x0F /* 15 */
+#define QMI_SERVICE_ID_SSCTL 0x2B /* 43 */
+#define QMI_SERVICE_ID_IPA 0x31 /* 49 */
+#define QMI_SERVICE_ID_SERVREG_LOC 0x40 /* 64 */
+#define QMI_SERVICE_ID_SERVREG_NOTIF 0x42 /* 66 */
+#define QMI_SERVICE_ID_WLFW 0x45 /* 69 */
+#define QMI_SERVICE_ID_SLIMBUS 0x301 /* 769 */
+#define QMI_SERVICE_ID_USB_AUDIO_STREAM 0x41D /* 1053 */
+
/**
* struct qmi_response_type_v01 - common response header (decoded)
* @result: result of the transaction
--
2.43.0
On 3/10/26 12:03 AM, Daniel Lezcano wrote:
> The QMI framework proposes a set of services which are defined by an
> integer identifier. The different QMI client lookup for the services
> via this identifier. Moreover, the function qmi_add_lookup() and
> qmi_add_server() must match the service ID but the code in different
> places set the same value but with a different macro name. These
> macros are spreaded across the different subsystems implementing the
> protocols associated with a service. It would make more sense to
> define them in the QMI header for the sake of consistency and clarity.
>
> This change use an unified naming for the services and enumerate the
> ones implemented in the Linux kernel. More services can come later and
> put the service ID in this same header.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
> ---
> include/linux/soc/qcom/qmi.h | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/include/linux/soc/qcom/qmi.h b/include/linux/soc/qcom/qmi.h
> index 291cdc7ef49c..b8d07f2c07e7 100644
> --- a/include/linux/soc/qcom/qmi.h
> +++ b/include/linux/soc/qcom/qmi.h
> @@ -92,6 +92,18 @@ struct qmi_elem_info {
> #define QMI_ERR_INCOMPATIBLE_STATE_V01 90
> #define QMI_ERR_NOT_SUPPORTED_V01 94
>
> +/*
> + * Enumerate the IDs of the QMI services
In case that's useful:
https://github.com/linux-msm/qrtr/blob/master/src/lookup.c#L23
Konrad
On 3/10/26 10:57, Konrad Dybcio wrote:
> On 3/10/26 12:03 AM, Daniel Lezcano wrote:
>> The QMI framework proposes a set of services which are defined by an
>> integer identifier. The different QMI client lookup for the services
>> via this identifier. Moreover, the function qmi_add_lookup() and
>> qmi_add_server() must match the service ID but the code in different
>> places set the same value but with a different macro name. These
>> macros are spreaded across the different subsystems implementing the
>> protocols associated with a service. It would make more sense to
>> define them in the QMI header for the sake of consistency and clarity.
>>
>> This change use an unified naming for the services and enumerate the
>> ones implemented in the Linux kernel. More services can come later and
>> put the service ID in this same header.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
>> ---
>> include/linux/soc/qcom/qmi.h | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/include/linux/soc/qcom/qmi.h b/include/linux/soc/qcom/qmi.h
>> index 291cdc7ef49c..b8d07f2c07e7 100644
>> --- a/include/linux/soc/qcom/qmi.h
>> +++ b/include/linux/soc/qcom/qmi.h
>> @@ -92,6 +92,18 @@ struct qmi_elem_info {
>> #define QMI_ERR_INCOMPATIBLE_STATE_V01 90
>> #define QMI_ERR_NOT_SUPPORTED_V01 94
>>
>> +/*
>> + * Enumerate the IDs of the QMI services
I've the same number of patches fixing the copyright for each patch
touched in this series. Shall I post the series separately and fold them
with the corresponding patch ? (IMO the former is cleaner)
On 3/10/26 10:57, Konrad Dybcio wrote:
> On 3/10/26 12:03 AM, Daniel Lezcano wrote:
>> The QMI framework proposes a set of services which are defined by an
>> integer identifier. The different QMI client lookup for the services
>> via this identifier. Moreover, the function qmi_add_lookup() and
>> qmi_add_server() must match the service ID but the code in different
>> places set the same value but with a different macro name. These
>> macros are spreaded across the different subsystems implementing the
>> protocols associated with a service. It would make more sense to
>> define them in the QMI header for the sake of consistency and clarity.
>>
>> This change use an unified naming for the services and enumerate the
>> ones implemented in the Linux kernel. More services can come later and
>> put the service ID in this same header.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
>> ---
>> include/linux/soc/qcom/qmi.h | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/include/linux/soc/qcom/qmi.h b/include/linux/soc/qcom/qmi.h
>> index 291cdc7ef49c..b8d07f2c07e7 100644
>> --- a/include/linux/soc/qcom/qmi.h
>> +++ b/include/linux/soc/qcom/qmi.h
>> @@ -92,6 +92,18 @@ struct qmi_elem_info {
>> #define QMI_ERR_INCOMPATIBLE_STATE_V01 90
>> #define QMI_ERR_NOT_SUPPORTED_V01 94
>>
>> +/*
>> + * Enumerate the IDs of the QMI services
>
> In case that's useful:
>
> https://github.com/linux-msm/qrtr/blob/master/src/lookup.c#L23
Thanks !
On Tue, Mar 10, 2026 at 12:03:30AM +0100, Daniel Lezcano wrote: > The QMI framework proposes a set of services which are defined by an > integer identifier. The different QMI client lookup for the services > via this identifier. Moreover, the function qmi_add_lookup() and > qmi_add_server() must match the service ID but the code in different > places set the same value but with a different macro name. These > macros are spreaded across the different subsystems implementing the > protocols associated with a service. It would make more sense to > define them in the QMI header for the sake of consistency and clarity. > > This change use an unified naming for the services and enumerate the Nit: see Documentation/process/submitting-patches.rst, "This patch" Other than that, Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > ones implemented in the Linux kernel. More services can come later and > put the service ID in this same header. > > Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> > --- > include/linux/soc/qcom/qmi.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > -- With best wishes Dmitry
© 2016 - 2026 Red Hat, Inc.