Lines Matching +full:disable +full:- +full:state
2 * ths7303/53- THS7303/53 Video Amplifier driver
4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
29 #include <media/v4l2-device.h>
86 struct ths7303_state *state = to_state(sd); in ths7303_setval() local
87 const struct ths7303_platform_data *pdata = state->pdata; in ths7303_setval()
89 int err, disable = 0; in ths7303_setval() local
92 return -EINVAL; in ths7303_setval()
105 sel = 0x0; /* SDTV, S-Video, 480i/576i */ in ths7303_setval()
108 /* disable all channels */ in ths7303_setval()
109 disable = 1; in ths7303_setval()
113 if (!disable) in ths7303_setval()
114 val |= (pdata->ch_1 & 0x27); in ths7303_setval()
120 if (!disable) in ths7303_setval()
121 val |= (pdata->ch_2 & 0x27); in ths7303_setval()
127 if (!disable) in ths7303_setval()
128 val |= (pdata->ch_3 & 0x27); in ths7303_setval()
141 struct ths7303_state *state = to_state(sd); in ths7303_s_std_output() local
144 state->std_id = 1; in ths7303_s_std_output()
145 state->bt.pixelclock = 0; in ths7303_s_std_output()
154 struct ths7303_state *state = to_state(sd); in ths7303_config() local
157 if (!state->stream_on) { in ths7303_config()
170 if (state->bt.pixelclock > 120000000) in ths7303_config()
172 else if (state->bt.pixelclock > 70000000) in ths7303_config()
174 else if (state->bt.pixelclock > 20000000) in ths7303_config()
176 else if (state->std_id) in ths7303_config()
179 /* disable all channels */ in ths7303_config()
188 struct ths7303_state *state = to_state(sd); in ths7303_s_stream() local
190 state->stream_on = enable; in ths7303_s_stream()
199 struct ths7303_state *state = to_state(sd); in ths7303_s_dv_timings() local
201 if (!dv_timings || dv_timings->type != V4L2_DV_BT_656_1120) in ths7303_s_dv_timings()
202 return -EINVAL; in ths7303_s_dv_timings()
204 state->bt = dv_timings->bt; in ths7303_s_dv_timings()
205 state->std_id = 0; in ths7303_s_dv_timings()
220 reg->size = 1; in ths7303_g_register()
221 reg->val = ths7303_read(sd, reg->reg); in ths7303_g_register()
228 ths7303_write(sd, reg->reg, reg->val); in ths7303_s_register()
234 "500-kHz Filter",
235 "2.5-MHz Filter",
236 "5-MHz Filter",
237 "5-MHz Filter",
246 "9-MHz LPF",
247 "16-MHz LPF",
248 "35-MHz LPF",
253 "Disable Channel",
254 "Mute Function - No Output",
282 struct ths7303_state *state = to_state(sd); in ths7303_log_status() local
284 v4l2_info(sd, "stream %s\n", state->stream_on ? "On" : "Off"); in ths7303_log_status()
286 if (state->bt.pixelclock) { in ths7303_log_status()
287 struct v4l2_bt_timings *bt = &state->bt; in ths7303_log_status()
294 bt->width, bt->height, bt->interlaced ? "i" : "p", in ths7303_log_status()
296 (int)bt->pixelclock / in ths7303_log_status()
299 (int)bt->pixelclock, bt->polarities); in ths7303_log_status()
331 struct ths7303_platform_data *pdata = client->dev.platform_data; in ths7303_probe()
332 struct ths7303_state *state; in ths7303_probe() local
336 dev_err(&client->dev, "No platform data\n"); in ths7303_probe()
337 return -EINVAL; in ths7303_probe()
340 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) in ths7303_probe()
341 return -ENODEV; in ths7303_probe()
344 client->addr << 1, client->adapter->name); in ths7303_probe()
346 state = devm_kzalloc(&client->dev, sizeof(struct ths7303_state), in ths7303_probe()
348 if (!state) in ths7303_probe()
349 return -ENOMEM; in ths7303_probe()
351 state->pdata = pdata; in ths7303_probe()
352 sd = &state->sd; in ths7303_probe()
358 return -EINVAL; in ths7303_probe()