mantis_vp3030.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. Mantis VP-3030 driver
  3. Copyright (C) 2005, 2006 Manu Abraham (abraham.manu@gmail.com)
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #include "mantis_common.h"
  17. #include "mantis_vp3030.h"
  18. struct zl10353_config mantis_vp3030_config = {
  19. .demod_address = 0x0f,
  20. };
  21. int panasonic_en57h12d5_set_params(struct dvb_frontend *fe,
  22. struct dvb_frontend_parameters *params)
  23. {
  24. u8 buf[4];
  25. int rc;
  26. struct mantis_pci *mantis = fe->dvb->priv;
  27. struct i2c_msg tuner_msg = {
  28. .addr = 0x60,
  29. .flags = 0,
  30. .buf = buf,
  31. .len = sizeof (buf)
  32. };
  33. if ((params->frequency < 950000) || (params->frequency > 2150000))
  34. return -EINVAL;
  35. rc = i2c_transfer(&mantis->adapter, &tuner_msg, 1);
  36. if (rc != 1) {
  37. printk("%s: I2C Transfer returned [%d]\n", __func__, rc);
  38. return -EIO;
  39. }
  40. msleep_interruptible(1);
  41. printk("%s: Send params to tuner ok!!!\n", __func__);
  42. return 0;
  43. }