gpio: palmas: Allow building as a module
The driver works fine as a module, so allowing building as such. This adds an exit handler to support module unload. Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
This commit is contained in:
@@ -1451,7 +1451,7 @@ config GPIO_MAX77650
|
||||
These chips have a single pin that can be configured as GPIO.
|
||||
|
||||
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
|
||||
|
||||
@@ -140,6 +140,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)
|
||||
{
|
||||
@@ -197,3 +198,13 @@ static int __init palmas_gpio_init(void)
|
||||
return platform_driver_register(&palmas_gpio_driver);
|
||||
}
|
||||
subsys_initcall(palmas_gpio_init);
|
||||
|
||||
static void __exit palmas_gpio_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&palmas_gpio_driver);
|
||||
}
|
||||
module_exit(palmas_gpio_exit);
|
||||
|
||||
MODULE_DESCRIPTION("TI PALMAS series GPIO driver");
|
||||
MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
Reference in New Issue
Block a user