Lines Matching refs:input
79 struct ddb_input *input = fe->sec_priv; in max_send_master_cmd() local
80 struct ddb_port *port = input->port; in max_send_master_cmd()
82 struct ddb_dvb *dvb = &port->dvb[input->nr & 1]; in max_send_master_cmd()
93 ddbwritel(dev, 0, tag | LNB_BUF_LEVEL(dvb->input)); in max_send_master_cmd()
95 ddbwritel(dev, cmd->msg[i], tag | LNB_BUF_WRITE(dvb->input)); in max_send_master_cmd()
96 lnb_command(dev, port->lnr, dvb->input, LNB_CMD_DISEQC); in max_send_master_cmd()
101 static int lnb_send_diseqc(struct ddb *dev, u32 link, u32 input, in lnb_send_diseqc() argument
107 ddbwritel(dev, 0, tag | LNB_BUF_LEVEL(input)); in lnb_send_diseqc()
109 ddbwritel(dev, cmd->msg[i], tag | LNB_BUF_WRITE(input)); in lnb_send_diseqc()
110 lnb_command(dev, link, input, LNB_CMD_DISEQC); in lnb_send_diseqc()
114 static int lnb_set_sat(struct ddb *dev, u32 link, u32 input, u32 sat, u32 band, in lnb_set_sat() argument
123 return lnb_send_diseqc(dev, link, input, &cmd); in lnb_set_sat()
126 static int lnb_set_tone(struct ddb *dev, u32 link, u32 input, in lnb_set_tone() argument
130 u32 mask = (1ULL << input); in lnb_set_tone()
136 dev->link[link].lnb.tone &= ~(1ULL << input); in lnb_set_tone()
141 dev->link[link].lnb.tone |= (1ULL << input); in lnb_set_tone()
148 s = lnb_command(dev, link, input, LNB_CMD_NOP); in lnb_set_tone()
152 static int lnb_set_voltage(struct ddb *dev, u32 link, u32 input, in lnb_set_voltage() argument
157 if (dev->link[link].lnb.oldvoltage[input] == voltage) in lnb_set_voltage()
161 if (dev->link[link].lnb.voltage[input]) in lnb_set_voltage()
163 lnb_command(dev, link, input, LNB_CMD_OFF); in lnb_set_voltage()
166 lnb_command(dev, link, input, LNB_CMD_LOW); in lnb_set_voltage()
169 lnb_command(dev, link, input, LNB_CMD_HIGH); in lnb_set_voltage()
175 dev->link[link].lnb.oldvoltage[input] = voltage; in lnb_set_voltage()
181 struct ddb_input *input = fe->sec_priv; in max_set_input_unlocked() local
182 struct ddb_port *port = input->port; in max_set_input_unlocked()
184 struct ddb_dvb *dvb = &port->dvb[input->nr & 1]; in max_set_input_unlocked()
189 if (dvb->input != in) { in max_set_input_unlocked()
190 u32 bit = (1ULL << input->nr); in max_set_input_unlocked()
192 dev->link[port->lnr].lnb.voltage[dvb->input & 3] & bit; in max_set_input_unlocked()
194 dev->link[port->lnr].lnb.voltage[dvb->input & 3] &= ~bit; in max_set_input_unlocked()
195 dvb->input = in; in max_set_input_unlocked()
196 dev->link[port->lnr].lnb.voltage[dvb->input & 3] |= obit; in max_set_input_unlocked()
204 struct ddb_input *input = fe->sec_priv; in max_set_tone() local
205 struct ddb_port *port = input->port; in max_set_tone()
207 struct ddb_dvb *dvb = &port->dvb[input->nr & 1]; in max_set_tone()
218 res = lnb_set_tone(dev, port->lnr, dvb->input, tone); in max_set_tone()
242 struct ddb_input *input = fe->sec_priv; in max_set_voltage() local
243 struct ddb_port *port = input->port; in max_set_voltage()
245 struct ddb_dvb *dvb = &port->dvb[input->nr & 1]; in max_set_voltage()
261 dev->link[port->lnr].lnb.voltage[dvb->input] &= in max_set_voltage()
262 ~(1ULL << input->nr); in max_set_voltage()
264 dev->link[port->lnr].lnb.voltage[dvb->input] |= in max_set_voltage()
265 (1ULL << input->nr); in max_set_voltage()
267 res = lnb_set_voltage(dev, port->lnr, dvb->input, voltage); in max_set_voltage()
273 ~(1ULL << input->nr); in max_set_voltage()
276 (1ULL << input->nr); in max_set_voltage()
408 int ddb_fe_attach_mxl5xx(struct ddb_input *input) in ddb_fe_attach_mxl5xx() argument
410 struct ddb *dev = input->port->dev; in ddb_fe_attach_mxl5xx()
411 struct i2c_adapter *i2c = &input->port->i2c->adap; in ddb_fe_attach_mxl5xx()
412 struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1]; in ddb_fe_attach_mxl5xx()
413 struct ddb_port *port = input->port; in ddb_fe_attach_mxl5xx()
422 demod = input->nr; in ddb_fe_attach_mxl5xx()
440 if (input->nr < 4) { in ddb_fe_attach_mxl5xx()
441 lnb_command(dev, port->lnr, input->nr, LNB_CMD_INIT); in ddb_fe_attach_mxl5xx()
442 lnb_set_voltage(dev, port->lnr, input->nr, SEC_VOLTAGE_OFF); in ddb_fe_attach_mxl5xx()
452 dvb->fe->sec_priv = input; in ddb_fe_attach_mxl5xx()
453 dvb->input = tuner; in ddb_fe_attach_mxl5xx()
460 int ddb_fe_attach_mci(struct ddb_input *input, u32 type) in ddb_fe_attach_mci() argument
462 struct ddb *dev = input->port->dev; in ddb_fe_attach_mci()
463 struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1]; in ddb_fe_attach_mci()
464 struct ddb_port *port = input->port; in ddb_fe_attach_mci()
469 demod = input->nr; in ddb_fe_attach_mci()
480 dvb->fe = ddb_mci_attach(input, &cfg, demod, &dvb->set_input); in ddb_fe_attach_mci()
489 if (input->nr < 4) { in ddb_fe_attach_mci()
490 lnb_command(dev, port->lnr, input->nr, LNB_CMD_INIT); in ddb_fe_attach_mci()
491 lnb_set_voltage(dev, port->lnr, input->nr, SEC_VOLTAGE_OFF); in ddb_fe_attach_mci()
501 dvb->fe->sec_priv = input; in ddb_fe_attach_mci()
502 dvb->input = tuner; in ddb_fe_attach_mci()