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 87a634b..a9c4724 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;
@@ -657,39 +627,6 @@ static const struct v4l2_ctrl_config gc0310_controls[] = {
        },
        {
                .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,
                .type = V4L2_CTRL_TYPE_INTEGER,
                .name = "horizontal binning factor",
index 4d5a7e3..e6df10b 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 a0e8e94..eb34b5c 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;
@@ -1333,39 +1302,6 @@ static struct v4l2_ctrl_config mt9m114_controls[] = {
        },
        {
                .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,
                .name = "exposure",
                .type = V4L2_CTRL_TYPE_INTEGER,
index fa1de45..39f86c7 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;
@@ -558,39 +527,6 @@ static const struct v4l2_ctrl_config ov2680_controls[] = {
        },
        {
                .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,
                .type = V4L2_CTRL_TYPE_INTEGER,
                .name = "horizontal binning factor",
index 887b6f9..47eefac 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)
@@ -588,39 +558,6 @@ static const struct v4l2_ctrl_config ov2722_controls[] = {
        },
        {
                .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,
                .name = "Link Frequency",
                .type = V4L2_CTRL_TYPE_INTEGER,
index 4b9ce68..52b4c07 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 806be5d..dd2d44b 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 bcce18b..8318750 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 7ab337b..2bc350c 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 d6e2510..d4cd6f2 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 c1cd631..9adaf2f 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;
@@ -1154,39 +1124,6 @@ static const struct v4l2_ctrl_config ov5693_controls[] = {
        },
        {
                .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,
                .type = V4L2_CTRL_TYPE_INTEGER,
                .name = "focus move absolute",
index 3f602b5..e70e576 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 33accdf..6ee8453 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 e31ba24..2dfb4ab 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 ef6eaad..13fc607 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;