Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc-camera: update mt9v022 to take into account board signal routing

Use soc_camera_apply_sensor_flags() in mt9v022 to account for any inverters in
video signal paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Guennadi Liakhovetski and committed by
Mauro Carvalho Chehab
4a9ce755 917c5009

+10 -11
+10 -11
drivers/media/video/mt9v022.c
··· 257 257 static unsigned long mt9v022_query_bus_param(struct soc_camera_device *icd) 258 258 { 259 259 struct soc_camera_link *icl = to_soc_camera_link(icd); 260 - unsigned int width_flag; 261 - 262 - if (icl->query_bus_param) 263 - width_flag = icl->query_bus_param(icl) & 264 - SOCAM_DATAWIDTH_MASK; 265 - else 266 - width_flag = SOCAM_DATAWIDTH_10; 267 - 268 - return SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING | 260 + unsigned int flags = SOCAM_MASTER | SOCAM_SLAVE | 261 + SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING | 269 262 SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW | 270 263 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW | 271 - SOCAM_DATA_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_SLAVE | 272 - width_flag; 264 + SOCAM_DATA_ACTIVE_HIGH; 265 + 266 + if (icl->query_bus_param) 267 + flags |= icl->query_bus_param(icl) & SOCAM_DATAWIDTH_MASK; 268 + else 269 + flags |= SOCAM_DATAWIDTH_10; 270 + 271 + return soc_camera_apply_sensor_flags(icl, flags); 273 272 } 274 273 275 274 static int mt9v022_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)