Linus Walleij | bd41b99 | 2009-04-23 21:15:04 +0100 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * arch/arm/mach-u300/padmux.h |
| 4 | * |
| 5 | * |
| 6 | * Copyright (C) 2009 ST-Ericsson AB |
| 7 | * License terms: GNU General Public License (GPL) version 2 |
| 8 | * U300 PADMUX API |
Linus Walleij | df1e052 | 2009-08-10 12:52:40 +0100 | [diff] [blame] | 9 | * Author: Martin Persson <martin.persson@stericsson.com> |
Linus Walleij | bd41b99 | 2009-04-23 21:15:04 +0100 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #ifndef __MACH_U300_PADMUX_H |
| 13 | #define __MACH_U300_PADMUX_H |
| 14 | |
Linus Walleij | df1e052 | 2009-08-10 12:52:40 +0100 | [diff] [blame] | 15 | enum pmx_settings { |
| 16 | U300_APP_PMX_MMC_SETTING, |
| 17 | U300_APP_PMX_SPI_SETTING |
| 18 | }; |
| 19 | |
| 20 | struct pmx_onmask { |
| 21 | u16 mask; /* Mask bits */ |
| 22 | u16 val; /* Value when active */ |
| 23 | }; |
| 24 | |
| 25 | struct pmx { |
| 26 | struct device *dev; |
| 27 | enum pmx_settings setting; |
| 28 | char *name; |
| 29 | bool activated; |
| 30 | bool default_on; |
| 31 | struct pmx_onmask onmask[]; |
| 32 | }; |
| 33 | |
| 34 | struct pmx *pmx_get(struct device *dev, enum pmx_settings setting); |
| 35 | int pmx_put(struct device *dev, struct pmx *pmx); |
| 36 | int pmx_activate(struct device *dev, struct pmx *pmx); |
| 37 | int pmx_deactivate(struct device *dev, struct pmx *pmx); |
Linus Walleij | bd41b99 | 2009-04-23 21:15:04 +0100 | [diff] [blame] | 38 | |
| 39 | #endif |