media: atomisp: Remove custom ATOMISP_IOC_ISP_MAKERNOTE ioctl
authorHans de Goede <hdegoede@redhat.com>
Sun, 11 Dec 2022 23:21:54 +0000 (00:21 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 07:00:46 +0000 (08:00 +0100)
This ioctl simply returns a couple of fixed sensor parameters.

With libcamera these fixed parameters are instead stored in a table
with sensor-name to parameters mappings (camera_sensor_properties.cpp),
so this custom ioctl is not necessary; and it currently has no users.

Remove the ioctl and also remove the custom v4l2-ctrls underpinning
the ioctl.

This is part of a patch-series which tries to remove atomisp specific /
custom code from the sensor drivers, with as end goal to make the atomisp
drivers regular camera sensor drivers.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
15 files changed:
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
drivers/staging/media/atomisp/i2c/gc0310.h
drivers/staging/media/atomisp/i2c/gc2235.h
drivers/staging/media/atomisp/i2c/mt9m114.h
drivers/staging/media/atomisp/i2c/ov2680.h
drivers/staging/media/atomisp/i2c/ov2722.h
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c
drivers/staging/media/atomisp/include/linux/atomisp.h
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_cmd.h
drivers/staging/media/atomisp/pci/atomisp_ioctl.c

index 87a634bf9ff55ececaab5017388af949fe85a494..a9c4724a935876be838bb7336f39e7a11390fd37 100644 (file)
@@ -241,27 +241,6 @@ static int gc0310_write_reg_array(struct i2c_client *client,
        return __gc0310_flush_reg_array(client, &ctrl);
 }
 
-static int gc0310_g_focal(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (GC0310_FOCAL_LENGTH_NUM << 16) | GC0310_FOCAL_LENGTH_DEM;
-       return 0;
-}
-
-static int gc0310_g_fnumber(struct v4l2_subdev *sd, s32 *val)
-{
-       /*const f number for imx*/
-       *val = (GC0310_F_NUMBER_DEFAULT_NUM << 16) | GC0310_F_NUMBER_DEM;
-       return 0;
-}
-
-static int gc0310_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (GC0310_F_NUMBER_DEFAULT_NUM << 24) |
-              (GC0310_F_NUMBER_DEM << 16) |
-              (GC0310_F_NUMBER_DEFAULT_NUM << 8) | GC0310_F_NUMBER_DEM;
-       return 0;
-}
-
 static int gc0310_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
 {
        struct gc0310_device *dev = to_gc0310_sensor(sd);
@@ -596,15 +575,6 @@ static int gc0310_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
        case V4L2_CID_EXPOSURE_ABSOLUTE:
                ret = gc0310_q_exposure(&dev->sd, &ctrl->val);
                break;
-       case V4L2_CID_FOCAL_ABSOLUTE:
-               ret = gc0310_g_focal(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_ABSOLUTE:
-               ret = gc0310_g_fnumber(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_RANGE:
-               ret = gc0310_g_fnumber_range(&dev->sd, &ctrl->val);
-               break;
        case V4L2_CID_BIN_FACTOR_HORZ:
                ret = gc0310_g_bin_factor_x(&dev->sd, &ctrl->val);
                break;
@@ -655,39 +625,6 @@ static const struct v4l2_ctrl_config gc0310_controls[] = {
                .step = 1,
                .def = 0,
        },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FOCAL_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "focal length",
-               .min = GC0310_FOCAL_LENGTH_DEFAULT,
-               .max = GC0310_FOCAL_LENGTH_DEFAULT,
-               .step = 0x01,
-               .def = GC0310_FOCAL_LENGTH_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number",
-               .min = GC0310_F_NUMBER_DEFAULT,
-               .max = GC0310_F_NUMBER_DEFAULT,
-               .step = 0x01,
-               .def = GC0310_F_NUMBER_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_RANGE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number range",
-               .min = GC0310_F_NUMBER_RANGE,
-               .max = GC0310_F_NUMBER_RANGE,
-               .step = 0x01,
-               .def = GC0310_F_NUMBER_RANGE,
-               .flags = 0,
-       },
        {
                .ops = &ctrl_ops,
                .id = V4L2_CID_BIN_FACTOR_HORZ,
index 4d5a7e335f85fa72b0760129ba1be7eb2233b8b6..e6df10bcab8c99d7ed350a260dc2882d9a8002fb 100644 (file)
@@ -220,27 +220,6 @@ static int gc2235_write_reg_array(struct i2c_client *client,
        return __gc2235_flush_reg_array(client, &ctrl);
 }
 
-static int gc2235_g_focal(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (GC2235_FOCAL_LENGTH_NUM << 16) | GC2235_FOCAL_LENGTH_DEM;
-       return 0;
-}
-
-static int gc2235_g_fnumber(struct v4l2_subdev *sd, s32 *val)
-{
-       /* const f number for imx */
-       *val = (GC2235_F_NUMBER_DEFAULT_NUM << 16) | GC2235_F_NUMBER_DEM;
-       return 0;
-}
-
-static int gc2235_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (GC2235_F_NUMBER_DEFAULT_NUM << 24) |
-              (GC2235_F_NUMBER_DEM << 16) |
-              (GC2235_F_NUMBER_DEFAULT_NUM << 8) | GC2235_F_NUMBER_DEM;
-       return 0;
-}
-
 static int gc2235_get_intg_factor(struct i2c_client *client,
                                  struct camera_mipi_info *info,
                                  const struct gc2235_resolution *res)
@@ -467,15 +446,6 @@ static int gc2235_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
        case V4L2_CID_EXPOSURE_ABSOLUTE:
                ret = gc2235_q_exposure(&dev->sd, &ctrl->val);
                break;
-       case V4L2_CID_FOCAL_ABSOLUTE:
-               ret = gc2235_g_focal(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_ABSOLUTE:
-               ret = gc2235_g_fnumber(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_RANGE:
-               ret = gc2235_g_fnumber_range(&dev->sd, &ctrl->val);
-               break;
        default:
                ret = -EINVAL;
        }
@@ -499,39 +469,6 @@ static struct v4l2_ctrl_config gc2235_controls[] = {
                .def = 0x00,
                .flags = 0,
        },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FOCAL_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "focal length",
-               .min = GC2235_FOCAL_LENGTH_DEFAULT,
-               .max = GC2235_FOCAL_LENGTH_DEFAULT,
-               .step = 0x01,
-               .def = GC2235_FOCAL_LENGTH_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number",
-               .min = GC2235_F_NUMBER_DEFAULT,
-               .max = GC2235_F_NUMBER_DEFAULT,
-               .step = 0x01,
-               .def = GC2235_F_NUMBER_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_RANGE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number range",
-               .min = GC2235_F_NUMBER_RANGE,
-               .max = GC2235_F_NUMBER_RANGE,
-               .step = 0x01,
-               .def = GC2235_F_NUMBER_RANGE,
-               .flags = 0,
-       },
 };
 
 static int __gc2235_init(struct v4l2_subdev *sd)
index a0e8e94b241256977524af322ab54d3dd98375e3..eb34b5cadb3398341ac0a9ac03be9aa8b3338214 100644 (file)
@@ -841,28 +841,6 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,
        return 0;
 }
 
