1786baecfSMauro Carvalho Chehab /* 2786baecfSMauro Carvalho Chehab * mxl111sf-gpio.h - driver for the MaxLinear MXL111SF 3786baecfSMauro Carvalho Chehab * 408e10972SMichael Krufky * Copyright (C) 2010-2014 Michael Krufky <mkrufky@linuxtv.org> 5786baecfSMauro Carvalho Chehab * 6786baecfSMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify 7786baecfSMauro Carvalho Chehab * it under the terms of the GNU General Public License as published by 8786baecfSMauro Carvalho Chehab * the Free Software Foundation; either version 2 of the License, or 9786baecfSMauro Carvalho Chehab * (at your option) any later version. 10786baecfSMauro Carvalho Chehab * 11786baecfSMauro Carvalho Chehab * This program is distributed in the hope that it will be useful, 12786baecfSMauro Carvalho Chehab * but WITHOUT ANY WARRANTY; without even the implied warranty of 13786baecfSMauro Carvalho Chehab * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14786baecfSMauro Carvalho Chehab * GNU General Public License for more details. 15786baecfSMauro Carvalho Chehab * 16786baecfSMauro Carvalho Chehab * You should have received a copy of the GNU General Public License 17786baecfSMauro Carvalho Chehab * along with this program; if not, write to the Free Software 18786baecfSMauro Carvalho Chehab * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19786baecfSMauro Carvalho Chehab */ 20786baecfSMauro Carvalho Chehab 21786baecfSMauro Carvalho Chehab #ifndef _DVB_USB_MXL111SF_GPIO_H_ 22786baecfSMauro Carvalho Chehab #define _DVB_USB_MXL111SF_GPIO_H_ 23786baecfSMauro Carvalho Chehab 24786baecfSMauro Carvalho Chehab #include "mxl111sf.h" 25786baecfSMauro Carvalho Chehab 26786baecfSMauro Carvalho Chehab int mxl111sf_set_gpio(struct mxl111sf_state *state, int gpio, int val); 27786baecfSMauro Carvalho Chehab int mxl111sf_init_port_expander(struct mxl111sf_state *state); 28786baecfSMauro Carvalho Chehab 29786baecfSMauro Carvalho Chehab #define MXL111SF_GPIO_MOD_DVBT 0 30786baecfSMauro Carvalho Chehab #define MXL111SF_GPIO_MOD_MH 1 31786baecfSMauro Carvalho Chehab #define MXL111SF_GPIO_MOD_ATSC 2 32786baecfSMauro Carvalho Chehab int mxl111sf_gpio_mode_switch(struct mxl111sf_state *state, unsigned int mode); 33786baecfSMauro Carvalho Chehab 34786baecfSMauro Carvalho Chehab enum mxl111sf_mux_config { 35786baecfSMauro Carvalho Chehab PIN_MUX_DEFAULT = 0, 36786baecfSMauro Carvalho Chehab PIN_MUX_TS_OUT_PARALLEL, 37786baecfSMauro Carvalho Chehab PIN_MUX_TS_OUT_SERIAL, 38786baecfSMauro Carvalho Chehab PIN_MUX_GPIO_MODE, 39786baecfSMauro Carvalho Chehab PIN_MUX_TS_SERIAL_IN_MODE_0, 40786baecfSMauro Carvalho Chehab PIN_MUX_TS_SERIAL_IN_MODE_1, 41786baecfSMauro Carvalho Chehab PIN_MUX_TS_SPI_IN_MODE_0, 42786baecfSMauro Carvalho Chehab PIN_MUX_TS_SPI_IN_MODE_1, 43786baecfSMauro Carvalho Chehab PIN_MUX_TS_PARALLEL_IN, 44786baecfSMauro Carvalho Chehab PIN_MUX_BT656_I2S_MODE, 45786baecfSMauro Carvalho Chehab }; 46786baecfSMauro Carvalho Chehab 47786baecfSMauro Carvalho Chehab int mxl111sf_config_pin_mux_modes(struct mxl111sf_state *state, 48786baecfSMauro Carvalho Chehab enum mxl111sf_mux_config pin_mux_config); 49786baecfSMauro Carvalho Chehab 50786baecfSMauro Carvalho Chehab #endif /* _DVB_USB_MXL111SF_GPIO_H_ */ 51786baecfSMauro Carvalho Chehab 52786baecfSMauro Carvalho Chehab /* 53786baecfSMauro Carvalho Chehab * Local variables: 54786baecfSMauro Carvalho Chehab * c-basic-offset: 8 55786baecfSMauro Carvalho Chehab * End: 56786baecfSMauro Carvalho Chehab */ 57