diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2009-08-10 07:52:40 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-08-15 10:36:28 -0400 |
commit | df1e0520f9434b5b771c854a13dd928727d8673a (patch) | |
tree | 5d48442a1c8e43122511fd0c73596ac3917f8483 /arch/arm/mach-u300/padmux.h | |
parent | 5ad73d07173e7b76c16bcb8b6cf64d8386019689 (diff) |
ARM: 5666/1: Revamped U300 padmux API
This abstracts the hackish padmux API on the U300 platform into
something more manageable. It provides a way for drivers to
activate/deactivate a certain padmux setting. It will also switch
the users of the old API over to using the new style, pushing
muxing into the apropriate setup files.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-u300/padmux.h')
-rw-r--r-- | arch/arm/mach-u300/padmux.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/arch/arm/mach-u300/padmux.h b/arch/arm/mach-u300/padmux.h index 8c2099ac5046..6e8b86064097 100644 --- a/arch/arm/mach-u300/padmux.h +++ b/arch/arm/mach-u300/padmux.h | |||
@@ -6,14 +6,34 @@ | |||
6 | * Copyright (C) 2009 ST-Ericsson AB | 6 | * Copyright (C) 2009 ST-Ericsson AB |
7 | * License terms: GNU General Public License (GPL) version 2 | 7 | * License terms: GNU General Public License (GPL) version 2 |
8 | * U300 PADMUX API | 8 | * U300 PADMUX API |
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Martin Persson <martin.persson@stericsson.com> |
10 | * | ||
11 | */ | 10 | */ |
12 | 11 | ||
13 | #ifndef __MACH_U300_PADMUX_H | 12 | #ifndef __MACH_U300_PADMUX_H |
14 | #define __MACH_U300_PADMUX_H | 13 | #define __MACH_U300_PADMUX_H |
15 | 14 | ||
16 | void pmx_set_mission_mode_mmc(void); | 15 | enum pmx_settings { |
17 | void pmx_set_mission_mode_spi(void); | 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); | ||
18 | 38 | ||
19 | #endif | 39 | #endif |