aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/tcm825x.c6
-rw-r--r--drivers/media/video/tcm825x.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/video/tcm825x.c b/drivers/media/video/tcm825x.c
index 8f0100f67a9..29991d1cf13 100644
--- a/drivers/media/video/tcm825x.c
+++ b/drivers/media/video/tcm825x.c
@@ -523,6 +523,9 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s,
523 if (val < 0) 523 if (val < 0)
524 return val; 524 return val;
525 525
526 if (vc->id == V4L2_CID_HFLIP || vc->id == V4L2_CID_VFLIP)
527 val ^= sensor->platform_data->is_upside_down();
528
526 vc->value = val; 529 vc->value = val;
527 return 0; 530 return 0;
528} 531}
@@ -556,6 +559,9 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s,
556 if (lvc == NULL) 559 if (lvc == NULL)
557 return -EINVAL; 560 return -EINVAL;
558 561
562 if (vc->id == V4L2_CID_HFLIP || vc->id == V4L2_CID_VFLIP)
563 val ^= sensor->platform_data->is_upside_down();
564
559 val = val << lvc->start_bit; 565 val = val << lvc->start_bit;
560 if (tcm825x_write_reg_mask(client, lvc->reg, val)) 566 if (tcm825x_write_reg_mask(client, lvc->reg, val))
561 return -EIO; 567 return -EIO;
diff --git a/drivers/media/video/tcm825x.h b/drivers/media/video/tcm825x.h
index 966765b66b3..770ebacfa34 100644
--- a/drivers/media/video/tcm825x.h
+++ b/drivers/media/video/tcm825x.h
@@ -182,6 +182,7 @@ struct tcm825x_platform_data {
182 int (*needs_reset)(struct v4l2_int_device *s, void *buf, 182 int (*needs_reset)(struct v4l2_int_device *s, void *buf,
183 struct v4l2_pix_format *fmt); 183 struct v4l2_pix_format *fmt);
184 int (*ifparm)(struct v4l2_ifparm *p); 184 int (*ifparm)(struct v4l2_ifparm *p);
185 int (*is_upside_down)(void);
185}; 186};
186 187
187/* Array of image sizes supported by TCM825X. These must be ordered from 188/* Array of image sizes supported by TCM825X. These must be ordered from