[PATCH 2/3] soc: samsung: exynos-pmu: move some gs101 related code into new file

André Draszik andre.draszik at linaro.org
Sun Oct 5 23:52:40 PDT 2025


Hi Sam,

On Fri, 2025-10-03 at 12:55 -0500, Sam Protsenko wrote:
> On Thu, Oct 2, 2025 at 5:33 AM André Draszik <andre.draszik at linaro.org> wrote:
> > 
> > To avoid cluttering common code, move most of the gs101 code into a new
> > file, gs101-pmu.c
> > 
> > More code is going to be added for gs101 - having it all in one file
> > helps keeping the common code (file) more readable.
> > 
> 
> Maybe add "no functional change" note for refactoring/cleanup patches like this.

Sure


[...]

> > 
> > diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h
> > index 113149ed32c88a09b075be82050c26970e4c0620..fe11adc4f6ac8fc8bce228d5852deaff7c438221 100644
> > --- a/drivers/soc/samsung/exynos-pmu.h
> > +++ b/drivers/soc/samsung/exynos-pmu.h
> > @@ -44,7 +44,14 @@ extern const struct exynos_pmu_data exynos4412_pmu_data;
> >  extern const struct exynos_pmu_data exynos5250_pmu_data;
> >  extern const struct exynos_pmu_data exynos5420_pmu_data;
> >  #endif
> > +extern const struct exynos_pmu_data gs101_pmu_data;
> > 
> >  extern void pmu_raw_writel(u32 val, u32 offset);
> >  extern u32 pmu_raw_readl(u32 offset);
> > +
> > +int tensor_sec_reg_write(void *context, unsigned int reg, unsigned int val);
> > +int tensor_sec_reg_read(void *context, unsigned int reg, unsigned int *val);
> > +int tensor_sec_update_bits(void *ctx, unsigned int reg, unsigned int mask,
> > +                          unsigned int val);
> 
> Nitpick: just noticed the inconsistency between context/ctx wording
> usage in above function arguments.

Interesting... I'll fix it as part of the move.

> 
> > +
> >  #endif /* __EXYNOS_PMU_H */
> > diff --git a/drivers/soc/samsung/gs101-pmu.c b/drivers/soc/samsung/gs101-pmu.c
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..b5a535822ec830b751e36a33121e2a03ef2ebcb2
> > --- /dev/null
> > +++ b/drivers/soc/samsung/gs101-pmu.c
> > @@ -0,0 +1,141 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +//
> > +// Copyright 2025 Linaro Ltd.
> > +//
> > +// GS101 PMU (Power Management Unit) support
> > +
> 
> AFAIR headers like these should be made using multi-line comments (not
> talking about SPDX part). Or is it the latest fashion trends in
> kernel?

Depends on subsystem, but multi-line for most. Here I went with existing style for
the PMU-related files, though.

Cheers,
Andre'



More information about the linux-arm-kernel mailing list