aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-09-13 13:04:02 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-09-19 12:12:28 +0100
commitf0a7a98d1d400e2a5fd9a63ed56d30d30f2864cb (patch)
tree7b2b073ced77c27eed9a5817d648f42d83b000b5 /drivers/gpio
parentf066439cfc37d498a06de76fcab8c21d4094ca64 (diff)
downloadkernel_goldelico_gta04-f0a7a98d1d400e2a5fd9a63ed56d30d30f2864cb.zip
kernel_goldelico_gta04-f0a7a98d1d400e2a5fd9a63ed56d30d30f2864cb.tar.gz
kernel_goldelico_gta04-f0a7a98d1d400e2a5fd9a63ed56d30d30f2864cb.tar.bz2
ARM: 6373/1: tc35892-gpio: add setup/remove callbacks
For board-specific initialization. Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: linux-kernel@vger.kernel.org Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/tc35892-gpio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/tc35892-gpio.c b/drivers/gpio/tc35892-gpio.c
index 1be6288..7e10c93 100644
--- a/drivers/gpio/tc35892-gpio.c
+++ b/drivers/gpio/tc35892-gpio.c
@@ -322,6 +322,9 @@ static int __devinit tc35892_gpio_probe(struct platform_device *pdev)
goto out_freeirq;
}
+ if (pdata->setup)
+ pdata->setup(tc35892, tc35892_gpio->chip.base);
+
platform_set_drvdata(pdev, tc35892_gpio);
return 0;
@@ -338,9 +341,14 @@ out_free:
static int __devexit tc35892_gpio_remove(struct platform_device *pdev)
{
struct tc35892_gpio *tc35892_gpio = platform_get_drvdata(pdev);
+ struct tc35892 *tc35892 = tc35892_gpio->tc35892;
+ struct tc35892_gpio_platform_data *pdata = tc35892->pdata->gpio;
int irq = platform_get_irq(pdev, 0);
int ret;
+ if (pdata->remove)
+ pdata->remove(tc35892, tc35892_gpio->chip.base);
+
ret = gpiochip_remove(&tc35892_gpio->chip);
if (ret < 0) {
dev_err(tc35892_gpio->dev,