via-core.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #ifndef __VIA_CORE_H__
  23. #define __VIA_CORE_H__
  24. /*
  25. * A description of each known serial I2C/GPIO port.
  26. */
  27. enum via_port_type {
  28. VIA_PORT_NONE = 0,
  29. VIA_PORT_I2C,
  30. VIA_PORT_GPIO,
  31. };
  32. enum via_port_mode {
  33. VIA_MODE_OFF = 0,
  34. VIA_MODE_I2C, /* Used as I2C port */
  35. VIA_MODE_GPIO, /* Two GPIO ports */
  36. };
  37. enum viafb_i2c_adap {
  38. VIA_PORT_26 = 0,
  39. VIA_PORT_31,
  40. VIA_PORT_25,
  41. VIA_PORT_2C,
  42. VIA_PORT_3D,
  43. };
  44. #define VIAFB_NUM_PORTS 5
  45. struct via_port_cfg {
  46. enum via_port_type type;
  47. enum via_port_mode mode;
  48. u_int16_t io_port;
  49. u_int8_t ioport_index;
  50. };
  51. #endif /* __VIA_CORE_H__ */