Skip to content

Commit a1ce76e

Browse files
jwrdegoedeandy-shev
authored andcommitted
gpio: tps68470: Allow building as module
The gpio-tps68470 driver binds to a tps68470-gpio platform-device which itself gets instantiated by a special MFD driver from drivers/platform/x86/intel/int3472/tps68470.c This MFD driver itself can be built as a module, so it makes no sense to force the gpio-tps68470 driver to always be built-in. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent b3376ed commit a1ce76e

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

drivers/gpio/Kconfig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ config GPIO_TPS65912
13801380
This driver supports TPS65912 GPIO chip.
13811381

13821382
config GPIO_TPS68470
1383-
bool "TPS68470 GPIO"
1383+
tristate "TPS68470 GPIO"
13841384
depends on INTEL_SKL_INT3472
13851385
help
13861386
Select this option to enable GPIO driver for the TPS68470
@@ -1390,10 +1390,6 @@ config GPIO_TPS68470
13901390
input or output as appropriate, the sensor related GPIOs
13911391
are "output only" GPIOs.
13921392

1393-
This driver config is bool, as the GPIO functionality
1394-
of the TPS68470 must be available before dependent
1395-
drivers are loaded.
1396-
13971393
config GPIO_TQMX86
13981394
tristate "TQ-Systems QTMX86 GPIO"
13991395
depends on MFD_TQMX86 || COMPILE_TEST

drivers/gpio/gpio-tps68470.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,8 @@ static struct platform_driver tps68470_gpio_driver = {
154154
},
155155
.probe = tps68470_gpio_probe,
156156
};
157+
module_platform_driver(tps68470_gpio_driver);
157158

158-
builtin_platform_driver(tps68470_gpio_driver)
159+
MODULE_ALIAS("platform:tps68470-gpio");
160+
MODULE_DESCRIPTION("GPIO driver for TPS68470 PMIC");
161+
MODULE_LICENSE("GPL v2");

0 commit comments

Comments
 (0)