2 * arch/arm/plat-spear/include/plat/padmux.h
4 * SPEAr platform specific gpio pads muxing file
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
14 #ifndef __PLAT_PADMUX_H
15 #define __PLAT_PADMUX_H
17 #include <linux/types.h>
20 * struct pmx_reg: configuration structure for mode reg and mux reg
22 * offset: offset of mode reg
23 * mask: mask of mode reg
31 * struct pmx_dev_mode: configuration structure every group of modes of a device
33 * ids: all modes for this configuration
34 * mask: mask for supported mode
42 * struct pmx_mode: mode definition structure
54 * struct pmx_dev: device definition structure
57 * modes: device configuration array for different modes supported
58 * mode_count: size of modes array
59 * is_active: is peripheral active/enabled
60 * enb_on_reset: if 1, mask bits to be cleared in reg otherwise to be set in reg
64 struct pmx_dev_mode
*modes
;
71 * struct pmx_driver: driver definition structure
73 * mode: mode to be set
74 * devs: array of pointer to pmx devices
75 * devs_count: ARRAY_SIZE of devs
76 * base: base address of soc config registers
77 * mode_reg: structure of mode config register
78 * mux_reg: structure of device mux config register
81 struct pmx_mode
*mode
;
82 struct pmx_dev
**devs
;
85 struct pmx_reg mode_reg
;
86 struct pmx_reg mux_reg
;
90 int pmx_register(struct pmx_driver
*driver
);
92 #endif /* __PLAT_PADMUX_H */