mn88472.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Panasonic MN88472 DVB-T/T2/C demodulator driver
  3. *
  4. * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
  5. *
  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. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #ifndef MN88472_H
  17. #define MN88472_H
  18. #include <linux/dvb/frontend.h>
  19. /**
  20. * struct mn88472_config - Platform data for the mn88472 driver
  21. * @xtal: Clock frequency.
  22. * @ts_mode: TS mode.
  23. * @ts_clock: TS clock config.
  24. * @i2c_wr_max: Max number of bytes driver writes to I2C at once.
  25. * @get_dvb_frontend: Get DVB frontend.
  26. */
  27. /* Define old names for backward compatibility */
  28. #define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE
  29. #define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED
  30. #define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL
  31. #define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL
  32. struct mn88472_config {
  33. unsigned int xtal;
  34. #define MN88472_TS_MODE_SERIAL 0
  35. #define MN88472_TS_MODE_PARALLEL 1
  36. int ts_mode;
  37. #define MN88472_TS_CLK_FIXED 0
  38. #define MN88472_TS_CLK_VARIABLE 1
  39. int ts_clock;
  40. u16 i2c_wr_max;
  41. /* Everything after that is returned by the driver. */
  42. /*
  43. * DVB frontend.
  44. */
  45. struct dvb_frontend **fe;
  46. struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
  47. };
  48. #endif