netup-eeprom.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * netup-eeprom.h
  3. *
  4. * 24LC02 EEPROM driver in conjunction with NetUP Dual DVB-S2 CI card
  5. *
  6. * Copyright (C) 2009 NetUP Inc.
  7. * Copyright (C) 2009 Abylay Ospan <aospan@netup.ru>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. *
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. */
  24. #ifndef NETUP_EEPROM_H
  25. #define NETUP_EEPROM_H
  26. struct netup_port_info {
  27. u8 mac[6];/* card MAC address */
  28. };
  29. struct netup_card_info {
  30. struct netup_port_info port[2];/* ports - 1,2 */
  31. u8 rev;/* card revision */
  32. };
  33. extern int netup_eeprom_read(struct i2c_adapter *i2c_adap, u8 addr);
  34. extern int netup_eeprom_write(struct i2c_adapter *i2c_adap, u8 addr, u8 data);
  35. extern void netup_get_card_info(struct i2c_adapter *i2c_adap,
  36. struct netup_card_info *cinfo);
  37. #endif