Michael Krufky | 4c66c92 | 2011-08-29 00:05:35 -0300 | [diff] [blame] | 1 | /* |
| 2 | * mxl111sf-gpio.h - driver for the MaxLinear MXL111SF |
| 3 | * |
| 4 | * Copyright (C) 2010 Michael Krufky <mkrufky@kernellabs.com> |
| 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 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 19 | */ |
| 20 | |
| 21 | #ifndef _DVB_USB_MXL111SF_GPIO_H_ |
| 22 | #define _DVB_USB_MXL111SF_GPIO_H_ |
| 23 | |
| 24 | #include "mxl111sf.h" |
| 25 | |
| 26 | int mxl111sf_set_gpio(struct mxl111sf_state *state, int gpio, int val); |
| 27 | int mxl111sf_init_port_expander(struct mxl111sf_state *state); |
| 28 | |
| 29 | #define MXL111SF_GPIO_MOD_DVBT 0 |
| 30 | #define MXL111SF_GPIO_MOD_MH 1 |
| 31 | #define MXL111SF_GPIO_MOD_ATSC 2 |
| 32 | int mxl111sf_gpio_mode_switch(struct mxl111sf_state *state, unsigned int mode); |
| 33 | |
| 34 | enum mxl111sf_mux_config { |
| 35 | PIN_MUX_DEFAULT = 0, |
| 36 | PIN_MUX_TS_OUT_PARALLEL, |
| 37 | PIN_MUX_TS_OUT_SERIAL, |
| 38 | PIN_MUX_GPIO_MODE, |
| 39 | PIN_MUX_TS_SERIAL_IN_MODE_0, |
| 40 | PIN_MUX_TS_SERIAL_IN_MODE_1, |
| 41 | PIN_MUX_TS_SPI_IN_MODE_0, |
| 42 | PIN_MUX_TS_SPI_IN_MODE_1, |
| 43 | PIN_MUX_TS_PARALLEL_IN, |
| 44 | PIN_MUX_BT656_I2S_MODE, |
| 45 | }; |
| 46 | |
| 47 | int mxl111sf_config_pin_mux_modes(struct mxl111sf_state *state, |
| 48 | enum mxl111sf_mux_config pin_mux_config); |
| 49 | |
| 50 | #endif /* _DVB_USB_MXL111SF_GPIO_H_ */ |
| 51 | |
| 52 | /* |
| 53 | * Local variables: |
| 54 | * c-basic-offset: 8 |
| 55 | * End: |
| 56 | */ |