1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2018 MediaTek Inc.
5 * Author: Sean Wang <sean.wang@mediatek.com>
6 * Zhiyong Tao <zhiyong.tao@mediatek.com>
7 * Hongzhou.Yang <hongzhou.yang@mediatek.com>
9 #ifndef __PINCTRL_PARIS_H
10 #define __PINCTRL_PARIS_H
13 #include <linux/init.h>
15 #include <linux/of_platform.h>
16 #include <linux/platform_device.h>
17 #include <linux/pinctrl/pinctrl.h>
18 #include <linux/pinctrl/pinmux.h>
19 #include <linux/pinctrl/pinconf.h>
20 #include <linux/pinctrl/pinconf-generic.h>
23 #include "../pinconf.h"
24 #include "../pinctrl-utils.h"
25 #include "../pinmux.h"
27 #include "pinctrl-mtk-common-v2.h"
29 #define MTK_RANGE(_a) { .range = (_a), .nranges = ARRAY_SIZE(_a), }
31 #define MTK_EINT_FUNCTION(_eintmux, _eintnum) \
37 #define MTK_FUNCTION(_val, _name) \
43 #define MTK_PIN(_number, _name, _eint, _drv_n, ...) { \
48 .funcs = (struct mtk_func_desc[]){ \
52 #define PINCTRL_PIN_GROUP(name, id) \
56 ARRAY_SIZE(id##_pins), \
60 int mtk_paris_pinctrl_probe(struct platform_device
*pdev
,
61 const struct mtk_pin_soc
*soc
);
63 ssize_t
mtk_pctrl_show_one_pin(struct mtk_pinctrl
*hw
,
64 unsigned int gpio
, char *buf
, unsigned int bufLen
);
66 extern const struct dev_pm_ops mtk_paris_pinctrl_pm_ops
;
68 #endif /* __PINCTRL_PARIS_H */