1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Marvell Berlin SoC pinctrl driver.
5 * Copyright (C) 2014 Marvell Technology Group Ltd.
7 * Antoine Ténart <antoine.tenart@free-electrons.com>
10 #ifndef __PINCTRL_BERLIN_H
11 #define __PINCTRL_BERLIN_H
13 struct berlin_desc_function {
18 struct berlin_desc_group {
23 struct berlin_desc_function *functions;
26 struct berlin_pinctrl_desc {
27 const struct berlin_desc_group *groups;
31 struct berlin_pinctrl_function {
37 #define BERLIN_PINCTRL_GROUP(_name, _offset, _width, _lsb, ...) \
41 .bit_width = _width, \
43 .functions = (struct berlin_desc_function[]){ \
47 #define BERLIN_PINCTRL_FUNCTION(_muxval, _name) \
53 #define BERLIN_PINCTRL_FUNCTION_UNKNOWN {}
55 int berlin_pinctrl_probe(struct platform_device *pdev,
56 const struct berlin_pinctrl_desc *desc);
58 int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
59 const struct berlin_pinctrl_desc *desc,
60 struct regmap *regmap);
62 #endif /* __PINCTRL_BERLIN_H */