Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 *  Copyright (C) 2012 John Crispin <john@phrozen.org>
 
 
 
 
 4 */
 5
 6#ifndef _RT288X_PINMUX_H__
 7#define _RT288X_PINMUX_H__
 8
 9#define FUNC(name, value, pin_first, pin_count) \
10	{ name, value, pin_first, pin_count }
11
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) }
16
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) }
21
22struct rt2880_pmx_group;
23
24struct rt2880_pmx_func {
25	const char *name;
26	const char value;
27
28	int pin_first;
29	int pin_count;
30	int *pins;
31
32	int *groups;
33	int group_count;
34
35	int enabled;
36};
37
38struct rt2880_pmx_group {
39	const char *name;
40	int enabled;
41
42	const u32 shift;
43	const char mask;
44	const char gpio;
45
46	struct rt2880_pmx_func *func;
47	int func_count;
48};
49
50extern struct rt2880_pmx_group *rt2880_pinmux_data;
51
52#endif
v4.6
 
 1/*
 2 *  This program is free software; you can redistribute it and/or modify
 3 *  it under the terms of the GNU General Public License version 2 as
 4 *  publishhed by the Free Software Foundation.
 5 *
 6 *  Copyright (C) 2012 John Crispin <blogic@openwrt.org>
 7 */
 8
 9#ifndef _RT288X_PINMUX_H__
10#define _RT288X_PINMUX_H__
11
12#define FUNC(name, value, pin_first, pin_count) \
13	{ name, value, pin_first, pin_count }
14
15#define GRP(_name, _func, _mask, _shift) \
16	{ .name = _name, .mask = _mask, .shift = _shift, \
17	  .func = _func, .gpio = _mask, \
18	  .func_count = ARRAY_SIZE(_func) }
19
20#define GRP_G(_name, _func, _mask, _gpio, _shift) \
21	{ .name = _name, .mask = _mask, .shift = _shift, \
22	  .func = _func, .gpio = _gpio, \
23	  .func_count = ARRAY_SIZE(_func) }
24
25struct rt2880_pmx_group;
26
27struct rt2880_pmx_func {
28	const char *name;
29	const char value;
30
31	int pin_first;
32	int pin_count;
33	int *pins;
34
35	int *groups;
36	int group_count;
37
38	int enabled;
39};
40
41struct rt2880_pmx_group {
42	const char *name;
43	int enabled;
44
45	const u32 shift;
46	const char mask;
47	const char gpio;
48
49	struct rt2880_pmx_func *func;
50	int func_count;
51};
52
53extern struct rt2880_pmx_group *rt2880_pinmux_data;
54
55#endif