mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mfd: max77620: publish I2C and OF module aliases
@ 2026-09-05 13:40 hpp.iscas
  2026-09-10  9:25 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: hpp.iscas @ 2026-09-05 13:40 UTC (permalink / raw)
  To: Lee Jones; +Cc: hpp.iscas, mfd, linux-kernel, Aaron Kling

MFD_MAX77620 became tristate without publishing any module alias for the
I2C driver. Device Tree I2C clients emit OF modaliases, while legacy
board-info clients use the existing I2C IDs, so both supported
enumeration paths need module metadata.

Publish the I2C table and add an OF table for the three documented
compatibles. Keep i2c_client_get_device_id() as the source of chip data
and leave MFD child registration unchanged.

Fixes: 0d084ee9ba87 ("mfd: max77620: Allow building as a module")
Signed-off-by: hpp.iscas <hppiscas@163.com>
---
 drivers/mfd/max77620.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index c4f89a9..6a624e6 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -699,6 +699,15 @@ static const struct i2c_device_id max77620_id[] = {
 	{"max77663", MAX77663},
 	{},
 };
+MODULE_DEVICE_TABLE(i2c, max77620_id);
+
+static const struct of_device_id max77620_of_match[] = {
+	{ .compatible = "maxim,max77620" },
+	{ .compatible = "maxim,max20024" },
+	{ .compatible = "maxim,max77663" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, max77620_of_match);
 
 static DEFINE_SIMPLE_DEV_PM_OPS(max77620_pm_ops,
 				max77620_i2c_suspend, max77620_i2c_resume);
@@ -706,6 +715,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(max77620_pm_ops,
 static struct i2c_driver max77620_driver = {
 	.driver = {
 		.name = "max77620",
+		.of_match_table = max77620_of_match,
 		.pm = pm_sleep_ptr(&max77620_pm_ops),
 	},
 	.probe = max77620_probe,


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: max77620: publish I2C and OF module aliases
  2026-09-05 13:40 [PATCH] mfd: max77620: publish I2C and OF module aliases hpp.iscas
@ 2026-09-10  9:25 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2026-09-10  9:25 UTC (permalink / raw)
  To: hpp.iscas; +Cc: mfd, linux-kernel, Aaron Kling

On Sat, 05 Sep 2026, hpp.iscas wrote:

> MFD_MAX77620 became tristate without publishing any module alias for the
> I2C driver. Device Tree I2C clients emit OF modaliases, while legacy
> board-info clients use the existing I2C IDs, so both supported
> enumeration paths need module metadata.
> 
> Publish the I2C table and add an OF table for the three documented
> compatibles. Keep i2c_client_get_device_id() as the source of chip data
> and leave MFD child registration unchanged.
> 
> Fixes: 0d084ee9ba87 ("mfd: max77620: Allow building as a module")
> Signed-off-by: hpp.iscas <hppiscas@163.com>

Real name please.

> ---
>  drivers/mfd/max77620.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
> index c4f89a9..6a624e6 100644
> --- a/drivers/mfd/max77620.c
> +++ b/drivers/mfd/max77620.c
> @@ -699,6 +699,15 @@ static const struct i2c_device_id max77620_id[] = {
>  	{"max77663", MAX77663},
>  	{},
>  };
> +MODULE_DEVICE_TABLE(i2c, max77620_id);
> +
> +static const struct of_device_id max77620_of_match[] = {
> +	{ .compatible = "maxim,max77620" },
> +	{ .compatible = "maxim,max20024" },
> +	{ .compatible = "maxim,max77663" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, max77620_of_match);
>  
>  static DEFINE_SIMPLE_DEV_PM_OPS(max77620_pm_ops,
>  				max77620_i2c_suspend, max77620_i2c_resume);
> @@ -706,6 +715,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(max77620_pm_ops,
>  static struct i2c_driver max77620_driver = {
>  	.driver = {
>  		.name = "max77620",
> +		.of_match_table = max77620_of_match,
>  		.pm = pm_sleep_ptr(&max77620_pm_ops),
>  	},
>  	.probe = max77620_probe,
> 

-- 
Lee Jones

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-10  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-05 13:40 [PATCH] mfd: max77620: publish I2C and OF module aliases hpp.iscas
2026-09-10  9:25 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®