From 1290aeebda165e76959c1a9985f4a74be61ba2cd Mon Sep 17 00:00:00 2001 From: Yiqing Zeng Date: Tue, 22 Dec 2020 17:22:34 +0800 Subject: [PATCH] media: i2c: sc200ai: fix set hflip/vflip failed bug Signed-off-by: Yiqing Zeng Change-Id: I07f140b403076063f91b3b8fb976363ab689aa0b --- drivers/media/i2c/sc200ai.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/sc200ai.c b/drivers/media/i2c/sc200ai.c index 81aa77041432..8bd2161f4739 100644 --- a/drivers/media/i2c/sc200ai.c +++ b/drivers/media/i2c/sc200ai.c @@ -8,7 +8,8 @@ * V0.0X01.0X02 fix mclk issue when probe multiple camera. * V0.0X01.0X03 fix gain range. * V0.0X01.0X04 add enum_frame_interval function. - * V0.0X01.0X05 add quick stream on/off + * V0.0X01.0X05 add quick stream on/off. + * V0.0X01.0X06 fix set vflip/hflip failed bug. */ #include @@ -30,7 +31,7 @@ #include #include -#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x05) +#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x06) #ifndef V4L2_CID_DIGITAL_GAIN #define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN @@ -1711,6 +1712,12 @@ static int sc200ai_initialize_controls(struct sc200ai *sc200ai) V4L2_CID_TEST_PATTERN, ARRAY_SIZE(sc200ai_test_pattern_menu) - 1, 0, 0, sc200ai_test_pattern_menu); + v4l2_ctrl_new_std(handler, &sc200ai_ctrl_ops, + V4L2_CID_HFLIP, 0, 1, 1, 0); + + v4l2_ctrl_new_std(handler, &sc200ai_ctrl_ops, + V4L2_CID_VFLIP, 0, 1, 1, 0); + if (handler->error) { ret = handler->error; dev_err(&sc200ai->client->dev,