32 {0x0a, 0x14}, {0x40, 0x01},
33 {0x20, 0x17}, {0x07, 0x18},
66 ctrl->
value = data[0];
77 ctrl->
value = data[1] & 0x20 ? 1 : 0;
83 ctrl->
value = data[1] & 0x80 ? 1 : 0;
109 ctrl->
value = data[1] | (data[0] << 8);
110 if (ctrl->
value >= 0x10 && ctrl->
value <= 0x3f)
112 else if (ctrl->
value >= 0x60 && ctrl->
value <= 0x7f)
114 else if (ctrl->
value >= 0xe0 && ctrl->
value <= 0xff)
134 if (ctrl->
value <= (0x3f-0x10))
135 reg = 0x10 + ctrl->
value;
136 else if (ctrl->
value <= ((0x3f-0x10) + (0x7f-0x60)))
137 reg = 0x60 + (ctrl->
value - (0x3f-0x10));
139 reg = 0xe0 + (ctrl->
value - (0x3f-0x10) - (0x7f-0x60));
146 0x09, ctrl->
value, 0x00,
151 0x35, reg >> 8, reg & 0xff,
156 0x20, ctrl->
value ? 0x40:0x00,
157 ctrl->
value ? 0x20:0x00,
162 0x20, ctrl->
value ? 0x80:0x00,
163 ctrl->
value ? 0x80:0x00,
168 0x2d, reg >> 8, reg & 0xff,
173 0x2c, reg >> 8, reg & 0xff,
178 0x2b, reg >> 8, reg & 0xff,
181 0x2e, reg >> 8, reg & 0xff,
188 return err ? -
EIO : 0;
215 0x0a, 0x00, 0x03, 0, 0);
219 0x0a, 0x00, 0x05, 0, 0);
233 .i2c_slave_id = 0x5d,
234 .init = &mi0343_init,
243 .default_value = 0x06,
249 .name =
"global gain",
251 .maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),
259 .name =
"horizontal mirror",
269 .name =
"vertical mirror",
279 .name =
"red balance",
281 .maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),
289 .name =
"blue balance",
291 .maximum = (0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0),
299 .name =
"green balance",
301 .maximum = ((0x3f-0x10)+(0x7f-0x60)+(0xff-0xe0)),
303 .default_value = 0x00,
307 .get_ctrl = &mi0343_get_ctrl,
308 .set_ctrl = &mi0343_set_ctrl,
323 .set_crop = &mi0343_set_crop,
330 .set_pix_format = &mi0343_set_pix_format
346 if (data[1] != 0x42 || data[0] != 0xe3)