Re: [PATCH v4 2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support

From: Alex Elder
Date: Fri Jun 27 2025 - 09:36:53 EST


On 6/27/25 7:51 AM, Lee Jones wrote:
@@ -93,12 +93,30 @@ static const struct simple_mfd_data maxim_mon_max77705 = {
.mfd_cell_size = ARRAY_SIZE(max77705_sensor_cells),
};
+static const struct regmap_config spacemit_p1_regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+ .max_register = 0xaa,
+};
Suggest making this more widely useful by adding the 'max_register'
attribute to 'struct simple_mfd' and conditionally overriding
regmap_config_8r_8v's value during probe.

So you're suggesting I make a general improvement to
"simple-mfd-i2c.c", because everybody else just uses
the generic fallback regmap config?

(I'm asking because at first I didn't understand your
statement, and the "more widely useful" comment).

I would be happy to do this, and it's not that hard.
Can I do it as a follow-on patch though? It's adding
scope (again), beyond what I anticipated and honestly
I'm ready to be done with this...

Anyway, if you say "no" I'll send another version of
this series today.

-Alex



+static const struct mfd_cell spacemit_p1_cells[] = {
+ { .name = "spacemit-p1-regulator", },
+ { .name = "spacemit-p1-rtc", },
+};
+