gpio: tegra: add stub set_debounce callback
Varun Wadekar [Tue, 17 Jan 2012 08:13:39 +0000 (13:13 +0530)]
gpiolib spits out error messages if the underlying
driver does not implement the set_debounce api.

Add stub api since Tegra does not support
gpio debounce in hardware.

Bug 924471

Change-Id: Iadd4ddb41a3a028edf7d55fccf100c8d4bcb5fa2
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/75639
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/gpio/gpio-tegra.c

index c1fba8d..9feafe7 100644 (file)
@@ -202,7 +202,11 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
        return 0;
 }
 
-
+static int tegra_gpio_set_debounce(struct gpio_chip *chip, unsigned offset,
+                                       int value)
+{
+       return -ENOSYS;
+}
 
 static struct gpio_chip tegra_gpio_chip = {
        .label                  = "tegra-gpio",
@@ -210,6 +214,7 @@ static struct gpio_chip tegra_gpio_chip = {
        .get                    = tegra_gpio_get,
        .direction_output       = tegra_gpio_direction_output,
        .set                    = tegra_gpio_set,
+       .set_debounce           = tegra_gpio_set_debounce,
        .base                   = 0,
        .ngpio                  = TEGRA_NR_GPIOS,
 };