]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/blackfin/include/asm/portmux.h
blackfin: pinctrl-adi2: Enable PINCTRL framework for BF54x and BF60x.
[karo-tx-linux.git] / arch / blackfin / include / asm / portmux.h
index 9b1e2c37b324da406aa6587e65c5281deca522a6..7aa20436e7998a283a95e1a3a1a82351ce8ff9d6 100644 (file)
 #define P_MAYSHARE     0x2000
 #define P_DONTCARE     0x1000
 
-
+#ifdef CONFIG_PINCTRL
+#include <asm/irq_handler.h>
+
+#define gpio_pint_regs bfin_pint_regs
+#define adi_internal_set_wake bfin_internal_set_wake
+
+#define peripheral_request(per, label) 0
+#define peripheral_free(per)
+#define peripheral_request_list(per, label) \
+       (pdev ? (IS_ERR(devm_pinctrl_get_select_default(&pdev->dev)) \
+       ? -EINVAL : 0) : 0)
+#define peripheral_free_list(per)
+#else
 int peripheral_request(unsigned short per, const char *label);
 void peripheral_free(unsigned short per);
 int peripheral_request_list(const unsigned short per[], const char *label);
 void peripheral_free_list(const unsigned short per[]);
+#endif
 
-#include <asm/gpio.h>
+#include <linux/err.h>
+#include <linux/pinctrl/pinctrl.h>
 #include <mach/portmux.h>
+#include <linux/gpio.h>
 
 #ifndef P_SPORT2_TFS
 #define P_SPORT2_TFS P_UNDEF