aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pinctrl/core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 3e969813154f..bcec05b5c67e 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -27,7 +27,11 @@
27#include <linux/pinctrl/consumer.h> 27#include <linux/pinctrl/consumer.h>
28#include <linux/pinctrl/pinctrl.h> 28#include <linux/pinctrl/pinctrl.h>
29#include <linux/pinctrl/machine.h> 29#include <linux/pinctrl/machine.h>
30
31#ifdef CONFIG_GPIOLIB
30#include <asm-generic/gpio.h> 32#include <asm-generic/gpio.h>
33#endif
34
31#include "core.h" 35#include "core.h"
32#include "devicetree.h" 36#include "devicetree.h"
33#include "pinmux.h" 37#include "pinmux.h"
@@ -290,6 +294,7 @@ pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, unsigned gpio)
290 * certain GPIO pin doesn't have back-end pinctrl device. If the return value 294 * certain GPIO pin doesn't have back-end pinctrl device. If the return value
291 * is false, it means that pinctrl device may not be ready. 295 * is false, it means that pinctrl device may not be ready.
292 */ 296 */
297#ifdef CONFIG_GPIOLIB
293static bool pinctrl_ready_for_gpio_range(unsigned gpio) 298static bool pinctrl_ready_for_gpio_range(unsigned gpio)
294{ 299{
295 struct pinctrl_dev *pctldev; 300 struct pinctrl_dev *pctldev;
@@ -309,6 +314,9 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio)
309 } 314 }
310 return false; 315 return false;
311} 316}
317#else
318static bool pinctrl_ready_for_gpio_range(unsigned gpio) { return true; }
319#endif
312 320
313/** 321/**
314 * pinctrl_get_device_gpio_range() - find device for GPIO range 322 * pinctrl_get_device_gpio_range() - find device for GPIO range