1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2021 Álvaro Fernández Rojas <noltari@gmail.com>
4 * Copyright (C) 2016 Jonas Gorski <jonas.gorski@gmail.com>
7 #ifndef __PINCTRL_BCM63XX_H__
8 #define __PINCTRL_BCM63XX_H__
10 #include <linux/pinctrl/pinctrl.h>
12 #define BCM63XX_BANK_GPIOS 32
14 struct bcm63xx_pinctrl_soc {
15 const struct pinctrl_ops *pctl_ops;
16 const struct pinmux_ops *pmx_ops;
18 const struct pinctrl_pin_desc *pins;
24 struct bcm63xx_pinctrl {
28 struct pinctrl_desc pctl_desc;
29 struct pinctrl_dev *pctl_dev;
34 static inline unsigned int bcm63xx_bank_pin(unsigned int pin)
36 return pin % BCM63XX_BANK_GPIOS;
39 int bcm63xx_pinctrl_probe(struct platform_device *pdev,
40 const struct bcm63xx_pinctrl_soc *soc,
43 #endif /* __PINCTRL_BCM63XX_H__ */