Message ID | 20240731072955.224125-1-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | spi: rpc-if: Add missing MODULE_DEVICE_TABLE | expand |
+ Updated address for Sergey as the "sergei.shtylyov@cogentembedded.com" bounced. Cheers, Biju > -----Original Message----- > From: Biju Das <biju.das.jz@bp.renesas.com> > Sent: Wednesday, July 31, 2024 8:30 AM > Subject: [PATCH] spi: rpc-if: Add missing MODULE_DEVICE_TABLE > > Add missing MODULE_DEVICE_TABLE definition for automatic loading of the driver when it is built as a > module. > > Fixes: eb8d6d464a27 ("spi: add Renesas RPC-IF driver") > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > --- > On RZ/G2L: > Before we need to manually install spi-rpc-if module for getting partition table info > > After this fix, partition table can be seen during boot > 2 fixed-partitions partitions found on MTD device spi1.0 Creating 2 MTD partitions on "spi1.0": > 0x000000000000-0x000002000000 : "boot" > 0x000002000000-0x000004000000 : "user" > --- > drivers/spi/spi-rpc-if.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c index d3f07fd719bd..b468a95972bf > 100644 > --- a/drivers/spi/spi-rpc-if.c > +++ b/drivers/spi/spi-rpc-if.c > @@ -198,9 +198,16 @@ static int __maybe_unused rpcif_spi_resume(struct device *dev) > > static SIMPLE_DEV_PM_OPS(rpcif_spi_pm_ops, rpcif_spi_suspend, rpcif_spi_resume); > > +static const struct platform_device_id rpc_if_spi_id_table[] = { > + { .name = "rpc-if-spi" }, > + { /* sentinel */ } > +}; > +MODULE_DEVICE_TABLE(platform, rpc_if_spi_id_table); > + > static struct platform_driver rpcif_spi_driver = { > .probe = rpcif_spi_probe, > .remove_new = rpcif_spi_remove, > + .id_table = rpc_if_spi_id_table, > .driver = { > .name = "rpc-if-spi", > #ifdef CONFIG_PM_SLEEP > -- > 2.43.0
On Wed, Jul 31, 2024 at 9:30 AM Biju Das <biju.das.jz@bp.renesas.com> wrote: > Add missing MODULE_DEVICE_TABLE definition for automatic loading of the > driver when it is built as a module. > > Fixes: eb8d6d464a27 ("spi: add Renesas RPC-IF driver") > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> I guess we need a similar fix for drivers/mtd/hyperbus/rpc-if.c? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, Thanks for the feedback. > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: Wednesday, July 31, 2024 8:45 AM > Subject: Re: [PATCH] spi: rpc-if: Add missing MODULE_DEVICE_TABLE > > On Wed, Jul 31, 2024 at 9:30 AM Biju Das <biju.das.jz@bp.renesas.com> wrote: > > Add missing MODULE_DEVICE_TABLE definition for automatic loading of > > the driver when it is built as a module. > > > > Fixes: eb8d6d464a27 ("spi: add Renesas RPC-IF driver") > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > I guess we need a similar fix for drivers/mtd/hyperbus/rpc-if.c? Yes, as rpc-if-hyperflash can be compiled as a module and it will never auto load. I will send separate patch for fixing that driver as well. Cheers, Biju
On Wed, 31 Jul 2024 08:29:53 +0100, Biju Das wrote: > Add missing MODULE_DEVICE_TABLE definition for automatic loading of the > driver when it is built as a module. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: rpc-if: Add missing MODULE_DEVICE_TABLE commit: 0880f669436028c5499901e5acd8f4b4ea0e0c6a All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c index d3f07fd719bd..b468a95972bf 100644 --- a/drivers/spi/spi-rpc-if.c +++ b/drivers/spi/spi-rpc-if.c @@ -198,9 +198,16 @@ static int __maybe_unused rpcif_spi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(rpcif_spi_pm_ops, rpcif_spi_suspend, rpcif_spi_resume); +static const struct platform_device_id rpc_if_spi_id_table[] = { + { .name = "rpc-if-spi" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(platform, rpc_if_spi_id_table); + static struct platform_driver rpcif_spi_driver = { .probe = rpcif_spi_probe, .remove_new = rpcif_spi_remove, + .id_table = rpc_if_spi_id_table, .driver = { .name = "rpc-if-spi", #ifdef CONFIG_PM_SLEEP
Add missing MODULE_DEVICE_TABLE definition for automatic loading of the driver when it is built as a module. Fixes: eb8d6d464a27 ("spi: add Renesas RPC-IF driver") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- On RZ/G2L: Before we need to manually install spi-rpc-if module for getting partition table info After this fix, partition table can be seen during boot 2 fixed-partitions partitions found on MTD device spi1.0 Creating 2 MTD partitions on "spi1.0": 0x000000000000-0x000002000000 : "boot" 0x000002000000-0x000004000000 : "user" --- drivers/spi/spi-rpc-if.c | 7 +++++++ 1 file changed, 7 insertions(+)