/Linux-v4.19/drivers/media/usb/gspca/ |
D | w996Xcf.c | 34 #define Y_QUANTABLE (&sd->jpeg_hdr[JPEG_QT0_OFFSET]) 35 #define UV_QUANTABLE (&sd->jpeg_hdr[JPEG_QT1_OFFSET]) 60 static void reg_w(struct sd *sd, u16 index, u16 value); 66 static void w9968cf_write_fsb(struct sd *sd, u16* data) in w9968cf_write_fsb() argument 68 struct usb_device *udev = sd->gspca_dev.dev; in w9968cf_write_fsb() 72 if (sd->gspca_dev.usb_err < 0) in w9968cf_write_fsb() 76 memcpy(sd->gspca_dev.usb_buf, data, 6); in w9968cf_write_fsb() 82 value, 0x06, sd->gspca_dev.usb_buf, 6, 500); in w9968cf_write_fsb() 85 sd->gspca_dev.usb_err = ret; in w9968cf_write_fsb() 93 static void w9968cf_write_sb(struct sd *sd, u16 value) in w9968cf_write_sb() argument [all …]
|
D | ov519.c | 60 struct sd { struct 1999 static void reg_w(struct sd *sd, u16 index, u16 value) in reg_w() argument 2001 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in reg_w() 2004 if (sd->gspca_dev.usb_err < 0) in reg_w() 2010 switch (sd->bridge) { in reg_w() 2021 ret = usb_control_msg(sd->gspca_dev.dev, in reg_w() 2022 usb_sndctrlpipe(sd->gspca_dev.dev, 0), in reg_w() 2033 sd->gspca_dev.usb_buf[0] = value; in reg_w() 2034 ret = usb_control_msg(sd->gspca_dev.dev, in reg_w() 2035 usb_sndctrlpipe(sd->gspca_dev.dev, 0), in reg_w() [all …]
|
D | cpia1.c | 223 #define FIRMWARE_VERSION(x, y) (sd->params.version.firmwareVersion == (x) && \ 224 sd->params.version.firmwareRevision == (y)) 362 struct sd { struct 450 struct sd *sd = (struct sd *) gspca_dev; in do_command() local 488 sd->params.version.firmwareVersion = gspca_dev->usb_buf[0]; in do_command() 489 sd->params.version.firmwareRevision = gspca_dev->usb_buf[1]; in do_command() 490 sd->params.version.vcVersion = gspca_dev->usb_buf[2]; in do_command() 491 sd->params.version.vcRevision = gspca_dev->usb_buf[3]; in do_command() 494 sd->params.pnpID.vendor = in do_command() 496 sd->params.pnpID.product = in do_command() [all …]
|
D | sn9c20x.c | 64 struct sd { struct 976 struct sd *sd = (struct sd *) gspca_dev; in i2c_w1() local 983 row[0] = sd->i2c_intf | (2 << 4); in i2c_w1() 984 row[1] = sd->i2c_addr; in i2c_w1() 1006 struct sd *sd = (struct sd *) gspca_dev; in i2c_w2() local 1013 row[0] = sd->i2c_intf | (3 << 4); in i2c_w2() 1014 row[1] = sd->i2c_addr; in i2c_w2() 1036 struct sd *sd = (struct sd *) gspca_dev; in i2c_r1() local 1039 row[0] = sd->i2c_intf | (1 << 4); in i2c_r1() 1040 row[1] = sd->i2c_addr; in i2c_r1() [all …]
|
/Linux-v4.19/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 …]
|
/Linux-v4.19/drivers/media/i2c/ |
D | adv7842.c | 90 struct v4l2_subdev sd; member 247 static inline struct adv7842_state *to_state(struct v4l2_subdev *sd) in to_state() argument 249 return container_of(sd, struct adv7842_state, sd); in to_state() 254 return &container_of(ctrl->handler, struct adv7842_state, hdl)->sd; in to_sd() 362 static inline int io_read(struct v4l2_subdev *sd, u8 reg) in io_read() argument 364 struct i2c_client *client = v4l2_get_subdevdata(sd); in io_read() 369 static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val) in io_write() argument 371 struct i2c_client *client = v4l2_get_subdevdata(sd); in io_write() 376 static inline int io_write_and_or(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 val) in io_write_and_or() argument 378 return io_write(sd, reg, (io_read(sd, reg) & mask) | val); in io_write_and_or() [all …]
|
D | ad9389b.c | 69 struct v4l2_subdev sd; member 92 static void ad9389b_check_monitor_present_status(struct v4l2_subdev *sd); 93 static bool ad9389b_check_edid_status(struct v4l2_subdev *sd); 94 static void ad9389b_setup(struct v4l2_subdev *sd); 95 static int ad9389b_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq); 96 static int ad9389b_s_clock_freq(struct v4l2_subdev *sd, u32 freq); 98 static inline struct ad9389b_state *get_ad9389b_state(struct v4l2_subdev *sd) in get_ad9389b_state() argument 100 return container_of(sd, struct ad9389b_state, sd); in get_ad9389b_state() 105 return &container_of(ctrl->handler, struct ad9389b_state, hdl)->sd; in to_sd() 110 static int ad9389b_rd(struct v4l2_subdev *sd, u8 reg) in ad9389b_rd() argument [all …]
|
D | tc358743.c | 73 struct v4l2_subdev sd; member 102 static void tc358743_enable_interrupts(struct v4l2_subdev *sd, 104 static int tc358743_s_ctrl_detect_tx_5v(struct v4l2_subdev *sd); 106 static inline struct tc358743_state *to_state(struct v4l2_subdev *sd) in to_state() argument 108 return container_of(sd, struct tc358743_state, sd); in to_state() 113 static void i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n) in i2c_rd() argument 115 struct tc358743_state *state = to_state(sd); in i2c_rd() 136 v4l2_err(sd, "%s: reading register 0x%x from 0x%x failed\n", in i2c_rd() 141 static void i2c_wr(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n) in i2c_wr() argument 143 struct tc358743_state *state = to_state(sd); in i2c_wr() [all …]
|
D | adv7183.c | 33 struct v4l2_subdev sd; member 71 static inline struct adv7183 *to_adv7183(struct v4l2_subdev *sd) in to_adv7183() argument 73 return container_of(sd, struct adv7183, sd); in to_adv7183() 77 return &container_of(ctrl->handler, struct adv7183, hdl)->sd; in to_sd() 80 static inline int adv7183_read(struct v4l2_subdev *sd, unsigned char reg) in adv7183_read() argument 82 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7183_read() 87 static inline int adv7183_write(struct v4l2_subdev *sd, unsigned char reg, in adv7183_write() argument 90 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7183_write() 95 static int adv7183_writeregs(struct v4l2_subdev *sd, in adv7183_writeregs() argument 102 v4l2_err(sd, "invalid regs array\n"); in adv7183_writeregs() [all …]
|
D | adv7511.c | 79 struct v4l2_subdev sd; member 122 static void adv7511_check_monitor_present_status(struct v4l2_subdev *sd); 123 static bool adv7511_check_edid_status(struct v4l2_subdev *sd); 124 static void adv7511_setup(struct v4l2_subdev *sd); 125 static int adv7511_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq); 126 static int adv7511_s_clock_freq(struct v4l2_subdev *sd, u32 freq); 141 static inline struct adv7511_state *get_adv7511_state(struct v4l2_subdev *sd) in get_adv7511_state() argument 143 return container_of(sd, struct adv7511_state, sd); in get_adv7511_state() 148 return &container_of(ctrl->handler, struct adv7511_state, hdl)->sd; in to_sd() 183 static int adv7511_rd(struct v4l2_subdev *sd, u8 reg) in adv7511_rd() 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() 71 static int ths8200_read(struct v4l2_subdev *sd, u8 reg) in ths8200_read() argument 73 struct i2c_client *client = v4l2_get_subdevdata(sd); in ths8200_read() 78 static int ths8200_write(struct v4l2_subdev *sd, u8 reg, u8 val) in ths8200_write() argument 80 struct i2c_client *client = v4l2_get_subdevdata(sd); in ths8200_write() 89 v4l2_err(sd, "I2C Write Problem\n"); in ths8200_write() 97 ths8200_write_and_or(struct v4l2_subdev *sd, u8 reg, in ths8200_write_and_or() argument 100 ths8200_write(sd, reg, (ths8200_read(sd, reg) & clr_mask) | val_mask); in ths8200_write_and_or() [all …]
|
D | adv7604.c | 120 void (*set_termination)(struct v4l2_subdev *sd, bool enable); 121 void (*setup_irqs)(struct v4l2_subdev *sd); 122 unsigned int (*read_hdmi_pixelclock)(struct v4l2_subdev *sd); 123 unsigned int (*read_cable_det)(struct v4l2_subdev *sd); 161 struct v4l2_subdev sd; member 314 static inline struct adv76xx_state *to_state(struct v4l2_subdev *sd) in to_state() argument 316 return container_of(sd, struct adv76xx_state, sd); in to_state() 368 static inline int io_read(struct v4l2_subdev *sd, u8 reg) in io_read() argument 370 struct adv76xx_state *state = to_state(sd); in io_read() 375 static inline int io_write(struct v4l2_subdev *sd, u8 reg, u8 val) in io_write() argument [all …]
|
D | saa7110.c | 51 struct v4l2_subdev sd; member 62 static inline struct saa7110 *to_saa7110(struct v4l2_subdev *sd) in to_saa7110() argument 64 return container_of(sd, struct saa7110, sd); in to_saa7110() 69 return &container_of(ctrl->handler, struct saa7110, hdl)->sd; in to_sd() 76 static int saa7110_write(struct v4l2_subdev *sd, u8 reg, u8 value) in saa7110_write() argument 78 struct i2c_client *client = v4l2_get_subdevdata(sd); in saa7110_write() 79 struct saa7110 *decoder = to_saa7110(sd); in saa7110_write() 85 static int saa7110_write_block(struct v4l2_subdev *sd, const u8 *data, unsigned int len) in saa7110_write_block() argument 87 struct i2c_client *client = v4l2_get_subdevdata(sd); in saa7110_write_block() 88 struct saa7110 *decoder = to_saa7110(sd); in saa7110_write_block() [all …]
|
D | tvp5150.c | 42 struct v4l2_subdev sd; member 62 static inline struct tvp5150 *to_tvp5150(struct v4l2_subdev *sd) in to_tvp5150() argument 64 return container_of(sd, struct tvp5150, sd); in to_tvp5150() 69 return &container_of(ctrl->handler, struct tvp5150, hdl)->sd; in to_sd() 72 static int tvp5150_read(struct v4l2_subdev *sd, unsigned char addr) in tvp5150_read() argument 74 struct i2c_client *c = v4l2_get_subdevdata(sd); in tvp5150_read() 79 dev_err(sd->dev, "i2c i/o error: rc == %d\n", rc); in tvp5150_read() 83 dev_dbg_lvl(sd->dev, 2, debug, "tvp5150: read 0x%02x = %02x\n", addr, rc); in tvp5150_read() 88 static int tvp5150_write(struct v4l2_subdev *sd, unsigned char addr, in tvp5150_write() argument 91 struct i2c_client *c = v4l2_get_subdevdata(sd); in tvp5150_write() [all …]
|
D | adv7175.c | 47 struct v4l2_subdev sd; member 52 static inline struct adv7175 *to_adv7175(struct v4l2_subdev *sd) in to_adv7175() argument 54 return container_of(sd, struct adv7175, sd); in to_adv7175() 66 static inline int adv7175_write(struct v4l2_subdev *sd, u8 reg, u8 value) in adv7175_write() argument 68 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7175_write() 73 static inline int adv7175_read(struct v4l2_subdev *sd, u8 reg) in adv7175_read() argument 75 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7175_read() 80 static int adv7175_write_block(struct v4l2_subdev *sd, in adv7175_write_block() argument 83 struct i2c_client *client = v4l2_get_subdevdata(sd); in adv7175_write_block() 111 ret = adv7175_write(sd, reg, *data++); in adv7175_write_block() [all …]
|
D | ks0127.c | 196 struct v4l2_subdev sd; member 201 static inline struct ks0127 *to_ks0127(struct v4l2_subdev *sd) in to_ks0127() argument 203 return container_of(sd, struct ks0127, sd); in to_ks0127() 311 static u8 ks0127_read(struct v4l2_subdev *sd, u8 reg) in ks0127_read() argument 313 struct i2c_client *client = v4l2_get_subdevdata(sd); in ks0127_read() 332 v4l2_dbg(1, debug, sd, "read error\n"); in ks0127_read() 338 static void ks0127_write(struct v4l2_subdev *sd, u8 reg, u8 val) in ks0127_write() argument 340 struct i2c_client *client = v4l2_get_subdevdata(sd); in ks0127_write() 341 struct ks0127 *ks = to_ks0127(sd); in ks0127_write() 345 v4l2_dbg(1, debug, sd, "write error\n"); in ks0127_write() [all …]
|
/Linux-v4.19/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 | 62 static inline u32 osd_read(struct osd_state *sd, u32 offset) in osd_read() argument 64 struct osd_state *osd = sd; in osd_read() 69 static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset) in osd_write() argument 71 struct osd_state *osd = sd; in osd_write() 78 static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) in osd_set() argument 80 struct osd_state *osd = sd; in osd_set() 90 static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) in osd_clear() argument 92 struct osd_state *osd = sd; in osd_clear() 102 static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, in osd_modify() argument 105 struct osd_state *osd = sd; in osd_modify() [all …]
|
/Linux-v4.19/drivers/media/usb/gspca/m5602/ |
D | m5602_core.c | 56 int m5602_read_bridge(struct sd *sd, const u8 address, u8 *i2c_data) in m5602_read_bridge() argument 59 struct gspca_dev *gspca_dev = (struct gspca_dev *) sd; in m5602_read_bridge() 60 struct usb_device *udev = sd->gspca_dev.dev; in m5602_read_bridge() 61 __u8 *buf = sd->gspca_dev.usb_buf; in m5602_read_bridge() 78 int m5602_write_bridge(struct sd *sd, const u8 address, const u8 i2c_data) in m5602_write_bridge() argument 81 struct gspca_dev *gspca_dev = (struct gspca_dev *) sd; in m5602_write_bridge() 82 struct usb_device *udev = sd->gspca_dev.dev; in m5602_write_bridge() 83 __u8 *buf = sd->gspca_dev.usb_buf; in m5602_write_bridge() 103 static int m5602_wait_for_i2c(struct sd *sd) in m5602_wait_for_i2c() argument 109 err = m5602_read_bridge(sd, M5602_XB_I2C_STATUS, &data); in m5602_wait_for_i2c() [all …]
|
/Linux-v4.19/drivers/media/usb/gspca/stv06xx/ |
D | stv06xx_pb0100.c | 88 struct sd *sd = (struct sd *)gspca_dev; in pb0100_s_ctrl() local 89 struct pb0100_ctrls *ctrls = sd->sensor_priv; in pb0100_s_ctrl() 115 static int pb0100_init_controls(struct sd *sd) in pb0100_init_controls() argument 117 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in pb0100_init_controls() 159 sd->sensor_priv = ctrls; in pb0100_init_controls() 164 static int pb0100_probe(struct sd *sd) in pb0100_probe() argument 169 err = stv06xx_read_sensor(sd, PB_IDENT, &sensor); in pb0100_probe() 178 sd->gspca_dev.cam.cam_mode = pb0100_mode; in pb0100_probe() 179 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode); in pb0100_probe() 184 static int pb0100_start(struct sd *sd) in pb0100_start() argument [all …]
|
D | stv06xx_st6422.c | 59 static int setbrightness(struct sd *sd, s32 val); 60 static int setcontrast(struct sd *sd, s32 val); 61 static int setgain(struct sd *sd, u8 gain); 62 static int setexposure(struct sd *sd, s16 expo); 68 struct sd *sd = (struct sd *)gspca_dev; in st6422_s_ctrl() local 73 err = setbrightness(sd, ctrl->val); in st6422_s_ctrl() 76 err = setcontrast(sd, ctrl->val); in st6422_s_ctrl() 79 err = setgain(sd, ctrl->val); in st6422_s_ctrl() 82 err = setexposure(sd, ctrl->val); in st6422_s_ctrl() 88 err = stv06xx_write_bridge(sd, 0x143f, 0x01); in st6422_s_ctrl() [all …]
|
D | stv06xx.c | 38 int stv06xx_write_bridge(struct sd *sd, u16 address, u16 i2c_data) in stv06xx_write_bridge() argument 41 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in stv06xx_write_bridge() 42 struct usb_device *udev = sd->gspca_dev.dev; in stv06xx_write_bridge() 43 __u8 *buf = sd->gspca_dev.usb_buf; in stv06xx_write_bridge() 60 int stv06xx_read_bridge(struct sd *sd, u16 address, u8 *i2c_data) in stv06xx_read_bridge() argument 63 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in stv06xx_read_bridge() 64 struct usb_device *udev = sd->gspca_dev.dev; in stv06xx_read_bridge() 65 __u8 *buf = sd->gspca_dev.usb_buf; in stv06xx_read_bridge() 81 int stv06xx_write_sensor(struct sd *sd, u8 address, u16 value) in stv06xx_write_sensor() argument 83 if (sd->sensor->i2c_len == 2) { in stv06xx_write_sensor() [all …]
|
/Linux-v4.19/include/media/ |
D | v4l2-subdev.h | 198 int (*log_status)(struct v4l2_subdev *sd); 199 int (*s_io_pin_config)(struct v4l2_subdev *sd, size_t n, 201 int (*init)(struct v4l2_subdev *sd, u32 val); 202 int (*load_fw)(struct v4l2_subdev *sd); 203 int (*reset)(struct v4l2_subdev *sd, u32 val); 204 int (*s_gpio)(struct v4l2_subdev *sd, u32 val); 205 long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); 207 long (*compat_ioctl32)(struct v4l2_subdev *sd, unsigned int cmd, 211 int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); 212 int (*s_register)(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg); [all …]
|
/Linux-v4.19/drivers/char/ |
D | snsc.c | 41 struct subch_data_s *sd = subch_data; in scdrv_interrupt() local 45 spin_lock_irqsave(&sd->sd_rlock, flags); in scdrv_interrupt() 46 spin_lock(&sd->sd_wlock); in scdrv_interrupt() 47 status = ia64_sn_irtr_intr(sd->sd_nasid, sd->sd_subch); in scdrv_interrupt() 51 wake_up(&sd->sd_rq); in scdrv_interrupt() 55 (sd->sd_nasid, sd->sd_subch, in scdrv_interrupt() 57 wake_up(&sd->sd_wq); in scdrv_interrupt() 60 spin_unlock(&sd->sd_wlock); in scdrv_interrupt() 61 spin_unlock_irqrestore(&sd->sd_rlock, flags); in scdrv_interrupt() 75 struct subch_data_s *sd; in scdrv_open() local [all …]
|
/Linux-v4.19/drivers/media/usb/gspca/gl860/ |
D | gl860-ov2640.c | 185 struct sd *sd = (struct sd *) gspca_dev; in ov2640_init_settings() local 187 sd->vcur.backlight = 32; in ov2640_init_settings() 188 sd->vcur.brightness = 0; in ov2640_init_settings() 189 sd->vcur.sharpness = 6; in ov2640_init_settings() 190 sd->vcur.contrast = 0; in ov2640_init_settings() 191 sd->vcur.gamma = 32; in ov2640_init_settings() 192 sd->vcur.hue = 0; in ov2640_init_settings() 193 sd->vcur.saturation = 128; in ov2640_init_settings() 194 sd->vcur.whitebal = 64; in ov2640_init_settings() 195 sd->vcur.mirror = 0; in ov2640_init_settings() [all …]
|