Lines Matching +full:gain +full:- +full:scaling +full:- +full:n

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2005-2006 Micronas USA Inc.
12 #include <media/v4l2-device.h>
13 #include <media/v4l2-ctrls.h>
38 0x0d, 0x00, /* scaling */
39 0x0e, 0x11, /* scaling */
40 0x0f, 0x00, /* scaling */
44 0x13, 0x7e, /* U gain */
45 0x14, 0x7e, /* V gain */
58 0x00, 0x00, /* Terminator (reg 0x00 is read-only) */
74 return -1; in write_regs()
105 dec->norm = norm; in tw9906_s_std()
111 struct tw9906 *dec = container_of(ctrl->handler, struct tw9906, hdl); in tw9906_s_ctrl()
112 struct v4l2_subdev *sd = &dec->sd; in tw9906_s_ctrl()
114 switch (ctrl->id) { in tw9906_s_ctrl()
116 write_reg(sd, 0x10, ctrl->val); in tw9906_s_ctrl()
119 write_reg(sd, 0x11, ctrl->val); in tw9906_s_ctrl()
122 write_reg(sd, 0x15, ctrl->val); in tw9906_s_ctrl()
125 return -EINVAL; in tw9906_s_ctrl()
133 bool is_60hz = dec->norm & V4L2_STD_525_60; in tw9906_log_status()
135 v4l2_info(sd, "Standard: %d Hz\n", is_60hz ? 60 : 50); in tw9906_log_status()
140 /* --------------------------------------------------------------------------*/
167 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) in tw9906_probe()
168 return -EIO; in tw9906_probe()
170 v4l_info(client, "chip found @ 0x%02x (%s)\n", in tw9906_probe()
171 client->addr << 1, client->adapter->name); in tw9906_probe()
173 dec = devm_kzalloc(&client->dev, sizeof(*dec), GFP_KERNEL); in tw9906_probe()
175 return -ENOMEM; in tw9906_probe()
176 sd = &dec->sd; in tw9906_probe()
178 hdl = &dec->hdl; in tw9906_probe()
181 V4L2_CID_BRIGHTNESS, -128, 127, 1, 0); in tw9906_probe()
185 V4L2_CID_HUE, -128, 127, 1, 0); in tw9906_probe()
186 sd->ctrl_handler = hdl; in tw9906_probe()
187 if (hdl->error) { in tw9906_probe()
188 int err = hdl->error; in tw9906_probe()
195 dec->norm = V4L2_STD_NTSC; in tw9906_probe()
198 v4l2_err(client, "error initializing TW9906\n"); in tw9906_probe()
199 return -EINVAL; in tw9906_probe()
210 v4l2_ctrl_handler_free(&to_state(sd)->hdl); in tw9906_remove()
213 /* ----------------------------------------------------------------------- */