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