Re: [PATCH v17 11/34] firmware: arm_scmi: Add Telemetry basic attributes enumeration

From: Jonathan Cameron

Date: Tue Nov 24 2026 - 18:59:55 EST


On Tue, 24 Nov 2026 19:48:17 +0000
Cristian Marussi <cristian.marussi@xxxxxxx> wrote:

> Add SCMIv4.0 Telemetry basic support for minimal initialization and
> protocol attributes enumeration: expose telemetry instance descriptor
> via a simple information retrieval protocol operation.
>
> Signed-off-by: Cristian Marussi <cristian.marussi@xxxxxxx>
> ---
> v15 --> v16
> - ignore groups

Partly... Need to do a lot more ignoring to make this true and consistent.
There are a few things in here, but key is we need the whole framework
to be as unaware of groups as possible. At least up to the userspace interface
layer where we may need to ensure extensibility.

Jonathan



> diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
> index 3f7cc35eb861..f076ce5601cf 100644
> --- a/include/linux/scmi_protocol.h
> +++ b/include/linux/scmi_protocol.h
> @@ -2,17 +2,19 @@
> /*
> * SCMI Message Protocol driver header
> *
> - * Copyright (C) 2018-2021 ARM Ltd.
> + * Copyright (C) 2018-2026 ARM Ltd.
> */
>
> #ifndef _LINUX_SCMI_PROTOCOL_H
> #define _LINUX_SCMI_PROTOCOL_H
>
> #include <linux/bitfield.h>
> +#include <linux/bitops.h>
> #include <linux/device-id/scmi.h>
> #include <linux/device.h>
> #include <linux/notifier.h>
> #include <linux/types.h>
> +#include <linux/uuid.h>
>
> #define SCMI_MAX_STR_SIZE 64
> #define SCMI_SHORT_NAME_MAX_SIZE 16
> @@ -828,6 +830,35 @@ struct scmi_pinctrl_proto_ops {
> int (*pin_free)(const struct scmi_protocol_handle *ph, u32 pin);
> };
>
> +struct scmi_telemetry_base_info {
> + unsigned int version;
> + uuid_t primary_revision;
> + unsigned int num_des;
> + unsigned int num_groups;

My gut instinct would be to introduce this only in set 2 that adds
groups controls. The best form of no groups is no reference to them at all
except in userspace ABI where you stub them out for now.

> + unsigned int num_intervals;
> + unsigned int num_shmtis;
Ideally grow this as you add support for things. num_intervals and num_shmtis aren't used yet.

> +};
> +
> +struct scmi_telemetry_info {
> + bool single_read_support;
> + bool continuous_update_support;
> + bool per_group_config_support;

Logically without group support we don't care. I'm less bothered though
on whether you rip out a simple support bit but if we are going for clean
separation this would go as well.

> + bool reset_support;
> + bool fc_support;
> + struct scmi_telemetry_base_info base;
> +};
> +
> +/**
> + * struct scmi_telemetry_proto_ops - represents the various operations provided
> + * by SCMI Telemetry Protocol
> + *
> + * @info_get: get the general Telemetry information.
> + */
> +struct scmi_telemetry_proto_ops {
> + const struct scmi_telemetry_info *(*info_get)
> + (const struct scmi_protocol_handle *ph);
> +};
> +
> /**
> * struct scmi_notify_ops - represents notifications' operations provided by
> * SCMI core