/drivers/media/usb/gspca/ |
D | ov519.c | 64 struct sd { struct 2037 static void reg_w(struct sd *sd, u16 index, u16 value) in reg_w() argument 2039 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in reg_w() 2042 if (sd->gspca_dev.usb_err < 0) in reg_w() 2045 switch (sd->bridge) { in reg_w() 2056 ret = usb_control_msg(sd->gspca_dev.dev, in reg_w() 2057 usb_sndctrlpipe(sd->gspca_dev.dev, 0), in reg_w() 2068 sd->gspca_dev.usb_buf[0] = value; in reg_w() 2069 ret = usb_control_msg(sd->gspca_dev.dev, in reg_w() 2070 usb_sndctrlpipe(sd->gspca_dev.dev, 0), in reg_w() [all …]
|
D | w996Xcf.c | 38 #define Y_QUANTABLE (&sd->jpeg_hdr[JPEG_QT0_OFFSET]) 39 #define UV_QUANTABLE (&sd->jpeg_hdr[JPEG_QT1_OFFSET]) 64 static void reg_w(struct sd *sd, u16 index, u16 value); 70 static void w9968cf_write_fsb(struct sd *sd, u16* data) in w9968cf_write_fsb() argument 72 struct usb_device *udev = sd->gspca_dev.dev; in w9968cf_write_fsb() 76 if (sd->gspca_dev.usb_err < 0) in w9968cf_write_fsb() 80 memcpy(sd->gspca_dev.usb_buf, data, 6); in w9968cf_write_fsb() 84 value, 0x06, sd->gspca_dev.usb_buf, 6, 500); in w9968cf_write_fsb() 87 sd->gspca_dev.usb_err = ret; in w9968cf_write_fsb() 95 static void w9968cf_write_sb(struct sd *sd, u16 value) in w9968cf_write_sb() argument [all …]
|
D | cpia1.c | 225 #define FIRMWARE_VERSION(x, y) (sd->params.version.firmwareVersion == (x) && \ 226 sd->params.version.firmwareRevision == (y)) 364 struct sd { struct 451 struct sd *sd = (struct sd *) gspca_dev; in do_command() local 489 sd->params.version.firmwareVersion = gspca_dev->usb_buf[0]; in do_command() 490 sd->params.version.firmwareRevision = gspca_dev->usb_buf[1]; in do_command() 491 sd->params.version.vcVersion = gspca_dev->usb_buf[2]; in do_command() 492 sd->params.version.vcRevision = gspca_dev->usb_buf[3]; in do_command() 495 sd->params.pnpID.vendor = in do_command() 497 sd->params.pnpID.product = in do_command() [all …]
|
D | sn9c20x.c | 69 struct sd { struct 982 struct sd *sd = (struct sd *) gspca_dev; in i2c_w1() local 989 row[0] = sd->i2c_intf | (2 << 4); in i2c_w1() 990 row[1] = sd->i2c_addr; in i2c_w1() 1012 struct sd *sd = (struct sd *) gspca_dev; in i2c_w2() local 1019 row[0] = sd->i2c_intf | (3 << 4); in i2c_w2() 1020 row[1] = sd->i2c_addr; in i2c_w2() 1042 struct sd *sd = (struct sd *) gspca_dev; in i2c_r1() local 1045 row[0] = sd->i2c_intf | (1 << 4); in i2c_r1() 1046 row[1] = sd->i2c_addr; in i2c_r1() [all …]
|
/drivers/media/i2c/ |
D | adv7842.c | 68 struct v4l2_subdev sd; member 213 static inline struct adv7842_state *to_state(struct v4l2_subdev *sd) in to_state() argument 215 return container_of(sd, struct adv7842_state, sd); in to_state() 220 return &container_of(ctrl->handler, struct adv7842_state, hdl)->sd; in to_sd() 328 static inline int io_read(struct v4l2_subdev *sd, u8 reg) in io_read() argument 330 struct i2c_client *client = v4l2_get_subdevdata(sd); in io_read() 335 static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val) in io_write() argument 337 struct i2c_client *client = v4l2_get_subdevdata(sd); in io_write() 342 static inline int io_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val) in io_write_and_or() argument 344 return io_write(sd, reg, (io_read(sd, reg) & mask) | val); in io_write_and_or() [all …]
|
D | ad9389b.c | 81 struct v4l2_subdev sd; member 105 static void ad9389b_check_monitor_present_status(struct v4l2_subdev *sd); 106 static bool ad9389b_check_edid_status(struct v4l2_subdev *sd); 107 static void ad9389b_setup(struct v4l2_subdev *sd); 108 static int ad9389b_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq); 109 static int ad9389b_s_clock_freq(struct v4l2_subdev *sd, u32 freq); 111 static inline struct ad9389b_state *get_ad9389b_state(struct v4l2_subdev *sd) in get_ad9389b_state() argument 113 return container_of(sd, struct ad9389b_state, sd); in get_ad9389b_state() 118 return &container_of(ctrl->handler, struct ad9389b_state, hdl)->sd; in to_sd() 123 static int ad9389b_rd(struct v4l2_subdev *sd, u8 reg) in ad9389b_rd() argument [all …]
|
D | adv7511.c | 87 struct v4l2_subdev sd; member 113 static void adv7511_check_monitor_present_status(struct v4l2_subdev *sd); 114 static bool adv7511_check_edid_status(struct v4l2_subdev *sd); 115 static void adv7511_setup(struct v4l2_subdev *sd); 116 static int adv7511_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq); 117 static int adv7511_s_clock_freq(struct v4l2_subdev *sd, u32 freq); 132 static inline struct adv7511_state *get_adv7511_state(struct v4l2_subdev *sd) in get_adv7511_state() argument 134 return container_of(sd, struct adv7511_state, sd); in get_adv7511_state() 139 return &container_of(ctrl->handler, struct adv7511_state, hdl)->sd; in to_sd() 174 static int adv7511_rd(struct v4l2_subdev *sd, u8 reg) in adv7511_rd() argument [all …]
|
D | adv7183.c | 37 struct v4l2_subdev sd; member 75 static inline struct adv7183 *to_adv7183(struct v4l2_subdev *sd) in to_adv7183() argument 77 return container_of(sd, struct adv7183, sd); in to_adv7183() 81 return &container_of(ctrl->handler, struct adv7183, hdl)->sd; in to_sd() 84 static inline int adv7183_read(struct v4l2_subdev *sd, unsigned char reg) in adv7183_read() argument 86 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7183_read() 91 static inline int adv7183_write(struct v4l2_subdev *sd, unsigned char reg, in adv7183_write() argument 94 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7183_write() 99 static int adv7183_writeregs(struct v4l2_subdev *sd, in adv7183_writeregs() argument 106 v4l2_err(sd, "invalid regs array\n"); in adv7183_writeregs() [all …]
|
D | adv7604.c | 116 void (*set_termination)(struct v4l2_subdev *sd, bool enable); 117 void (*setup_irqs)(struct v4l2_subdev *sd); 118 unsigned int (*read_hdmi_pixelclock)(struct v4l2_subdev *sd); 119 unsigned int (*read_cable_det)(struct v4l2_subdev *sd); 142 struct v4l2_subdev sd; member 331 static inline struct adv7604_state *to_state(struct v4l2_subdev *sd) in to_state() argument 333 return container_of(sd, struct adv7604_state, sd); in to_state() 422 static inline int io_read(struct v4l2_subdev *sd, u8 reg) in io_read() argument 424 struct adv7604_state *state = to_state(sd); in io_read() 429 static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val) in io_write() argument [all …]
|
D | ths8200.c | 41 struct v4l2_subdev sd; member 56 static inline struct ths8200_state *to_state(struct v4l2_subdev *sd) in to_state() argument 58 return container_of(sd, struct ths8200_state, sd); in to_state() 81 static int ths8200_read(struct v4l2_subdev *sd, u8 reg) in ths8200_read() argument 83 struct i2c_client *client = v4l2_get_subdevdata(sd); in ths8200_read() 88 static int ths8200_write(struct v4l2_subdev *sd, u8 reg, u8 val) in ths8200_write() argument 90 struct i2c_client *client = v4l2_get_subdevdata(sd); in ths8200_write() 99 v4l2_err(sd, "I2C Write Problem\n"); in ths8200_write() 107 ths8200_write_and_or(struct v4l2_subdev *sd, u8 reg, in ths8200_write_and_or() argument 110 ths8200_write(sd, reg, (ths8200_read(sd, reg) & clr_mask) | val_mask); in ths8200_write_and_or() [all …]
|
D | tvp5150.c | 36 struct v4l2_subdev sd; member 46 static inline struct tvp5150 *to_tvp5150(struct v4l2_subdev *sd) in to_tvp5150() argument 48 return container_of(sd, struct tvp5150, sd); in to_tvp5150() 53 return &container_of(ctrl->handler, struct tvp5150, hdl)->sd; in to_sd() 56 static int tvp5150_read(struct v4l2_subdev *sd, unsigned char addr) in tvp5150_read() argument 58 struct i2c_client *c = v4l2_get_subdevdata(sd); in tvp5150_read() 63 v4l2_err(sd, "i2c i/o error: rc == %d\n", rc); in tvp5150_read() 67 v4l2_dbg(2, debug, sd, "tvp5150: read 0x%02x = 0x%02x\n", addr, rc); in tvp5150_read() 72 static inline void tvp5150_write(struct v4l2_subdev *sd, unsigned char addr, in tvp5150_write() argument 75 struct i2c_client *c = v4l2_get_subdevdata(sd); in tvp5150_write() [all …]
|
D | saa7110.c | 55 struct v4l2_subdev sd; member 66 static inline struct saa7110 *to_saa7110(struct v4l2_subdev *sd) in to_saa7110() argument 68 return container_of(sd, struct saa7110, sd); in to_saa7110() 73 return &container_of(ctrl->handler, struct saa7110, hdl)->sd; in to_sd() 80 static int saa7110_write(struct v4l2_subdev *sd, u8 reg, u8 value) in saa7110_write() argument 82 struct i2c_client *client = v4l2_get_subdevdata(sd); in saa7110_write() 83 struct saa7110 *decoder = to_saa7110(sd); in saa7110_write() 89 static int saa7110_write_block(struct v4l2_subdev *sd, const u8 *data, unsigned int len) in saa7110_write_block() argument 91 struct i2c_client *client = v4l2_get_subdevdata(sd); in saa7110_write_block() 92 struct saa7110 *decoder = to_saa7110(sd); in saa7110_write_block() [all …]
|
D | adv7175.c | 51 struct v4l2_subdev sd; member 56 static inline struct adv7175 *to_adv7175(struct v4l2_subdev *sd) in to_adv7175() argument 58 return container_of(sd, struct adv7175, sd); in to_adv7175() 70 static inline int adv7175_write(struct v4l2_subdev *sd, u8 reg, u8 value) in adv7175_write() argument 72 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7175_write() 77 static inline int adv7175_read(struct v4l2_subdev *sd, u8 reg) in adv7175_read() argument 79 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7175_read() 84 static int adv7175_write_block(struct v4l2_subdev *sd, in adv7175_write_block() argument 87 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7175_write_block() 115 ret = adv7175_write(sd, reg, *data++); in adv7175_write_block() [all …]
|
D | ks0127.c | 200 struct v4l2_subdev sd; member 205 static inline struct ks0127 *to_ks0127(struct v4l2_subdev *sd) in to_ks0127() argument 207 return container_of(sd, struct ks0127, sd); in to_ks0127() 315 static u8 ks0127_read(struct v4l2_subdev *sd, u8 reg) in ks0127_read() argument 317 struct i2c_client *client = v4l2_get_subdevdata(sd); in ks0127_read() 336 v4l2_dbg(1, debug, sd, "read error\n"); in ks0127_read() 342 static void ks0127_write(struct v4l2_subdev *sd, u8 reg, u8 val) in ks0127_write() argument 344 struct i2c_client *client = v4l2_get_subdevdata(sd); in ks0127_write() 345 struct ks0127 *ks = to_ks0127(sd); in ks0127_write() 349 v4l2_dbg(1, debug, sd, "write error\n"); in ks0127_write() [all …]
|
/drivers/scsi/aic7xxx/ |
D | aic7xxx_93cx6.c | 101 #define CLOCK_PULSE(sd, rdy) \ argument 102 while ((SEEPROM_STATUS_INB(sd) & rdy) == 0) { \ 105 (void)SEEPROM_INB(sd); /* Clear clock */ 111 send_seeprom_cmd(struct seeprom_descriptor *sd, const struct seeprom_cmd *cmd) in send_seeprom_cmd() argument 117 temp = sd->sd_MS ^ sd->sd_CS; in send_seeprom_cmd() 118 SEEPROM_OUTB(sd, temp ^ sd->sd_CK); in send_seeprom_cmd() 119 CLOCK_PULSE(sd, sd->sd_RDY); in send_seeprom_cmd() 123 temp ^= sd->sd_DO; in send_seeprom_cmd() 124 SEEPROM_OUTB(sd, temp); in send_seeprom_cmd() 125 CLOCK_PULSE(sd, sd->sd_RDY); in send_seeprom_cmd() [all …]
|
/drivers/media/platform/davinci/ |
D | vpbe_venc.c | 66 struct v4l2_subdev sd; member 78 static inline struct venc_state *to_state(struct v4l2_subdev *sd) in to_state() argument 80 return container_of(sd, struct venc_state, sd); in to_state() 83 static inline u32 venc_read(struct v4l2_subdev *sd, u32 offset) in venc_read() argument 85 struct venc_state *venc = to_state(sd); in venc_read() 90 static inline u32 venc_write(struct v4l2_subdev *sd, u32 offset, u32 val) in venc_write() argument 92 struct venc_state *venc = to_state(sd); in venc_write() 99 static inline u32 venc_modify(struct v4l2_subdev *sd, u32 offset, in venc_modify() argument 102 u32 new_val = (venc_read(sd, offset) & ~mask) | (val & mask); in venc_modify() 104 venc_write(sd, offset, new_val); in venc_modify() [all …]
|
D | vpbe_osd.c | 63 static inline u32 osd_read(struct osd_state *sd, u32 offset) in osd_read() argument 65 struct osd_state *osd = sd; in osd_read() 70 static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset) in osd_write() argument 72 struct osd_state *osd = sd; in osd_write() 79 static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) in osd_set() argument 81 struct osd_state *osd = sd; in osd_set() 91 static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) in osd_clear() argument 93 struct osd_state *osd = sd; in osd_clear() 103 static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, in osd_modify() argument 106 struct osd_state *osd = sd; in osd_modify() [all …]
|
/drivers/media/usb/gspca/m5602/ |
D | m5602_core.c | 41 int m5602_read_bridge(struct sd *sd, const u8 address, u8 *i2c_data) in m5602_read_bridge() argument 44 struct gspca_dev *gspca_dev = (struct gspca_dev *) sd; in m5602_read_bridge() 45 struct usb_device *udev = sd->gspca_dev.dev; in m5602_read_bridge() 46 __u8 *buf = sd->gspca_dev.usb_buf; in m5602_read_bridge() 63 int m5602_write_bridge(struct sd *sd, const u8 address, const u8 i2c_data) in m5602_write_bridge() argument 66 struct gspca_dev *gspca_dev = (struct gspca_dev *) sd; in m5602_write_bridge() 67 struct usb_device *udev = sd->gspca_dev.dev; in m5602_write_bridge() 68 __u8 *buf = sd->gspca_dev.usb_buf; in m5602_write_bridge() 88 static int m5602_wait_for_i2c(struct sd *sd) in m5602_wait_for_i2c() argument 94 err = m5602_read_bridge(sd, M5602_XB_I2C_STATUS, &data); in m5602_wait_for_i2c() [all …]
|
D | m5602_po1030.c | 24 static void po1030_dump_registers(struct sd *sd); 55 int po1030_probe(struct sd *sd) in po1030_probe() argument 58 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in po1030_probe() 76 m5602_write_sensor(sd, in po1030_probe() 79 m5602_write_bridge(sd, preinit_po1030[i][1], data); in po1030_probe() 82 if (m5602_read_sensor(sd, PO1030_DEVID_H, &dev_id_h, 1)) in po1030_probe() 92 sd->gspca_dev.cam.cam_mode = po1030_modes; in po1030_probe() 93 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(po1030_modes); in po1030_probe() 98 int po1030_init(struct sd *sd) in po1030_init() argument 108 err = m5602_write_bridge(sd, in po1030_init() [all …]
|
D | m5602_s5k83a.c | 44 static void s5k83a_dump_registers(struct sd *sd); 45 static int s5k83a_get_rotation(struct sd *sd, u8 *reg_data); 46 static int s5k83a_set_led_indication(struct sd *sd, u8 val); 50 int s5k83a_probe(struct sd *sd) in s5k83a_probe() argument 54 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in s5k83a_probe() 72 err = m5602_write_sensor(sd, preinit_s5k83a[i][1], in s5k83a_probe() 75 err = m5602_write_bridge(sd, preinit_s5k83a[i][1], in s5k83a_probe() 82 if (m5602_read_sensor(sd, 0x00, &prod_id, 1)) in s5k83a_probe() 85 if (m5602_read_sensor(sd, 0x01, &ver_id, 1)) in s5k83a_probe() 94 sd->gspca_dev.cam.cam_mode = s5k83a_modes; in s5k83a_probe() [all …]
|
D | m5602_ov9650.c | 24 static void ov9650_dump_registers(struct sd *sd); 146 int ov9650_probe(struct sd *sd) in ov9650_probe() argument 150 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in ov9650_probe() 168 err = m5602_write_sensor(sd, in ov9650_probe() 171 err = m5602_write_bridge(sd, in ov9650_probe() 178 if (m5602_read_sensor(sd, OV9650_PID, &prod_id, 1)) in ov9650_probe() 181 if (m5602_read_sensor(sd, OV9650_VER, &ver_id, 1)) in ov9650_probe() 191 sd->gspca_dev.cam.cam_mode = ov9650_modes; in ov9650_probe() 192 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov9650_modes); in ov9650_probe() 197 int ov9650_init(struct sd *sd) in ov9650_init() argument [all …]
|
D | m5602_mt9m111.c | 24 static void mt9m111_dump_registers(struct sd *sd); 55 int mt9m111_probe(struct sd *sd) in mt9m111_probe() argument 59 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in mt9m111_probe() 76 m5602_write_bridge(sd, in mt9m111_probe() 82 m5602_write_sensor(sd, in mt9m111_probe() 87 if (m5602_read_sensor(sd, MT9M111_SC_CHIPVER, data, 2)) in mt9m111_probe() 98 sd->gspca_dev.cam.cam_mode = mt9m111_modes; in mt9m111_probe() 99 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(mt9m111_modes); in mt9m111_probe() 104 int mt9m111_init(struct sd *sd) in mt9m111_init() argument 113 err = m5602_write_bridge(sd, in mt9m111_init() [all …]
|
/drivers/media/usb/gspca/stv06xx/ |
D | stv06xx_pb0100.c | 92 struct sd *sd = (struct sd *)gspca_dev; in pb0100_s_ctrl() local 93 struct pb0100_ctrls *ctrls = sd->sensor_priv; in pb0100_s_ctrl() 119 static int pb0100_init_controls(struct sd *sd) in pb0100_init_controls() argument 121 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in pb0100_init_controls() 163 sd->sensor_priv = ctrls; in pb0100_init_controls() 168 static int pb0100_probe(struct sd *sd) in pb0100_probe() argument 173 err = stv06xx_read_sensor(sd, PB_IDENT, &sensor); in pb0100_probe() 182 sd->gspca_dev.cam.cam_mode = pb0100_mode; in pb0100_probe() 183 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode); in pb0100_probe() 188 static int pb0100_start(struct sd *sd) in pb0100_start() argument [all …]
|
D | stv06xx.c | 42 int stv06xx_write_bridge(struct sd *sd, u16 address, u16 i2c_data) in stv06xx_write_bridge() argument 45 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in stv06xx_write_bridge() 46 struct usb_device *udev = sd->gspca_dev.dev; in stv06xx_write_bridge() 47 __u8 *buf = sd->gspca_dev.usb_buf; in stv06xx_write_bridge() 64 int stv06xx_read_bridge(struct sd *sd, u16 address, u8 *i2c_data) in stv06xx_read_bridge() argument 67 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in stv06xx_read_bridge() 68 struct usb_device *udev = sd->gspca_dev.dev; in stv06xx_read_bridge() 69 __u8 *buf = sd->gspca_dev.usb_buf; in stv06xx_read_bridge() 85 int stv06xx_write_sensor(struct sd *sd, u8 address, u16 value) in stv06xx_write_sensor() argument 87 if (sd->sensor->i2c_len == 2) { in stv06xx_write_sensor() [all …]
|
D | stv06xx_st6422.c | 63 static int setbrightness(struct sd *sd, s32 val); 64 static int setcontrast(struct sd *sd, s32 val); 65 static int setgain(struct sd *sd, u8 gain); 66 static int setexposure(struct sd *sd, s16 expo); 72 struct sd *sd = (struct sd *)gspca_dev; in st6422_s_ctrl() local 77 err = setbrightness(sd, ctrl->val); in st6422_s_ctrl() 80 err = setcontrast(sd, ctrl->val); in st6422_s_ctrl() 83 err = setgain(sd, ctrl->val); in st6422_s_ctrl() 86 err = setexposure(sd, ctrl->val); in st6422_s_ctrl() 92 err = stv06xx_write_bridge(sd, 0x143f, 0x01); in st6422_s_ctrl() [all …]
|