i2c-algo-pcf.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* ------------------------------------------------------------------------- */
  2. /* adap-pcf.h i2c driver algorithms for PCF8584 adapters */
  3. /* ------------------------------------------------------------------------- */
  4. /* Copyright (C) 1995-97 Simon G. Vogl
  5. 1998-99 Hans Berglund
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  17. /* ------------------------------------------------------------------------- */
  18. /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
  19. Frodo Looijaard <frodol@dds.nl> */
  20. /* $Id: i2c-algo-pcf.h,v 1.8 2003/01/21 08:08:16 kmalkki Exp $ */
  21. #ifndef _LINUX_I2C_ALGO_PCF_H
  22. #define _LINUX_I2C_ALGO_PCF_H
  23. struct i2c_algo_pcf_data {
  24. void *data; /* private data for lolevel routines */
  25. void (*setpcf) (void *data, int ctl, int val);
  26. int (*getpcf) (void *data, int ctl);
  27. int (*getown) (void *data);
  28. int (*getclock) (void *data);
  29. void (*waitforpin) (void);
  30. /* local settings */
  31. int udelay;
  32. int mdelay;
  33. int timeout;
  34. };
  35. #define I2C_PCF_ADAP_MAX 16
  36. int i2c_pcf_add_bus(struct i2c_adapter *);
  37. int i2c_pcf_del_bus(struct i2c_adapter *);
  38. #endif /* _LINUX_I2C_ALGO_PCF_H */