aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/gpio.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-10 10:29:14 -0400
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 08:33:53 -0400
commit861601de101215494e2cc7918e8633d63da490ef (patch)
tree0ce5977e81126ac3caead1ca1053cd8ec8fe818e /drivers/pinctrl/sh-pfc/gpio.c
parent1a0039dce269317a843d4fc85c4a3430b484bc2d (diff)
sh-pfc: Remove configuration dry-run and free
The purpose of the dry-run is to ensure that a pin about to be configured isn't in use. However, the current implementation is a no-op. This proves that the dry-run isn't essential. Remove it. Freeing configuration then becomes a no-op as well. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index ce074b22f426..761a0dad0450 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -285,10 +285,7 @@ static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
285 285
286 spin_lock_irqsave(&pfc->lock, flags); 286 spin_lock_irqsave(&pfc->lock, flags);
287 287
288 if (sh_pfc_config_mux(pfc, mark, PINMUX_TYPE_FUNCTION, GPIO_CFG_DRYRUN)) 288 if (sh_pfc_config_mux(pfc, mark, PINMUX_TYPE_FUNCTION))
289 goto done;
290
291 if (sh_pfc_config_mux(pfc, mark, PINMUX_TYPE_FUNCTION, GPIO_CFG_REQ))
292 goto done; 289 goto done;
293 290
294 ret = 0; 291 ret = 0;
@@ -300,15 +297,6 @@ done:
300 297
301static void gpio_function_free(struct gpio_chip *gc, unsigned offset) 298static void gpio_function_free(struct gpio_chip *gc, unsigned offset)
302{ 299{
303 struct sh_pfc *pfc = gpio_to_pfc(gc);
304 unsigned int mark = pfc->info->func_gpios[offset].enum_id;
305 unsigned long flags;
306
307 spin_lock_irqsave(&pfc->lock, flags);
308
309 sh_pfc_config_mux(pfc, mark, PINMUX_TYPE_FUNCTION, GPIO_CFG_FREE);
310
311 spin_unlock_irqrestore(&pfc->lock, flags);
312} 300}
313 301
314static int gpio_function_setup(struct sh_pfc_chip *chip) 302static int gpio_function_setup(struct sh_pfc_chip *chip)