media: i2c: alvium: Move V4L2_CID_GAIN to V4L2_CID_ANALOG_GAIN
Into alvium cameras REG_BCRM_GAIN_RW control the analog gain.
Let's use the right V4L2_CID_ANALOGUE_GAIN ctrl.
Fixes: 0a7af87291
("media: i2c: Add support for alvium camera")
Cc: stable@vger.kernel.org
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
b6167cce2b
commit
a50a2a3242
@ -1998,7 +1998,7 @@ static int alvium_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
|
|||||||
int val;
|
int val;
|
||||||
|
|
||||||
switch (ctrl->id) {
|
switch (ctrl->id) {
|
||||||
case V4L2_CID_GAIN:
|
case V4L2_CID_ANALOGUE_GAIN:
|
||||||
val = alvium_get_gain(alvium);
|
val = alvium_get_gain(alvium);
|
||||||
if (val < 0)
|
if (val < 0)
|
||||||
return val;
|
return val;
|
||||||
@ -2030,7 +2030,7 @@ static int alvium_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
switch (ctrl->id) {
|
switch (ctrl->id) {
|
||||||
case V4L2_CID_GAIN:
|
case V4L2_CID_ANALOGUE_GAIN:
|
||||||
ret = alvium_set_ctrl_gain(alvium, ctrl->val);
|
ret = alvium_set_ctrl_gain(alvium, ctrl->val);
|
||||||
break;
|
break;
|
||||||
case V4L2_CID_AUTOGAIN:
|
case V4L2_CID_AUTOGAIN:
|
||||||
@ -2159,7 +2159,7 @@ static int alvium_ctrl_init(struct alvium_dev *alvium)
|
|||||||
|
|
||||||
if (alvium->avail_ft.gain) {
|
if (alvium->avail_ft.gain) {
|
||||||
ctrls->gain = v4l2_ctrl_new_std(hdl, ops,
|
ctrls->gain = v4l2_ctrl_new_std(hdl, ops,
|
||||||
V4L2_CID_GAIN,
|
V4L2_CID_ANALOGUE_GAIN,
|
||||||
alvium->min_gain,
|
alvium->min_gain,
|
||||||
alvium->max_gain,
|
alvium->max_gain,
|
||||||
alvium->inc_gain,
|
alvium->inc_gain,
|
||||||
|
Loading…
Reference in New Issue
Block a user