Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / pinctrl / berlin / berlin.h
blob231aab61d4156ed248aa9f053e493ab4d3169581
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Marvell Berlin SoC pinctrl driver.
5 * Copyright (C) 2014 Marvell Technology Group Ltd.
7 * Antoine Ténart <antoine.tenart@free-electrons.com>
8 */
10 #ifndef __PINCTRL_BERLIN_H
11 #define __PINCTRL_BERLIN_H
13 struct berlin_desc_function {
14 const char *name;
15 u8 muxval;
18 struct berlin_desc_group {
19 const char *name;
20 u8 offset;
21 u8 bit_width;
22 u8 lsb;
23 struct berlin_desc_function *functions;
26 struct berlin_pinctrl_desc {
27 const struct berlin_desc_group *groups;
28 unsigned ngroups;
31 #define BERLIN_PINCTRL_GROUP(_name, _offset, _width, _lsb, ...) \
32 { \
33 .name = _name, \
34 .offset = _offset, \
35 .bit_width = _width, \
36 .lsb = _lsb, \
37 .functions = (struct berlin_desc_function[]){ \
38 __VA_ARGS__, { } }, \
41 #define BERLIN_PINCTRL_FUNCTION(_muxval, _name) \
42 { \
43 .name = _name, \
44 .muxval = _muxval, \
47 #define BERLIN_PINCTRL_FUNCTION_UNKNOWN {}
49 int berlin_pinctrl_probe(struct platform_device *pdev,
50 const struct berlin_pinctrl_desc *desc);
52 int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
53 const struct berlin_pinctrl_desc *desc,
54 struct regmap *regmap);
56 #endif /* __PINCTRL_BERLIN_H */