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