Skip to content

Commit

Permalink
media: imx214: Add new control with V4L2_CID_UNIT_CELL_SIZE
Browse files Browse the repository at this point in the history
According to the product brief, the unit cell size is 1120 nanometers^2.

https://www.sony-semicon.co.jp/products_en/IS/sensor1/img/products/ProductBrief_IMX214_20150428.pdf

Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
ribalda authored and mchehab committed Oct 10, 2019
1 parent 2e8db63 commit d30f4e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/media/i2c/imx214.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ struct imx214 {
struct v4l2_ctrl *pixel_rate;
struct v4l2_ctrl *link_freq;
struct v4l2_ctrl *exposure;
struct v4l2_ctrl *unit_size;

struct regulator_bulk_data supplies[IMX214_NUM_SUPPLIES];

Expand Down Expand Up @@ -948,6 +949,10 @@ static int imx214_probe(struct i2c_client *client)
static const s64 link_freq[] = {
IMX214_DEFAULT_LINK_FREQ,
};
static const struct v4l2_area unit_size = {
.width = 1120,
.height = 1120,
};
int ret;

ret = imx214_parse_fwnode(dev);
Expand Down Expand Up @@ -1029,6 +1034,10 @@ static int imx214_probe(struct i2c_client *client)
V4L2_CID_EXPOSURE,
0, 3184, 1, 0x0c70);

imx214->unit_size = v4l2_ctrl_new_std_compound(&imx214->ctrls,
NULL,
V4L2_CID_UNIT_CELL_SIZE,
v4l2_ctrl_ptr_create((void *)&unit_size));
ret = imx214->ctrls.error;
if (ret) {
dev_err(&client->dev, "%s control init failed (%d)\n",
Expand Down

0 comments on commit d30f4e3

Please sign in to comment.