Make filldir[64]() verify the directory entry filename is valid
[linux/fpc-iii.git] / drivers / pinctrl / meson / pinctrl-meson8-pmx.h
blob9390dc2f800fb1dbfc9bd10a39575312d0ff99c5
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * First generation of pinmux driver for Amlogic Meson SoCs
5 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
6 * Copyright (C) 2017 Jerome Brunet <jbrunet@baylibre.com>
7 */
9 struct meson8_pmx_data {
10 bool is_gpio;
11 unsigned int reg;
12 unsigned int bit;
15 #define PMX_DATA(r, b, g) \
16 { \
17 .reg = r, \
18 .bit = b, \
19 .is_gpio = g, \
22 #define GROUP(grp, r, b) \
23 { \
24 .name = #grp, \
25 .pins = grp ## _pins, \
26 .num_pins = ARRAY_SIZE(grp ## _pins), \
27 .data = (const struct meson8_pmx_data[]){ \
28 PMX_DATA(r, b, false), \
29 }, \
32 #define GPIO_GROUP(gpio) \
33 { \
34 .name = #gpio, \
35 .pins = (const unsigned int[]){ gpio }, \
36 .num_pins = 1, \
37 .data = (const struct meson8_pmx_data[]){ \
38 PMX_DATA(0, 0, true), \
39 }, \
42 extern const struct pinmux_ops meson8_pmx_ops;