diff options
author | Srinivas Neeli <srinivas.neeli@xilinx.com> | 2020-11-12 22:42:25 +0530 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-11-18 08:51:52 +0100 |
commit | 0230a41ed6a818675c0166d506c3c9386af20986 (patch) | |
tree | bb7afc6411aafd702a0577b8753469fbd15ea110 /drivers/gpio/gpio-xilinx.c | |
parent | 65bbe531b54668099783cd687e674b9587c7e56e (diff) | |
download | lwn-0230a41ed6a818675c0166d506c3c9386af20986.tar.gz lwn-0230a41ed6a818675c0166d506c3c9386af20986.zip |
gpio: gpio-xilinx: Add remove function
Added remove function support.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/1605201148-4508-7-git-send-email-srinivas.neeli@xilinx.com
[dropped pm disable call]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-xilinx.c')
-rw-r--r-- | drivers/gpio/gpio-xilinx.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index 5327457586d7..9f2dfb734832 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -260,6 +260,23 @@ static void xgpio_save_regs(struct xgpio_instance *chip) } /** + * xgpio_remove - Remove method for the GPIO device. + * @pdev: pointer to the platform device + * + * This function remove gpiochips and frees all the allocated resources. + * + * Return: 0 always + */ +static int xgpio_remove(struct platform_device *pdev) +{ + struct xgpio_instance *gpio = platform_get_drvdata(pdev); + + clk_disable_unprepare(gpio->clk); + + return 0; +} + +/** * xgpio_of_probe - Probe method for the GPIO device. * @pdev: pointer to the platform device * @@ -371,6 +388,7 @@ MODULE_DEVICE_TABLE(of, xgpio_of_match); static struct platform_driver xgpio_plat_driver = { .probe = xgpio_probe, + .remove = xgpio_remove, .driver = { .name = "gpio-xilinx", .of_match_table = xgpio_of_match, |