media: enable module autoloading
Subsystems (7)
cover media: enable module autoloading
Hi all,
This patchset aims to enable autoloading of some media modules. By registering MDT, the kernel is allowed to automatically bind modules to devices that match the specified compatible strings.
Liao Chen (3):
media: v4l2-subdev: enable module autoloading
media: platform: rzg2l-cru: rzg2l-csi2: enable module autoloading
media: tegra_cec: enable module autoloading
drivers/media/cec/platform/tegra/tegra_cec.c | 1 + drivers/media/i2c/mt9v111.c | 1 + drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 1 + 3 files changed, 3 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/3 media: v4l2-subdev: enable module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/media/i2c/mt9v111.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/i2c/mt9v111.c +1 -0
@@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = { { .compatible = "aptina,mt9v111", }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, mt9v111_of_match);static struct i2c_driver mt9v111_driver = { .driver = {
Signature · 1 line
2.34.1
RE: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
Hi Liao Chen,
Thanks for the patch.
Quoted 4 lines
-----Original Message-----
From: Liao Chen <[email protected]>
Sent: Thursday, August 29, 2024 8:54 AM
Subject: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
Commit header is wrong.
Quoted 14 lines
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>--- drivers/media/i2c/mt9v111.c | 1 + 1 file changed, 1 insertion(+)drivers/media/i2c/mt9v111.c index renamed from drivers/media/i2c/mt9v111.c +0
-0
b0b98ed3c150..b6a2623798c5100644
drivers/media/i2c/mt9v111.c static const struct of_device_id mt9v111_of_match[] = { · line 1266
Quoted 2 lines
drivers/media/i2c/mt9v111.c +0
-0@@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = { { .compatible = "aptina,mt9v111", }, { /* sentinel */ },
Nit: Comma can be dropped from terminator entry as a separate patch.
Cheers,
Biju
Quoted 7 lines
drivers/media/i2c/mt9v111.c +1
-1}; +MODULE_DEVICE_TABLE (of, mt9v111_of_match);static struct i2c_driver mt9v111_driver = { .driver = { --2.34.1
Laurent Pinchart
Reviewed-byRe: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
Quoted 5 lines · Biju Das
Hi Liao Chen,
Quoted 1 line · Liao Chen
Subject: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
Commit header is wrong.
Indeed, it should be
media: i2c: mt9v111: Enable module autoloading
Quoted 2 lines
Quoted 2 lines
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.
Please also reflow the commit message to 72 columns. With those issues fixed,
Quoted 24 lines
drivers/media/i2c/mt9v111.c static const struct of_device_id mt9v111_of_match[] = { · line 1266
Quoted 13 lines
Signed-off-by Liao Chen <[email protected]>--- drivers/media/i2c/mt9v111.c | 1 + 1 file changed, 1 insertion(+)drivers/media/i2c/mt9v111.c index renamed from drivers/media/i2c/mt9v111.c +0
-0
b0b98ed3c150..b6a2623798c5100644drivers/media/i2c/mt9v111.c +0
-0@@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = { { .compatible = "aptina,mt9v111", }, { /* sentinel */ },Nit: Comma can be dropped from terminator entry as a separate patch.
Cheers,
BijuQuoted 5 lines
drivers/media/i2c/mt9v111.c +1
-0}; +MODULE_DEVICE_TABLE (of, mt9v111_of_match);static struct i2c_driver mt9v111_driver = { .driver = {
Signature · 3 lines
Regards, Laurent Pinchart
Re: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
Quoted 11 lines · Laurent Pinchart
Quoted 5 lines · Biju Das
Hi Liao Chen,
Quoted 1 line · Liao Chen
Subject: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
Commit header is wrong.
Indeed, it should be
media: i2c: mt9v111: Enable module autoloading
Quoted 33 lines
Quoted 2 lines
Quoted 2 lines
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Please also reflow the commit message to 72 columns. With those issues fixed,
Reviewed-by Laurent Pinchart <[email protected]>Quoted 24 lines
drivers/media/i2c/mt9v111.c static const struct of_device_id mt9v111_of_match[] = { · line 1266
Quoted 13 lines
Signed-off-by Liao Chen <[email protected]>--- drivers/media/i2c/mt9v111.c | 1 + 1 file changed, 1 insertion(+)drivers/media/i2c/mt9v111.c index renamed from drivers/media/i2c/mt9v111.c +0
-0
b0b98ed3c150..b6a2623798c5100644drivers/media/i2c/mt9v111.c +0
-0@@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = { { .compatible = "aptina,mt9v111", }, { /* sentinel */ },Nit: Comma can be dropped from terminator entry as a separate patch.
Cheers,
BijuQuoted 5 lines
drivers/media/i2c/mt9v111.c +1
-0}; +MODULE_DEVICE_TABLE (of, mt9v111_of_match);static struct i2c_driver mt9v111_driver = { .driver = {
Thanks for pointing out, just sent a patch series with these issues fixed.
Thanks,
Chen
PATCH 2/3 media: platform: rzg2l-cru: rzg2l-csi2: enable module autoloading
In reply to Liao ChenAdd MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c +1 -0
@@ -865,6 +865,7 @@ static const struct of_device_id rzg2l_csi2_of_table[] = { { .compatible = "renesas,rzg2l-csi2", }, {/* sentinel */ } }; +MODULE_DEVICE_TABLE (of, rzg2l_csi2_of_table);static struct platform_driver rzg2l_csi2_pdrv = { .remove_new = rzg2l_csi2_remove,
Signature · 1 line
2.34.1
RE: [PATCH -next 2/3] media: platform: rzg2l-cru: rzg2l-csi2: enable module autoloading
Hi Liao,
It is same as [1]
[1] https://git.linuxtv.org/media_stage.git/commit/?id=07668fb0f867388bfdac0b60dbf51a4ad789f8e7
Cheers,
Biju
Quoted 32 lines
-----Original Message-----
From: Liao Chen <[email protected]>
Sent: Thursday, August 29, 2024 8:54 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Biju Das <[email protected]>; [email protected]; [email protected]
Subject: [PATCH -next 2/3] media: platform: rzg2l-cru: rzg2l-csi2: enable module autoloadingAdd
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>--- drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 1 + 1 file changed, 1 insertion(+)drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c +1
-1@@ -865,6 +865,7 @@ static const struct of_device_id rzg2l_csi2_of_table[] = { { .compatible = "renesas,rzg2l-csi2", }, {/* sentinel */ } }; +MODULE_DEVICE_TABLE (of, rzg2l_csi2_of_table);static struct platform_driver rzg2l_csi2_pdrv = { .remove_new = rzg2l_csi2_remove, --2.34.1
PATCH 3/3 media: tegra_cec: enable module autoloading
In reply to Liao ChenAdd MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/media/cec/platform/tegra/tegra_cec.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/cec/platform/tegra/tegra_cec.c +1 -0
@@ -458,6 +458,7 @@ static const struct of_device_id tegra_cec_of_match[] = { { .compatible = "nvidia,tegra210-cec", }, {}, }; +MODULE_DEVICE_TABLE (of, tegra_cec_of_match);static struct platform_driver tegra_cec_driver = { .driver = {
Signature · 1 line
2.34.1