Re: [PATCH 3/6] regulator: spacemit: support SpacemiT P1 regulators

From: Vivian Wang
Date: Thu Jun 19 2025 - 10:13:41 EST


On 6/19/25 21:23, Alex Elder wrote:
On 6/19/25 1:15 AM, Vivian Wang wrote:
Also, consider naming this consistently: "spacemit-p1", or
"spacemit-p1-regulator"?

Let me see if I understand your comment, by explaining the
naming I used.

The PMIC driver could support a different PMIC.  Its OF
match table specifies a compatible string with matching
data, and the data describes attributes of the P1 PMIC.
So that driver uses MOD_NAME "spacemit-pmic".

This driver describes specifically the regulators found
in the P1 PMIC, so it uses "spacemit-p1-regulator" as
its MOD_NAME.

You might still be right; but does this change what you
are suggesting?

Oh sorry it was simpler than that. It's just I've noted that this regulator module file is called "spacemit-p1":

+obj-$(CONFIG_REGULATOR_SPACEMIT_P1) += spacemit-p1.o

... but the MOD_NAME is "spacemit-p1-regulator", and I was wondering if it made sense to rename the module to also "spacemit-p1-regulator". In addition to consistency, modules are free to have all sorts of names in Linux, but the names have to be unique, so if this is only the regulator driver part, the name should reflect that.

Vivian "dramforever" Wang