Lines Matching refs:sd

59 static void tda9840_write(struct v4l2_subdev *sd, u8 reg, u8 val)  in tda9840_write()  argument
61 struct i2c_client *client = v4l2_get_subdevdata(sd); in tda9840_write()
64 v4l2_dbg(1, debug, sd, "error writing %02x to %02x\n", in tda9840_write()
68 static int tda9840_status(struct v4l2_subdev *sd) in tda9840_status() argument
70 struct i2c_client *client = v4l2_get_subdevdata(sd); in tda9840_status()
74 v4l2_dbg(1, debug, sd, in tda9840_status()
80 v4l2_dbg(1, debug, sd, in tda9840_status()
85 v4l2_dbg(1, debug, sd, "TDA9840_DETECT: byte: 0x%02x\n", byte); in tda9840_status()
89 static int tda9840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *t) in tda9840_s_tuner() argument
91 int stat = tda9840_status(sd); in tda9840_s_tuner()
116 v4l2_dbg(1, debug, sd, "TDA9840_SWITCH: 0x%02x\n", byte); in tda9840_s_tuner()
117 tda9840_write(sd, SWITCH, byte); in tda9840_s_tuner()
121 static int tda9840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *t) in tda9840_g_tuner() argument
123 int stat = tda9840_status(sd); in tda9840_g_tuner()
163 struct v4l2_subdev *sd; in tda9840_probe() local
174 sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL); in tda9840_probe()
175 if (sd == NULL) in tda9840_probe()
177 v4l2_i2c_subdev_init(sd, client, &tda9840_ops); in tda9840_probe()
180 tda9840_write(sd, LEVEL_ADJUST, 0); in tda9840_probe()
181 tda9840_write(sd, STEREO_ADJUST, 0); in tda9840_probe()
182 tda9840_write(sd, SWITCH, TDA9840_SET_STEREO); in tda9840_probe()
188 struct v4l2_subdev *sd = i2c_get_clientdata(client); in tda9840_remove() local
190 v4l2_device_unregister_subdev(sd); in tda9840_remove()