1
2
3
4
5
6
7
8#ifndef __PINCTRL_MOORE_H
9#define __PINCTRL_MOORE_H
10
11#include <linux/io.h>
12#include <linux/init.h>
13#include <linux/of.h>
14#include <linux/of_platform.h>
15#include <linux/platform_device.h>
16#include <linux/pinctrl/pinctrl.h>
17#include <linux/pinctrl/pinmux.h>
18#include <linux/pinctrl/pinconf.h>
19#include <linux/pinctrl/pinconf-generic.h>
20
21#include "../core.h"
22#include "../pinconf.h"
23#include "../pinmux.h"
24#include "mtk-eint.h"
25#include "pinctrl-mtk-common-v2.h"
26
27#define MTK_RANGE(_a) { .range = (_a), .nranges = ARRAY_SIZE(_a), }
28
29#define MTK_PIN(_number, _name, _eint_m, _eint_n, _drv_n) { \
30 .number = _number, \
31 .name = _name, \
32 .eint = { \
33 .eint_m = _eint_m, \
34 .eint_n = _eint_n, \
35 }, \
36 .drv_n = _drv_n, \
37 .funcs = NULL, \
38 }
39
40#define PINCTRL_PIN_GROUP(name, id) \
41 { \
42 name, \
43 id##_pins, \
44 ARRAY_SIZE(id##_pins), \
45 id##_funcs, \
46 }
47
48int mtk_moore_pinctrl_probe(struct platform_device *pdev,
49 const struct mtk_pin_soc *soc);
50
51#endif
52