pinctrl: mvebu: kirkwood: provide generic mpp callbacks
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Fri, 31 Jan 2014 00:32:42 +0000 (01:32 +0100)
committerSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tue, 25 Feb 2014 17:35:30 +0000 (18:35 +0100)
We want to get rid of passing register addresses to common pinctrl
driver, so provide set/get callbacks that use generic mpp pins helper
and will be used later.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
drivers/pinctrl/mvebu/pinctrl-kirkwood.c

index 6b504b5935a5ec75ecff507a0717e82af4b72982..f9c68f1c636d50ddb6f92c0215c81ddbffe6be21 100644 (file)
 
 #include "pinctrl-mvebu.h"
 
+static void __iomem *mpp_base;
+
+static int kirkwood_mpp_ctrl_get(unsigned pid, unsigned long *config)
+{
+       return default_mpp_ctrl_get(mpp_base, pid, config);
+}
+
+static int kirkwood_mpp_ctrl_set(unsigned pid, unsigned long config)
+{
+       return default_mpp_ctrl_set(mpp_base, pid, config);
+}
+
 #define V(f6180, f6190, f6192, f6281, f6282, dx4122)   \
        ((f6180 << 0) | (f6190 << 1) | (f6192 << 2) |   \
         (f6281 << 3) | (f6282 << 4) | (dx4122 << 5))