Re: [PATCH v2] mfd: max77620: publish module aliases with variant match data
From: Pengpeng Hou
Date: Wed Dec 02 2026 - 22:27:23 EST
Hi Lee,
You're right: the array only provided addresses for enum values. It
isn't needed to describe the variants. MAX77620 is currently zero,
so treating a NULL match-data pointer as an unknown chip would also
reject MAX77620 if the IDs were cast directly. For a revision I'd
reserve zero for no match after checking users of the enum, and use
the same nonzero IDs for the OF and I2C entries.
I'd use .name and .driver_data in the I2C table and capitalize
"Publish" in the subject. On the registration point, MFD_MAX77620
is tristate, but builtin_i2c_driver() doesn't supply an unregister
exit path. Publishing an alias is about loading the driver; it
doesn't make removal safe. I wouldn't switch registration macros
as part of this change.
Thanks,
Pengpeng