Re: [PATCH v2 1/2] module: add SCMI device table alias support
From: Uwe Kleine-König
Date: Mon Aug 24 2026 - 08:17:01 EST
Hello,
On Thu, Jun 18, 2026 at 03:56:34PM +0000, Bjorn Andersson wrote:
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index 3b0c9a251a2e..769382f2eadd 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -473,6 +473,17 @@ struct rpmsg_device_id {
> kernel_ulong_t driver_data;
> };
>
> +/* scmi */
> +
> +#define SCMI_NAME_SIZE 32
> +#define SCMI_MODULE_PREFIX "scmi:"
> +
> +struct scmi_device_id {
> + __u8 protocol_id;
> + char name[SCMI_NAME_SIZE];
> + kernel_ulong_t driver_data;
> +};
> +
Note this won't apply since commit ad428f5811bd ("mod_devicetable.h:
Split into per subsystem headers"). Please create a header below
include/device-id for scmi similar to what was done in ad428f5811bd.
(And don't add an #include for it to mod_devicetable.h, but to the
modpost program only.)
Also please only add a driver_data member if you need it. And if you do,
consider using
union {
kernel_ulong_t driver_data;
const void *driver_data_ptr;
};
instead of a plain kernel_ulong_t driver_data member. I'm working (less
than part-time) on changing the existing device-id members accordingly.
See e.g.
https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@xxxxxxxxxxxx
for an extended rationale.
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature