-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPS: ralink: cleanup the soc specific pinmux data
Before we had a pinctrl driver we used a custom OF api. This patch converts the soc specific pinmux data to a new set of structs. We also add some new pinmux setings. Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/8009/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
- Loading branch information
John Crispin
authored and
Ralf Baechle
committed
Nov 24, 2014
1 parent
4248f7f
commit f576fb6
Showing
10 changed files
with
294 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* publishhed by the Free Software Foundation. | ||
* | ||
* Copyright (C) 2012 John Crispin <blogic@openwrt.org> | ||
*/ | ||
|
||
#ifndef _RT288X_PINMUX_H__ | ||
#define _RT288X_PINMUX_H__ | ||
|
||
#define FUNC(name, value, pin_first, pin_count) \ | ||
{ name, value, pin_first, pin_count } | ||
|
||
#define GRP(_name, _func, _mask, _shift) \ | ||
{ .name = _name, .mask = _mask, .shift = _shift, \ | ||
.func = _func, .gpio = _mask, \ | ||
.func_count = ARRAY_SIZE(_func) } | ||
|
||
#define GRP_G(_name, _func, _mask, _gpio, _shift) \ | ||
{ .name = _name, .mask = _mask, .shift = _shift, \ | ||
.func = _func, .gpio = _gpio, \ | ||
.func_count = ARRAY_SIZE(_func) } | ||
|
||
struct rt2880_pmx_group; | ||
|
||
struct rt2880_pmx_func { | ||
const char *name; | ||
const char value; | ||
|
||
int pin_first; | ||
int pin_count; | ||
int *pins; | ||
|
||
int *groups; | ||
int group_count; | ||
|
||
int enabled; | ||
}; | ||
|
||
struct rt2880_pmx_group { | ||
const char *name; | ||
int enabled; | ||
|
||
const u32 shift; | ||
const char mask; | ||
const char gpio; | ||
|
||
struct rt2880_pmx_func *func; | ||
int func_count; | ||
}; | ||
|
||
extern struct rt2880_pmx_group *rt2880_pinmux_data; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.