Jonathan Corbet | f045f77 | 2009-12-01 20:29:39 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 1998-2009 VIA Technologies, Inc. All Rights Reserved. |
| 3 | * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. |
| 4 | * Copyright 2009 Jonathan Corbet <corbet@lwn.net> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public |
| 8 | * License as published by the Free Software Foundation; |
| 9 | * either version 2, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even |
| 13 | * the implied warranty of MERCHANTABILITY or FITNESS FOR |
| 14 | * A PARTICULAR PURPOSE.See the GNU General Public License |
| 15 | * for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., |
| 20 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 21 | */ |
| 22 | |
| 23 | #ifndef __VIA_CORE_H__ |
| 24 | #define __VIA_CORE_H__ |
| 25 | /* |
| 26 | * A description of each known serial I2C/GPIO port. |
| 27 | */ |
| 28 | enum via_port_type { |
| 29 | VIA_PORT_NONE = 0, |
| 30 | VIA_PORT_I2C, |
| 31 | VIA_PORT_GPIO, |
| 32 | }; |
| 33 | |
| 34 | enum via_port_mode { |
| 35 | VIA_MODE_OFF = 0, |
| 36 | VIA_MODE_I2C, /* Used as I2C port */ |
| 37 | VIA_MODE_GPIO, /* Two GPIO ports */ |
| 38 | }; |
| 39 | |
| 40 | enum viafb_i2c_adap { |
| 41 | VIA_PORT_26 = 0, |
| 42 | VIA_PORT_31, |
| 43 | VIA_PORT_25, |
| 44 | VIA_PORT_2C, |
| 45 | VIA_PORT_3D, |
| 46 | }; |
| 47 | #define VIAFB_NUM_PORTS 5 |
| 48 | |
| 49 | struct via_port_cfg { |
| 50 | enum via_port_type type; |
| 51 | enum via_port_mode mode; |
| 52 | u_int16_t io_port; |
| 53 | u_int8_t ioport_index; |
| 54 | }; |
| 55 | #endif /* __VIA_CORE_H__ */ |