-/* TODO: Update to SOC functions, remove exposure and gain */
-static int mt9m114_g_focal(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (MT9M114_FOCAL_LENGTH_NUM << 16) | MT9M114_FOCAL_LENGTH_DEM;
-       return 0;
-}
-
-static int mt9m114_g_fnumber(struct v4l2_subdev *sd, s32 *val)
-{
-       /* const f number for mt9m114 */
-       *val = (MT9M114_F_NUMBER_DEFAULT_NUM << 16) | MT9M114_F_NUMBER_DEM;
-       return 0;
-}
-
-static int mt9m114_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (MT9M114_F_NUMBER_DEFAULT_NUM << 24) |
-              (MT9M114_F_NUMBER_DEM << 16) |
-              (MT9M114_F_NUMBER_DEFAULT_NUM << 8) | MT9M114_F_NUMBER_DEM;
-       return 0;
-}
-
 /* Horizontal flip the image. */
 static int mt9m114_g_hflip(struct v4l2_subdev *sd, s32 *val)
 {
@@ -1271,15 +1249,6 @@ static int mt9m114_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
        case V4L2_CID_HFLIP:
                ret = mt9m114_g_hflip(&dev->sd, &ctrl->val);
                break;
-       case V4L2_CID_FOCAL_ABSOLUTE:
-               ret = mt9m114_g_focal(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_ABSOLUTE:
-               ret = mt9m114_g_fnumber(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_RANGE:
-               ret = mt9m114_g_fnumber_range(&dev->sd, &ctrl->val);
-               break;
        case V4L2_CID_EXPOSURE_ABSOLUTE:
                ret = mt9m114_g_exposure(&dev->sd, &ctrl->val);
                break;
@@ -1331,39 +1300,6 @@ static struct v4l2_ctrl_config mt9m114_controls[] = {
                .step = 1,
                .def = 0,
        },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FOCAL_ABSOLUTE,
-               .name = "focal length",
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .min = MT9M114_FOCAL_LENGTH_DEFAULT,
-               .max = MT9M114_FOCAL_LENGTH_DEFAULT,
-               .step = 1,
-               .def = MT9M114_FOCAL_LENGTH_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_ABSOLUTE,
-               .name = "f-number",
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .min = MT9M114_F_NUMBER_DEFAULT,
-               .max = MT9M114_F_NUMBER_DEFAULT,
-               .step = 1,
-               .def = MT9M114_F_NUMBER_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_RANGE,
-               .name = "f-number range",
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .min = MT9M114_F_NUMBER_RANGE,
-               .max = MT9M114_F_NUMBER_RANGE,
-               .step = 1,
-               .def = MT9M114_F_NUMBER_RANGE,
-               .flags = 0,
-       },
        {
                .ops = &ctrl_ops,
                .id = V4L2_CID_EXPOSURE_ABSOLUTE,
index fa1de45b7a2df6fb861066c61004759326c3a81e..39f86c7fd12e8027ab2ade604f43128ef10c86db 100644 (file)
@@ -119,28 +119,6 @@ static int ov2680_write_reg_array(struct i2c_client *client,
        return 0;
 }
 
-static int ov2680_g_focal(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (OV2680_FOCAL_LENGTH_NUM << 16) | OV2680_FOCAL_LENGTH_DEM;
-       return 0;
-}
-
-static int ov2680_g_fnumber(struct v4l2_subdev *sd, s32 *val)
-{
-       /* const f number for ov2680 */
-
-       *val = (OV2680_F_NUMBER_DEFAULT_NUM << 16) | OV2680_F_NUMBER_DEM;
-       return 0;
-}
-
-static int ov2680_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (OV2680_F_NUMBER_DEFAULT_NUM << 24) |
-              (OV2680_F_NUMBER_DEM << 16) |
-              (OV2680_F_NUMBER_DEFAULT_NUM << 8) | OV2680_F_NUMBER_DEM;
-       return 0;
-}
-
 static int ov2680_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
 {
        struct ov2680_device *dev = to_ov2680_sensor(sd);
@@ -517,15 +495,6 @@ static int ov2680_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
        case V4L2_CID_EXPOSURE_ABSOLUTE:
                ret = ov2680_q_exposure(&dev->sd, &ctrl->val);
                break;
-       case V4L2_CID_FOCAL_ABSOLUTE:
-               ret = ov2680_g_focal(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_ABSOLUTE:
-               ret = ov2680_g_fnumber(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_RANGE:
-               ret = ov2680_g_fnumber_range(&dev->sd, &ctrl->val);
-               break;
        case V4L2_CID_BIN_FACTOR_HORZ:
                ret = ov2680_g_bin_factor_x(&dev->sd, &ctrl->val);
                break;
@@ -556,39 +525,6 @@ static const struct v4l2_ctrl_config ov2680_controls[] = {
                .def = 0x00,
                .flags = 0,
        },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FOCAL_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "focal length",
-               .min = OV2680_FOCAL_LENGTH_DEFAULT,
-               .max = OV2680_FOCAL_LENGTH_DEFAULT,
-               .step = 0x01,
-               .def = OV2680_FOCAL_LENGTH_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number",
-               .min = OV2680_F_NUMBER_DEFAULT,
-               .max = OV2680_F_NUMBER_DEFAULT,
-               .step = 0x01,
-               .def = OV2680_F_NUMBER_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_RANGE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number range",
-               .min = OV2680_F_NUMBER_RANGE,
-               .max = OV2680_F_NUMBER_RANGE,
-               .step = 0x01,
-               .def = OV2680_F_NUMBER_RANGE,
-               .flags = 0,
-       },
        {
                .ops = &ctrl_ops,
                .id = V4L2_CID_BIN_FACTOR_HORZ,
index 887b6f99f6cab75a583bde4cb825fe033b21df11..47eefaccbe0bb52acd4f76b7b3dbd481b99e169b 100644 (file)
@@ -261,27 +261,6 @@ static int ov2722_write_reg_array(struct i2c_client *client,
        return __ov2722_flush_reg_array(client, &ctrl);
 }
 
-static int ov2722_g_focal(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (OV2722_FOCAL_LENGTH_NUM << 16) | OV2722_FOCAL_LENGTH_DEM;
-       return 0;
-}
-
-static int ov2722_g_fnumber(struct v4l2_subdev *sd, s32 *val)
-{
-       /*const f number for imx*/
-       *val = (OV2722_F_NUMBER_DEFAULT_NUM << 16) | OV2722_F_NUMBER_DEM;
-       return 0;
-}
-
-static int ov2722_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (OV2722_F_NUMBER_DEFAULT_NUM << 24) |
-              (OV2722_F_NUMBER_DEM << 16) |
-              (OV2722_F_NUMBER_DEFAULT_NUM << 8) | OV2722_F_NUMBER_DEM;
-       return 0;
-}
-
 static int ov2722_get_intg_factor(struct i2c_client *client,
                                  struct camera_mipi_info *info,
                                  const struct ov2722_resolution *res)
@@ -547,15 +526,6 @@ static int ov2722_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
        case V4L2_CID_EXPOSURE_ABSOLUTE:
                ret = ov2722_q_exposure(&dev->sd, &ctrl->val);
                break;
-       case V4L2_CID_FOCAL_ABSOLUTE:
-               ret = ov2722_g_focal(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_ABSOLUTE:
-               ret = ov2722_g_fnumber(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_RANGE:
-               ret = ov2722_g_fnumber_range(&dev->sd, &ctrl->val);
-               break;
        case V4L2_CID_LINK_FREQ:
                val = dev->res->mipi_freq;
                if (val == 0)
@@ -586,39 +556,6 @@ static const struct v4l2_ctrl_config ov2722_controls[] = {
                .def = 0x00,
                .flags = 0,
        },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FOCAL_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "focal length",
-               .min = OV2722_FOCAL_LENGTH_DEFAULT,
-               .max = OV2722_FOCAL_LENGTH_DEFAULT,
-               .step = 0x01,
-               .def = OV2722_FOCAL_LENGTH_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number",
-               .min = OV2722_F_NUMBER_DEFAULT,
-               .max = OV2722_F_NUMBER_DEFAULT,
-               .step = 0x01,
-               .def = OV2722_F_NUMBER_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_RANGE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number range",
-               .min = OV2722_F_NUMBER_RANGE,
-               .max = OV2722_F_NUMBER_RANGE,
-               .step = 0x01,
-               .def = OV2722_F_NUMBER_RANGE,
-               .flags = 0,
-       },
        {
                .ops = &ctrl_ops,
                .id = V4L2_CID_LINK_FREQ,
index 4b9ce681bd9370856ee27913776567dedb038554..52b4c07e5cf09ec045316c7c796d5cc8dc2e50d5 100644 (file)
@@ -38,9 +38,6 @@
 #define I2C_RETRY_COUNT                5
 
 #define GC0310_FOCAL_LENGTH_NUM        278     /*2.78mm*/
-#define GC0310_FOCAL_LENGTH_DEM        100
-#define GC0310_F_NUMBER_DEFAULT_NUM    26
-#define GC0310_F_NUMBER_DEM    10
 
 #define MAX_FMTS               1
 
index 806be5dff7a52e2b4c663eac196854c11bc16024..dd2d44b40e228763a5ef4b9ac9e8a730eb244357 100644 (file)
@@ -44,9 +44,6 @@
 #define I2C_RETRY_COUNT                5
 
 #define GC2235_FOCAL_LENGTH_NUM        278     /*2.78mm*/
-#define GC2235_FOCAL_LENGTH_DEM        100
-#define GC2235_F_NUMBER_DEFAULT_NUM    26
-#define GC2235_F_NUMBER_DEM    10
 
 #define MAX_FMTS               1
 
index bcce18b65fa68f119438f8cf638afd73b6d2b937..831875071cbb6069b6198e6c6e8f8b76913a381d 100644 (file)
 #define MT9M114_BPAT_BGBGGRGR  BIT(3)
 
 #define MT9M114_FOCAL_LENGTH_NUM       208     /*2.08mm*/
-#define MT9M114_FOCAL_LENGTH_DEM       100
-#define MT9M114_F_NUMBER_DEFAULT_NUM   24
-#define MT9M114_F_NUMBER_DEM   10
 #define MT9M114_WAIT_STAT_TIMEOUT      100
 #define MT9M114_FLICKER_MODE_50HZ      1
 #define MT9M114_FLICKER_MODE_60HZ      2
index 7ab337b859adf844b1878db8d702b5d132d5cd81..2bc350c677116c0ebf9deae0b9f199843f16db40 100644 (file)
@@ -37,9 +37,6 @@
 #define I2C_RETRY_COUNT                5
 
 #define OV2680_FOCAL_LENGTH_NUM        334     /*3.34mm*/
-#define OV2680_FOCAL_LENGTH_DEM        100
-#define OV2680_F_NUMBER_DEFAULT_NUM    24
-#define OV2680_F_NUMBER_DEM    10
 
 #define OV2680_BIN_FACTOR_MAX 4
 
index d6e2510bc01c3bfc4e8c543c141af74da0e59673..d4cd6f27ee8d614fba45015f712cc4520ed9baf4 100644 (file)
@@ -39,9 +39,6 @@
 #define I2C_RETRY_COUNT                5
 
 #define OV2722_FOCAL_LENGTH_NUM        278     /*2.78mm*/
-#define OV2722_FOCAL_LENGTH_DEM        100
-#define OV2722_F_NUMBER_DEFAULT_NUM    26
-#define OV2722_F_NUMBER_DEM    10
 
 #define MAX_FMTS               1
 
index c1cd631455e6930a434bf6980b60e57a57dd1458..9adaf2fc940af8548de6c33cd2956e6650d93f3a 100644 (file)
@@ -415,27 +415,6 @@ static int ov5693_write_reg_array(struct i2c_client *client,
        return __ov5693_flush_reg_array(client, &ctrl);
 }
 
-static int ov5693_g_focal(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (OV5693_FOCAL_LENGTH_NUM << 16) | OV5693_FOCAL_LENGTH_DEM;
-       return 0;
-}
-
-static int ov5693_g_fnumber(struct v4l2_subdev *sd, s32 *val)
-{
-       /*const f number for imx*/
-       *val = (OV5693_F_NUMBER_DEFAULT_NUM << 16) | OV5693_F_NUMBER_DEM;
-       return 0;
-}
-
-static int ov5693_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
-{
-       *val = (OV5693_F_NUMBER_DEFAULT_NUM << 24) |
-              (OV5693_F_NUMBER_DEM << 16) |
-              (OV5693_F_NUMBER_DEFAULT_NUM << 8) | OV5693_F_NUMBER_DEM;
-       return 0;
-}
-
 static int ov5693_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
 {
        struct ov5693_device *dev = to_ov5693_sensor(sd);
@@ -1107,15 +1086,6 @@ static int ov5693_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
        case V4L2_CID_EXPOSURE_ABSOLUTE:
                ret = ov5693_q_exposure(&dev->sd, &ctrl->val);
                break;
-       case V4L2_CID_FOCAL_ABSOLUTE:
-               ret = ov5693_g_focal(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_ABSOLUTE:
-               ret = ov5693_g_fnumber(&dev->sd, &ctrl->val);
-               break;
-       case V4L2_CID_FNUMBER_RANGE:
-               ret = ov5693_g_fnumber_range(&dev->sd, &ctrl->val);
-               break;
        case V4L2_CID_FOCUS_ABSOLUTE:
                ret = ov5693_q_focus_abs(&dev->sd, &ctrl->val);
                break;
@@ -1152,39 +1122,6 @@ static const struct v4l2_ctrl_config ov5693_controls[] = {
                .def = 0x00,
                .flags = 0,
        },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FOCAL_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "focal length",
-               .min = OV5693_FOCAL_LENGTH_DEFAULT,
-               .max = OV5693_FOCAL_LENGTH_DEFAULT,
-               .step = 0x01,
-               .def = OV5693_FOCAL_LENGTH_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_ABSOLUTE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number",
-               .min = OV5693_F_NUMBER_DEFAULT,
-               .max = OV5693_F_NUMBER_DEFAULT,
-               .step = 0x01,
-               .def = OV5693_F_NUMBER_DEFAULT,
-               .flags = 0,
-       },
-       {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_FNUMBER_RANGE,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "f-number range",
-               .min = OV5693_F_NUMBER_RANGE,
-               .max = OV5693_F_NUMBER_RANGE,
-               .step = 0x01,
-               .def = OV5693_F_NUMBER_RANGE,
-               .flags = 0,
-       },
        {
                .ops = &ctrl_ops,
                .id = V4L2_CID_FOCUS_ABSOLUTE,
index 3f602b5aaff922568eacbff576986c3982b9db11..e70e57695300322a6e96f22845fa5ef718719626 100644 (file)
@@ -586,20 +586,6 @@ struct atomisp_shading_table {
        __u16 *data[ATOMISP_NUM_SC_COLORS];
 };
 
-struct atomisp_makernote_info {
-       /* bits 31-16: numerator, bits 15-0: denominator */
-       unsigned int focal_length;
-       /* bits 31-16: numerator, bits 15-0: denominator*/
-       unsigned int f_number_curr;
-       /*
-       * bits 31-24: max f-number numerator
-       * bits 23-16: max f-number denominator
-       * bits 15-8: min f-number numerator
-       * bits 7-0: min f-number denominator
-       */
-       unsigned int f_number_range;
-};
-
 /* parameter for MACC */
 #define ATOMISP_NUM_MACC_AXES           16
 struct atomisp_macc_table {
@@ -914,8 +900,6 @@ struct atomisp_sensor_ae_bracketing_lut {
        _IOR('v', BASE_VIDIOC_PRIVATE + 10, struct atomisp_morph_table)
 #define ATOMISP_IOC_S_ISP_GDC_TAB \
        _IOW('v', BASE_VIDIOC_PRIVATE + 10, struct atomisp_morph_table)
-#define ATOMISP_IOC_ISP_MAKERNOTE \
-       _IOWR('v', BASE_VIDIOC_PRIVATE + 11, struct atomisp_makernote_info)
 
 /* macc parameter control*/
 #define ATOMISP_IOC_G_ISP_MACC \
@@ -1093,10 +1077,6 @@ struct atomisp_sensor_ae_bracketing_lut {
  * Exposure, Flash and privacy (indicator) light controls, to be upstreamed */
 #define V4L2_CID_CAMERA_LASTP1             (V4L2_CID_CAMERA_CLASS_BASE + 1024)
 
-#define V4L2_CID_FOCAL_ABSOLUTE            (V4L2_CID_CAMERA_LASTP1 + 0)
-#define V4L2_CID_FNUMBER_ABSOLUTE          (V4L2_CID_CAMERA_LASTP1 + 1)
-#define V4L2_CID_FNUMBER_RANGE             (V4L2_CID_CAMERA_LASTP1 + 2)
-
 /* Flash related CIDs, see also:
  * http://linuxtv.org/downloads/v4l-dvb-apis/extended-controls.html\
  * #flash-controls */
index 33accdf8f3b44206d4838acf8c913ab0fbccf64c..6ee845375a9430434902ec24c4fe3d5a088f4674 100644 (file)
@@ -5493,42 +5493,6 @@ out:
        return ret;
 }
 
-int atomisp_exif_makernote(struct atomisp_sub_device *asd,
-                          struct atomisp_makernote_info *config)
-{
-       struct v4l2_control ctrl;
-       struct atomisp_device *isp = asd->isp;
-
-       ctrl.id = V4L2_CID_FOCAL_ABSOLUTE;
-       if (v4l2_g_ctrl
-           (isp->inputs[asd->input_curr].camera->ctrl_handler, &ctrl)) {
-               dev_warn(isp->dev, "failed to g_ctrl for focal length\n");
-               return -EINVAL;
-       } else {
-               config->focal_length = ctrl.value;
-       }
-
-       ctrl.id = V4L2_CID_FNUMBER_ABSOLUTE;
-       if (v4l2_g_ctrl
-           (isp->inputs[asd->input_curr].camera->ctrl_handler, &ctrl)) {
-               dev_warn(isp->dev, "failed to g_ctrl for f-number\n");
-               return -EINVAL;
-       } else {
-               config->f_number_curr = ctrl.value;
-       }
-
-       ctrl.id = V4L2_CID_FNUMBER_RANGE;
-       if (v4l2_g_ctrl
-           (isp->inputs[asd->input_curr].camera->ctrl_handler, &ctrl)) {
-               dev_warn(isp->dev, "failed to g_ctrl for f number range\n");
-               return -EINVAL;
-       } else {
-               config->f_number_range = ctrl.value;
-       }
-
-       return 0;
-}
-
 int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
                                      struct atomisp_cont_capture_conf *cvf_config)
 {
index e31ba24ec6d54199241cabe5ba2285617ff10e6b..2dfb4abfe463276abc81f930844c8f259f24031b 100644 (file)
@@ -274,9 +274,6 @@ int atomisp_set_shading_table(struct atomisp_sub_device *asd,
 int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
                                      struct atomisp_cont_capture_conf *cvf_config);
 
-int atomisp_exif_makernote(struct atomisp_sub_device *asd,
-                          struct atomisp_makernote_info *config);
-
 void atomisp_free_internal_buffers(struct atomisp_sub_device *asd);
 
 int atomisp_s_ae_window(struct atomisp_sub_device *asd,
index ef6eaad9b634f8fe7b1b721baf8e46a9b6682508..13fc6074dfde5b2c490935f7dc16d3f914111b0c 100644 (file)
@@ -1640,7 +1640,6 @@ static int atomisp_g_ctrl(struct file *file, void *fh,
        switch (control->id) {
        case V4L2_CID_IRIS_ABSOLUTE:
        case V4L2_CID_EXPOSURE_ABSOLUTE:
-       case V4L2_CID_FNUMBER_ABSOLUTE:
        case V4L2_CID_2A_STATUS:
        case V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE:
        case V4L2_CID_EXPOSURE:
@@ -1837,7 +1836,6 @@ static int atomisp_camera_g_ext_ctrls(struct file *file, void *fh,
                case V4L2_CID_EXPOSURE_ABSOLUTE:
                case V4L2_CID_EXPOSURE_AUTO:
                case V4L2_CID_IRIS_ABSOLUTE:
-               case V4L2_CID_FNUMBER_ABSOLUTE:
                case V4L2_CID_BIN_FACTOR_HORZ:
                case V4L2_CID_BIN_FACTOR_VERT:
                case V4L2_CID_3A_LOCK:
@@ -1949,7 +1947,6 @@ static int atomisp_camera_s_ext_ctrls(struct file *file, void *fh,
                case V4L2_CID_EXPOSURE_AUTO:
                case V4L2_CID_EXPOSURE_METERING:
                case V4L2_CID_IRIS_ABSOLUTE:
-               case V4L2_CID_FNUMBER_ABSOLUTE:
                case V4L2_CID_VCM_TIMING:
                case V4L2_CID_VCM_SLEW:
                case V4L2_CID_3A_LOCK:
@@ -2285,10 +2282,6 @@ static long atomisp_vidioc_default(struct file *file, void *fh,
                err = atomisp_fixed_pattern_table(asd, arg);
                break;
 
-       case ATOMISP_IOC_ISP_MAKERNOTE:
-               err = atomisp_exif_makernote(asd, arg);
-               break;
-
        case ATOMISP_IOC_G_SENSOR_MODE_DATA:
                err = atomisp_get_sensor_mode_data(asd, arg);
                break;