strip the kernel version suffix from target directories, except for brcm-2.4 (the...
[15.05/openwrt.git] / target / linux / amazon / files / include / asm-mips / amazon / port.h
1 /*
2  * ########################################################################
3  *
4  *  This program is free software; you can distribute it and/or modify it
5  *  under the terms of the GNU General Public License (Version 2) as
6  *  published by the Free Software Foundation.
7  *
8  *  This program is distributed in the hope it will be useful, but WITHOUT
9  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11  *  for more details.
12  *
13  *  You should have received a copy of the GNU General Public License along
14  *  with this program; if not, write to the Free Software Foundation, Inc.,
15  *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16  *
17  * ########################################################################
18  *
19  * port.h
20  *
21  * Global Amazon port driver header file
22  *
23  */
24
25 /* Modification history */
26 /* 21Jun2004    btxu    Generate from Inca_IP project */
27  
28
29 #ifndef PORT_H
30 #define PORT_H
31
32 struct amazon_port_ioctl_parm {
33         int port;
34         int pin;
35         int value;
36 };
37 #define AMAZON_PORT_IOC_MAGIC   0xbf
38 #define AMAZON_PORT_IOCOD       _IOW( AMAZON_PORT_IOC_MAGIC,0,struct amazon_port_ioctl_parm)
39 #define AMAZON_PORT_IOCPUDSEL   _IOW( AMAZON_PORT_IOC_MAGIC,1,struct amazon_port_ioctl_parm)
40 #define AMAZON_PORT_IOCPUDEN    _IOW( AMAZON_PORT_IOC_MAGIC,2,struct amazon_port_ioctl_parm)
41 #define AMAZON_PORT_IOCSTOFF    _IOW( AMAZON_PORT_IOC_MAGIC,3,struct amazon_port_ioctl_parm)
42 #define AMAZON_PORT_IOCDIR      _IOW( AMAZON_PORT_IOC_MAGIC,4,struct amazon_port_ioctl_parm)
43 #define AMAZON_PORT_IOCOUTPUT   _IOW( AMAZON_PORT_IOC_MAGIC,5,struct amazon_port_ioctl_parm)
44 #define AMAZON_PORT_IOCINPUT    _IOWR(AMAZON_PORT_IOC_MAGIC,6,struct amazon_port_ioctl_parm)
45 #define AMAZON_PORT_IOCALTSEL0  _IOW( AMAZON_PORT_IOC_MAGIC,7,struct amazon_port_ioctl_parm)
46 #define AMAZON_PORT_IOCALTSEL1  _IOW( AMAZON_PORT_IOC_MAGIC,8,struct amazon_port_ioctl_parm)
47
48 int amazon_port_reserve_pin(int port, int pin, int module_id);
49 int amazon_port_free_pin(int port, int pin, int module_id);
50 int amazon_port_set_open_drain(int port, int pin, int module_id);
51 int amazon_port_clear_open_drain(int port, int pin, int module_id);
52 int amazon_port_set_pudsel(int port, int pin, int module_id);
53 int amazon_port_clear_pudsel(int port, int pin, int module_id);
54 int amazon_port_set_puden(int port, int pin, int module_id);
55 int amazon_port_clear_puden(int port, int pin, int module_id);
56 int amazon_port_set_stoff(int port, int pin, int module_id);
57 int amazon_port_clear_stoff(int port, int pin, int module_id);
58 int amazon_port_set_dir_out(int port, int pin, int module_id);
59 int amazon_port_set_dir_in(int port, int pin, int module_id);
60 int amazon_port_set_output(int port, int pin, int module_id);
61 int amazon_port_clear_output(int port, int pin, int module_id);
62 int amazon_port_get_input(int port, int pin, int module_id);
63
64 int amazon_port_set_altsel0(int port, int pin, int module_id);
65 int amazon_port_clear_altsel0(int port, int pin, int module_id);
66 int amazon_port_set_altsel1(int port, int pin, int module_id);
67 int amazon_port_clear_altsel1(int port, int pin, int module_id);
68
69
70 #endif /* PORT_H */
71
72