Lines Matching refs:sd

63 	struct v4l2_subdev sd;  member
77 static inline struct tda7432 *to_state(struct v4l2_subdev *sd) in to_state() argument
79 return container_of(sd, struct tda7432, sd); in to_state()
84 return &container_of(ctrl->handler, struct tda7432, hdl)->sd; in to_sd()
220 static int tda7432_write(struct v4l2_subdev *sd, int subaddr, int val) in tda7432_write() argument
222 struct i2c_client *client = v4l2_get_subdevdata(sd); in tda7432_write()
225 v4l2_dbg(2, debug, sd, "In tda7432_write\n"); in tda7432_write()
226 v4l2_dbg(1, debug, sd, "Writing %d 0x%x\n", subaddr, val); in tda7432_write()
230 v4l2_err(sd, "I/O error, trying (write %d 0x%x)\n", in tda7432_write()
237 static int tda7432_set(struct v4l2_subdev *sd) in tda7432_set() argument
239 struct i2c_client *client = v4l2_get_subdevdata(sd); in tda7432_set()
256 v4l2_err(sd, "I/O error, trying tda7432_set\n"); in tda7432_set()
263 static int tda7432_log_status(struct v4l2_subdev *sd) in tda7432_log_status() argument
265 struct tda7432 *state = to_state(sd); in tda7432_log_status()
267 v4l2_ctrl_handler_log_status(&state->hdl, sd->name); in tda7432_log_status()
273 struct v4l2_subdev *sd = to_sd(ctrl); in tda7432_s_ctrl() local
274 struct tda7432 *t = to_state(sd); in tda7432_s_ctrl()
300 tda7432_write(sd, TDA7432_LF, lf); in tda7432_s_ctrl()
301 tda7432_write(sd, TDA7432_LR, lr); in tda7432_s_ctrl()
302 tda7432_write(sd, TDA7432_RF, rf); in tda7432_s_ctrl()
303 tda7432_write(sd, TDA7432_RR, rr); in tda7432_s_ctrl()
310 tda7432_write(sd, TDA7432_VL, volume); in tda7432_s_ctrl()
320 tda7432_write(sd, TDA7432_TN, 0x10 | (bass << 4) | treble); in tda7432_s_ctrl()
350 struct v4l2_subdev *sd; in tda7432_probe() local
358 sd = &t->sd; in tda7432_probe()
359 v4l2_i2c_subdev_init(sd, client, &tda7432_ops); in tda7432_probe()
371 sd->ctrl_handler = &t->hdl; in tda7432_probe()
382 v4l2_warn(sd, "loudness parameter must be between 0 and 15\n"); in tda7432_probe()
389 tda7432_set(sd); in tda7432_probe()
395 struct v4l2_subdev *sd = i2c_get_clientdata(client); in tda7432_remove() local
396 struct tda7432 *t = to_state(sd); in tda7432_remove()
398 tda7432_set(sd); in tda7432_remove()
399 v4l2_device_unregister_subdev(sd); in tda7432_remove()