1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2024 Nuvoton Technology Corp.
5 * Author: Shan-Chun Hung <schung@nuvoton.com>
6 * * Jacky Huang <ychuang3@nuvoton.com>
8 #ifndef __PINCTRL_MA35_H
9 #define __PINCTRL_MA35_H
11 #include <linux/pinctrl/pinconf-generic.h>
12 #include <linux/pinctrl/pinmux.h>
13 #include <linux/platform_device.h>
15 struct ma35_mux_desc
{
20 struct ma35_pin_data
{
23 struct ma35_mux_desc
*muxes
;
26 struct ma35_pinctrl_soc_info
{
27 const struct pinctrl_pin_desc
*pins
;
29 int (*get_pin_num
)(int offset
, int shift
);
32 #define MA35_PIN(num, n, o, s, ...) { \
35 .drv_data = &(struct ma35_pin_data) { \
38 .muxes = (struct ma35_mux_desc[]) { \
43 #define MA35_MUX(_val, _name) { \
48 int ma35_pinctrl_probe(struct platform_device
*pdev
, const struct ma35_pinctrl_soc_info
*info
);
49 int ma35_pinctrl_suspend(struct device
*dev
);
50 int ma35_pinctrl_resume(struct device
*dev
);
52 #endif /* __PINCTRL_MA35_H */