diff options
-rw-r--r-- | drivers/extcon/extcon-gpio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index 6368a0f3ae6d..862743bc825f 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c | |||
@@ -100,7 +100,13 @@ static int gpio_extcon_probe(struct platform_device *pdev) | |||
100 | extcon_data->state_off = pdata->state_off; | 100 | extcon_data->state_off = pdata->state_off; |
101 | if (pdata->state_on && pdata->state_off) | 101 | if (pdata->state_on && pdata->state_off) |
102 | extcon_data->edev.print_state = extcon_gpio_print_state; | 102 | extcon_data->edev.print_state = extcon_gpio_print_state; |
103 | extcon_data->debounce_jiffies = msecs_to_jiffies(pdata->debounce); | 103 | if (pdata->debounce) { |
104 | ret = gpio_set_debounce(extcon_data->gpio, | ||
105 | pdata->debounce * 1000); | ||
106 | if (ret < 0) | ||
107 | extcon_data->debounce_jiffies = | ||
108 | msecs_to_jiffies(pdata->debounce); | ||
109 | } | ||
104 | 110 | ||
105 | ret = extcon_dev_register(&extcon_data->edev, &pdev->dev); | 111 | ret = extcon_dev_register(&extcon_data->edev, &pdev->dev); |
106 | if (ret < 0) | 112 | if (ret < 0) |