diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-04-16 08:41:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-17 08:18:09 -0400 |
commit | 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 (patch) | |
tree | dd9f045fa482ee601cdf4ee67c649530f22abc5e /drivers/media/i2c | |
parent | 7d6bc608e062f6b6667c9eeeb17055f017ecadb1 (diff) |
[media] v4l2-ctrls: increase internal min/max/step/def to 64 bit
While VIDIOC_QUERYCTRL is limited to 32 bit min/max/step/def values
for controls, the upcoming VIDIOC_QUERY_EXT_CTRL isn't. So increase
the internal representation to 64 bits in preparation.
Because of these changes the msi3101 driver has been modified slightly
to fix a formatting issue (%d becomes %lld), vivi had to be modified
as well to cope with the new 64-bit min/max values and the PIXEL_RATE
control in a few sensor drivers required proper min/max/def values.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/mt9v032.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c index 40172b8d8ea2..65e6e1a9d104 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c | |||
@@ -931,7 +931,7 @@ static int mt9v032_probe(struct i2c_client *client, | |||
931 | 931 | ||
932 | mt9v032->pixel_rate = | 932 | mt9v032->pixel_rate = |
933 | v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops, | 933 | v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops, |
934 | V4L2_CID_PIXEL_RATE, 0, 0, 1, 0); | 934 | V4L2_CID_PIXEL_RATE, 1, INT_MAX, 1, 1); |
935 | 935 | ||
936 | if (pdata && pdata->link_freqs) { | 936 | if (pdata && pdata->link_freqs) { |
937 | unsigned int def = 0; | 937 | unsigned int def = 0; |
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 446c82c58a62..72350f0befc5 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c | |||
@@ -533,7 +533,7 @@ static int smiapp_init_controls(struct smiapp_sensor *sensor) | |||
533 | 533 | ||
534 | sensor->pixel_rate_parray = v4l2_ctrl_new_std( | 534 | sensor->pixel_rate_parray = v4l2_ctrl_new_std( |
535 | &sensor->pixel_array->ctrl_handler, &smiapp_ctrl_ops, | 535 | &sensor->pixel_array->ctrl_handler, &smiapp_ctrl_ops, |
536 | V4L2_CID_PIXEL_RATE, 0, 0, 1, 0); | 536 | V4L2_CID_PIXEL_RATE, 1, INT_MAX, 1, 1); |
537 | 537 | ||
538 | if (sensor->pixel_array->ctrl_handler.error) { | 538 | if (sensor->pixel_array->ctrl_handler.error) { |
539 | dev_err(&client->dev, | 539 | dev_err(&client->dev, |
@@ -562,7 +562,7 @@ static int smiapp_init_controls(struct smiapp_sensor *sensor) | |||
562 | 562 | ||
563 | sensor->pixel_rate_csi = v4l2_ctrl_new_std( | 563 | sensor->pixel_rate_csi = v4l2_ctrl_new_std( |
564 | &sensor->src->ctrl_handler, &smiapp_ctrl_ops, | 564 | &sensor->src->ctrl_handler, &smiapp_ctrl_ops, |
565 | V4L2_CID_PIXEL_RATE, 0, 0, 1, 0); | 565 | V4L2_CID_PIXEL_RATE, 1, INT_MAX, 1, 1); |
566 | 566 | ||
567 | if (sensor->src->ctrl_handler.error) { | 567 | if (sensor->src->ctrl_handler.error) { |
568 | dev_err(&client->dev, | 568 | dev_err(&client->dev, |