treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / include / asm / mach-ralink / pinmux.h
blob048309348be084dcb7fc57da447604204f2956a8
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2012 John Crispin <john@phrozen.org>
4 */
6 #ifndef _RT288X_PINMUX_H__
7 #define _RT288X_PINMUX_H__
9 #define FUNC(name, value, pin_first, pin_count) \
10 { name, value, pin_first, pin_count }
12 #define GRP(_name, _func, _mask, _shift) \
13 { .name = _name, .mask = _mask, .shift = _shift, \
14 .func = _func, .gpio = _mask, \
15 .func_count = ARRAY_SIZE(_func) }
17 #define GRP_G(_name, _func, _mask, _gpio, _shift) \
18 { .name = _name, .mask = _mask, .shift = _shift, \
19 .func = _func, .gpio = _gpio, \
20 .func_count = ARRAY_SIZE(_func) }
22 struct rt2880_pmx_group;
24 struct rt2880_pmx_func {
25 const char *name;
26 const char value;
28 int pin_first;
29 int pin_count;
30 int *pins;
32 int *groups;
33 int group_count;
35 int enabled;
38 struct rt2880_pmx_group {
39 const char *name;
40 int enabled;
42 const u32 shift;
43 const char mask;
44 const char gpio;
46 struct rt2880_pmx_func *func;
47 int func_count;
50 extern struct rt2880_pmx_group *rt2880_pinmux_data;
52 #endif