Lines Matching full:sd
49 static int setbrightness(struct sd *sd, s32 val);
50 static int setcontrast(struct sd *sd, s32 val);
51 static int setgain(struct sd *sd, u8 gain);
52 static int setexposure(struct sd *sd, s16 expo);
58 struct sd *sd = (struct sd *)gspca_dev; in st6422_s_ctrl() local
63 err = setbrightness(sd, ctrl->val); in st6422_s_ctrl()
66 err = setcontrast(sd, ctrl->val); in st6422_s_ctrl()
69 err = setgain(sd, ctrl->val); in st6422_s_ctrl()
72 err = setexposure(sd, ctrl->val); in st6422_s_ctrl()
78 err = stv06xx_write_bridge(sd, 0x143f, 0x01); in st6422_s_ctrl()
79 sd->gspca_dev.usb_err = err; in st6422_s_ctrl()
87 static int st6422_init_controls(struct sd *sd) in st6422_init_controls() argument
89 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in st6422_init_controls()
104 static int st6422_probe(struct sd *sd) in st6422_probe() argument
106 if (sd->bridge != BRIDGE_ST6422) in st6422_probe()
111 sd->gspca_dev.cam.cam_mode = st6422_mode; in st6422_probe()
112 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(st6422_mode); in st6422_probe()
116 static int st6422_init(struct sd *sd) in st6422_init() argument
194 err = stv06xx_write_bridge(sd, st6422_bridge_init[i][0], in st6422_init()
201 static int setbrightness(struct sd *sd, s32 val) in setbrightness() argument
204 return stv06xx_write_bridge(sd, 0x1432, val); in setbrightness()
207 static int setcontrast(struct sd *sd, s32 val) in setcontrast() argument
210 return stv06xx_write_bridge(sd, 0x143a, val | 0xf0); in setcontrast()
213 static int setgain(struct sd *sd, u8 gain) in setgain() argument
218 err = stv06xx_write_bridge(sd, 0x0509, gain); in setgain()
222 err = stv06xx_write_bridge(sd, 0x050a, gain); in setgain()
226 err = stv06xx_write_bridge(sd, 0x050b, gain); in setgain()
231 err = stv06xx_write_bridge(sd, 0x050c, 0x2a); in setgain()
235 return stv06xx_write_bridge(sd, 0x050d, 0x01); in setgain()
238 static int setexposure(struct sd *sd, s16 expo) in setexposure() argument
242 err = stv06xx_write_bridge(sd, 0x143d, expo & 0xff); in setexposure()
246 return stv06xx_write_bridge(sd, 0x143e, expo >> 8); in setexposure()
249 static int st6422_start(struct sd *sd) in st6422_start() argument
252 struct cam *cam = &sd->gspca_dev.cam; in st6422_start()
254 if (cam->cam_mode[sd->gspca_dev.curr_mode].priv) in st6422_start()
255 err = stv06xx_write_bridge(sd, 0x1505, 0x0f); in st6422_start()
257 err = stv06xx_write_bridge(sd, 0x1505, 0x02); in st6422_start()
262 err = stv06xx_write_bridge(sd, 0x143f, 0x01); in st6422_start()
266 static int st6422_stop(struct sd *sd) in st6422_stop() argument
268 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in st6422_stop()