Re: [PATCH v2 5/7] alpha: marvel: register a platform device for the environmental sensors
From: Magnus Lindholm
Date: Tue Nov 17 2026 - 06:11:53 EST
Hi Matt,
On Tue, Nov 17, 2026 at 3:59 AM Matt Turner <mattst88@xxxxxxxxx> wrote:
>
> Register a "marvel_env" platform device on Marvel systems booted from
> SRM, for the hwmon driver to bind to.
>
> Signed-off-by: Matt Turner <mattst88@xxxxxxxxx>
> ---
> arch/alpha/kernel/core_marvel.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
> index 7525f3ed6b62..169a1df6adb2 100644
> --- a/arch/alpha/kernel/core_marvel.c
> +++ b/arch/alpha/kernel/core_marvel.c
> @@ -21,6 +21,7 @@
> #include <linux/module.h>
> #include <linux/memblock.h>
> #include <linux/workqueue.h>
> +#include <linux/platform_device.h>
>
> #include <asm/ptrace.h>
> #include <asm/smp.h>
> @@ -1139,3 +1140,13 @@ long marvel_cfgtree_partial_update(unsigned long offset)
> return status;
> }
> EXPORT_SYMBOL_GPL(marvel_cfgtree_partial_update);
> +
> +static int __init marvel_env_init(void)
> +{
> + if (alpha_mv.init_arch != marvel_init_arch || !alpha_using_srm)
> + return 0;
> +
> + return PTR_ERR_OR_ZERO(platform_device_register_simple("marvel_env",
> + -1, NULL, 0));
> +}
> +device_initcall(marvel_env_init);
>
> --
> 2.56.1
>
Looks good!
Reviewed-by: Magnus Lindholm <linmag7@xxxxxxxxx>