cx88-vp3054-i2c.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. cx88-vp3054-i2c.h -- support for the secondary I2C bus of the
  3. DNTV Live! DVB-T Pro (VP-3054), wired as:
  4. GPIO[0] -> SCL, GPIO[1] -> SDA
  5. (c) 2005 Chris Pascoe <c.pascoe@itee.uq.edu.au>
  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. /* ----------------------------------------------------------------------- */
  19. struct vp3054_i2c_state {
  20. struct i2c_adapter adap;
  21. struct i2c_algo_bit_data algo;
  22. u32 state;
  23. };
  24. /* ----------------------------------------------------------------------- */
  25. #if IS_ENABLED(CONFIG_VIDEO_CX88_VP3054)
  26. int vp3054_i2c_probe(struct cx8802_dev *dev);
  27. void vp3054_i2c_remove(struct cx8802_dev *dev);
  28. #else
  29. static inline int vp3054_i2c_probe(struct cx8802_dev *dev)
  30. { return 0; }
  31. static inline void vp3054_i2c_remove(struct cx8802_dev *dev)
  32. { }
  33. #endif