lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMRc=MdefqMEaiE9NAACzBp+UDgoLe7B=JGe8KQe5tCnHYzWLw@mail.gmail.com>
Date: Tue, 1 Jul 2025 01:37:30 -0700
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Aaron Kling <webgeek1234@...il.com>
Cc: Laxman Dewangan <ldewangan@...dia.com>, Linus Walleij <linus.walleij@...aro.org>, 
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH v2] gpio: palmas: Allow building as a module

On Mon, 30 Jun 2025 21:33:07 +0200, Aaron Kling <webgeek1234@...il.com> said:
>>
>> This being put into an earlier initcall than device_initcall() makes
>> me think, someone had a reason for it and this change can break this.
>> I'm Cc'ing the original author who seems to still be active in the
>> kernel.
>>
>> Laxman: can you verify that this can be safely moved to module_initcall()?
>>
>
> Reminder about this patch/question. It's well into the 6.16 cycle now.
> If Laxman doesn't respond, is this mergeable? I didn't see any issues
> in my basic boot tests on a tegra124 device using a tps65913. But I
> didn't do anything close to full functionality tests.
>

Why not do the following?

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 44f922e10db2..dcea3c1bb31c 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1501,7 +1501,7 @@ config GPIO_MAX77759
          called gpio-max77759.

 config GPIO_PALMAS
-       bool "TI PALMAS series PMICs GPIO"
+       tristate "TI PALMAS series PMICs GPIO"
        depends on MFD_PALMAS
        help
          Select this option to enable GPIO driver for the TI PALMAS
diff --git a/drivers/gpio/gpio-palmas.c b/drivers/gpio/gpio-palmas.c
index a076daee0065..ec503b008d0d 100644
--- a/drivers/gpio/gpio-palmas.c
+++ b/drivers/gpio/gpio-palmas.c
@@ -139,6 +139,7 @@ static const struct of_device_id of_palmas_gpio_match[] = {
        { .compatible = "ti,tps80036-gpio", .data = &tps80036_dev_data,},
        { },
 };
+MODULE_DEVICE_TABLE(of, of_palmas_gpio_match);

 static int palmas_gpio_probe(struct platform_device *pdev)
 {
@@ -196,3 +197,7 @@ static int __init palmas_gpio_init(void)
        return platform_driver_register(&palmas_gpio_driver);
 }
 subsys_initcall(palmas_gpio_init);
+
+MODULE_DESCRIPTION("TI PALMAS series GPIO driver");
+MODULE_AUTHOR("Laxman Dewangan <ldewangan@...dia.com>");
+MODULE_LICENSE("GPL");

This would keep the initcall level when the module is built-in.

Bartosz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