Lines Matching refs:d
133 static int az6007_read(struct dvb_usb_device *d, u8 req, u16 value, in az6007_read() argument
136 struct az6007_device_state *st = d->priv; in az6007_read()
142 ret = __az6007_read(d->udev, req, value, index, b, blen); in az6007_read()
180 static int az6007_write(struct dvb_usb_device *d, u8 req, u16 value, in az6007_write() argument
183 struct az6007_device_state *st = d->priv; in az6007_write()
189 ret = __az6007_write(d->udev, req, value, index, b, blen); in az6007_write()
198 struct dvb_usb_device *d = fe_to_d(fe); in az6007_streaming_ctrl() local
202 return az6007_write(d, 0xbc, onoff, 0, NULL, 0); in az6007_streaming_ctrl()
207 static int az6007_rc_query(struct dvb_usb_device *d) in az6007_rc_query() argument
209 struct az6007_device_state *st = d_to_priv(d); in az6007_rc_query()
212 az6007_read(d, AZ6007_READ_IR, 0, 0, st->data, 10); in az6007_rc_query()
230 rc_keydown(d->rc_dev, RC_TYPE_NEC, code, st->data[5]); in az6007_rc_query()
235 static int az6007_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) in az6007_get_rc_config() argument
253 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in az6007_ci_read_attribute_mem() local
254 struct az6007_device_state *state = d_to_priv(d); in az6007_ci_read_attribute_mem()
277 ret = az6007_read(d, req, value, index, b, blen); in az6007_ci_read_attribute_mem()
295 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in az6007_ci_write_attribute_mem() local
296 struct az6007_device_state *state = d_to_priv(d); in az6007_ci_write_attribute_mem()
314 ret = az6007_write(d, req, value1, index, NULL, blen); in az6007_ci_write_attribute_mem()
326 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in az6007_ci_read_cam_control() local
327 struct az6007_device_state *state = d_to_priv(d); in az6007_ci_read_cam_control()
350 ret = az6007_read(d, req, value, index, b, blen); in az6007_ci_read_cam_control()
372 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in az6007_ci_write_cam_control() local
373 struct az6007_device_state *state = d_to_priv(d); in az6007_ci_write_cam_control()
390 ret = az6007_write(d, req, value1, index, NULL, blen); in az6007_ci_write_cam_control()
403 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in CI_CamReady() local
421 ret = az6007_read(d, req, value, index, b, blen); in CI_CamReady()
434 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in az6007_ci_slot_reset() local
435 struct az6007_device_state *state = d_to_priv(d); in az6007_ci_slot_reset()
450 ret = az6007_write(d, req, value, index, NULL, blen); in az6007_ci_slot_reset()
462 ret = az6007_write(d, req, value, index, NULL, blen); in az6007_ci_slot_reset()
490 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in az6007_ci_slot_ts_enable() local
491 struct az6007_device_state *state = d_to_priv(d); in az6007_ci_slot_ts_enable()
506 ret = az6007_write(d, req, value, index, NULL, blen); in az6007_ci_slot_ts_enable()
519 struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; in az6007_ci_poll_slot_status() local
520 struct az6007_device_state *state = d_to_priv(d); in az6007_ci_poll_slot_status()
538 ret = az6007_read(d, req, value, index, b, blen); in az6007_ci_poll_slot_status()
556 static void az6007_ci_uninit(struct dvb_usb_device *d) in az6007_ci_uninit() argument
562 if (NULL == d) in az6007_ci_uninit()
565 state = d_to_priv(d); in az6007_ci_uninit()
580 struct dvb_usb_device *d = adap_to_d(adap); in az6007_ci_init() local
596 state->ca.data = d; in az6007_ci_init()
615 struct dvb_usb_device *d = adap_to_d(adap); in az6007_read_mac_addr() local
619 ret = az6007_read(d, AZ6007_READ_DATA, 6, 0, st->data, 6); in az6007_read_mac_addr()
631 struct dvb_usb_device *d = adap_to_d(adap); in az6007_frontend_attach() local
636 &d->i2c_adap); in az6007_frontend_attach()
652 struct dvb_usb_device *d = adap_to_d(adap); in az6007_cablestar_hdci_frontend_attach() local
657 &d->i2c_adap); in az6007_cablestar_hdci_frontend_attach()
672 struct dvb_usb_device *d = adap_to_d(adap); in az6007_tuner_attach() local
681 &d->i2c_adap)) in az6007_tuner_attach()
690 static int az6007_power_ctrl(struct dvb_usb_device *d, int onoff) in az6007_power_ctrl() argument
692 struct az6007_device_state *state = d_to_priv(d); in az6007_power_ctrl()
700 ret = az6007_write(d, AZ6007_POWER, 0, 2, NULL, 0); in az6007_power_ctrl()
704 ret = az6007_write(d, AZ6007_POWER, 1, 4, NULL, 0); in az6007_power_ctrl()
708 ret = az6007_write(d, AZ6007_POWER, 1, 3, NULL, 0); in az6007_power_ctrl()
712 ret = az6007_write(d, AZ6007_POWER, 1, 4, NULL, 0); in az6007_power_ctrl()
717 ret = az6007_write(d, FX2_SCON1, 0, 3, NULL, 0); in az6007_power_ctrl()
721 ret = az6007_write(d, FX2_SCON1, 1, 3, NULL, 0); in az6007_power_ctrl()
725 ret = az6007_write(d, AZ6007_POWER, 0, 0, NULL, 0); in az6007_power_ctrl()
737 az6007_write(d, AZ6007_POWER, 0, 0, NULL, 0); in az6007_power_ctrl()
738 az6007_write(d, AZ6007_TS_THROUGH, 0, 0, NULL, 0); in az6007_power_ctrl()
747 struct dvb_usb_device *d = i2c_get_adapdata(adap); in az6007_i2c_xfer() local
748 struct az6007_device_state *st = d_to_priv(d); in az6007_i2c_xfer()
779 ret = __az6007_read(d->udev, req, value, index, in az6007_i2c_xfer()
799 ret = __az6007_write(d->udev, req, value, index, in az6007_i2c_xfer()
811 ret = __az6007_read(d->udev, req, value, index, in az6007_i2c_xfer()
839 static int az6007_identify_state(struct dvb_usb_device *d, const char **name) in az6007_identify_state() argument
851 ret = __az6007_read(d->udev, AZ6007_READ_DATA, 6, 0, mac, 6); in az6007_identify_state()
860 __az6007_write(d->udev, 0x09, 1, 0, NULL, 0); in az6007_identify_state()
861 __az6007_write(d->udev, 0x00, 0, 0, NULL, 0); in az6007_identify_state()
862 __az6007_write(d->udev, 0x00, 0, 0, NULL, 0); in az6007_identify_state()
872 struct dvb_usb_device *d = usb_get_intfdata(intf); in az6007_usb_disconnect() local
873 az6007_ci_uninit(d); in az6007_usb_disconnect()
877 static int az6007_download_firmware(struct dvb_usb_device *d, in az6007_download_firmware() argument
882 return cypress_load_firmware(d->udev, fw, CYPRESS_FX2); in az6007_download_firmware()
947 struct dvb_usb_device *d = usb_get_intfdata(intf); in az6007_suspend() local
949 az6007_ci_uninit(d); in az6007_suspend()
955 struct dvb_usb_device *d = usb_get_intfdata(intf); in az6007_resume() local
956 struct dvb_usb_adapter *adap = &d->adapter[0]; in az6007_resume()