i2c-algo-pcf.h 1.9 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., 51 Franklin Street, Fifth Floor, Boston,
  17. MA 02110-1301 USA. */
  18. /* ------------------------------------------------------------------------- */
  19. /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
  20. Frodo Looijaard <frodol@dds.nl> */
  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 *data);
  30. void (*xfer_begin) (void *data);
  31. void (*xfer_end) (void *data);
  32. /* Multi-master lost arbitration back-off delay (msecs)
  33. * This should be set by the bus adapter or knowledgable client
  34. * if bus is multi-mastered, else zero
  35. */
  36. unsigned long lab_mdelay;
  37. };
  38. int i2c_pcf_add_bus(struct i2c_adapter *);
  39. #endif /* _LINUX_I2C_ALGO_PCF_H */