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 #define BCM_PIN_GROUP(n) PINCTRL_PINGROUP(#n, n##_pins, ARRAY_SIZE(n##_pins))
26 struct bcm63xx_pinctrl
{
30 struct pinctrl_desc pctl_desc
;
31 struct pinctrl_dev
*pctl_dev
;
36 static inline unsigned int bcm63xx_bank_pin(unsigned int pin
)
38 return pin
% BCM63XX_BANK_GPIOS
;
41 int bcm63xx_pinctrl_probe(struct platform_device
*pdev
,
42 const struct bcm63xx_pinctrl_soc
*soc
,
45 #endif /* __PINCTRL_BCM63XX_H__ */