mxl111sf-gpio.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * mxl111sf-gpio.h - driver for the MaxLinear MXL111SF
  3. *
  4. * Copyright (C) 2010-2014 Michael Krufky <mkrufky@linuxtv.org>
  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 _DVB_USB_MXL111SF_GPIO_H_
  17. #define _DVB_USB_MXL111SF_GPIO_H_
  18. #include "mxl111sf.h"
  19. int mxl111sf_set_gpio(struct mxl111sf_state *state, int gpio, int val);
  20. int mxl111sf_init_port_expander(struct mxl111sf_state *state);
  21. #define MXL111SF_GPIO_MOD_DVBT 0
  22. #define MXL111SF_GPIO_MOD_MH 1
  23. #define MXL111SF_GPIO_MOD_ATSC 2
  24. int mxl111sf_gpio_mode_switch(struct mxl111sf_state *state, unsigned int mode);
  25. enum mxl111sf_mux_config {
  26. PIN_MUX_DEFAULT = 0,
  27. PIN_MUX_TS_OUT_PARALLEL,
  28. PIN_MUX_TS_OUT_SERIAL,
  29. PIN_MUX_GPIO_MODE,
  30. PIN_MUX_TS_SERIAL_IN_MODE_0,
  31. PIN_MUX_TS_SERIAL_IN_MODE_1,
  32. PIN_MUX_TS_SPI_IN_MODE_0,
  33. PIN_MUX_TS_SPI_IN_MODE_1,
  34. PIN_MUX_TS_PARALLEL_IN,
  35. PIN_MUX_BT656_I2S_MODE,
  36. };
  37. int mxl111sf_config_pin_mux_modes(struct mxl111sf_state *state,
  38. enum mxl111sf_mux_config pin_mux_config);
  39. #endif /* _DVB_USB_MXL111SF_GPIO_H_ */