diff options
Diffstat (limited to 'drivers/staging/media/atomisp/i2c')
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 10 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 8 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 38 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 8 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 10 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 17 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/ov2680.h | 1 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 94 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 2 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/i2c/ov8858.c | 43 |
10 files changed, 105 insertions, 126 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c index e70d8afcc229..61b7598469eb 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c @@ -1370,13 +1370,9 @@ static int gc0310_probe(struct i2c_client *client) dev->fmt_idx = 0; v4l2_i2c_subdev_init(&(dev->sd), client, &gc0310_ops); - if (ACPI_COMPANION(&client->dev)) - pdata = gmin_camera_platform_data(&dev->sd, - ATOMISP_INPUT_FORMAT_RAW_8, - atomisp_bayer_order_grbg); - else - pdata = client->dev.platform_data; - + pdata = gmin_camera_platform_data(&dev->sd, + ATOMISP_INPUT_FORMAT_RAW_8, + atomisp_bayer_order_grbg); if (!pdata) { ret = -EINVAL; goto out_free; diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index 85da5fe24033..d8de46da64ae 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -1108,9 +1108,7 @@ static int gc2235_probe(struct i2c_client *client) dev->fmt_idx = 0; v4l2_i2c_subdev_init(&(dev->sd), client, &gc2235_ops); - gcpdev = client->dev.platform_data; - if (ACPI_COMPANION(&client->dev)) - gcpdev = gmin_camera_platform_data(&dev->sd, + gcpdev = gmin_camera_platform_data(&dev->sd, ATOMISP_INPUT_FORMAT_RAW_10, atomisp_bayer_order_grbg); @@ -1147,10 +1145,8 @@ static int gc2235_probe(struct i2c_client *client) if (ret) gc2235_remove(client); - if (ACPI_HANDLE(&client->dev)) - ret = atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA); + return atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA); - return ret; out_free: v4l2_device_unregister_subdev(&dev->sd); kfree(dev); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c index 4fd9f538ac95..7098bf317f16 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c @@ -562,10 +562,10 @@ static const struct v4l2_ctrl_config lm3554_controls[] = { { .ops = &ctrl_ops, .id = V4L2_CID_FLASH_STATUS, - .type = V4L2_CTRL_TYPE_BOOLEAN, + .type = V4L2_CTRL_TYPE_INTEGER, .name = "Flash Status", - .min = 0, - .max = 100, + .min = ATOMISP_FLASH_STATUS_OK, + .max = ATOMISP_FLASH_STATUS_TIMEOUT, .step = 1, .def = ATOMISP_FLASH_STATUS_OK, .flags = 0, @@ -574,10 +574,10 @@ static const struct v4l2_ctrl_config lm3554_controls[] = { { .ops = &ctrl_ops, .id = V4L2_CID_FLASH_STATUS_REGISTER, - .type = V4L2_CTRL_TYPE_BOOLEAN, + .type = V4L2_CTRL_TYPE_INTEGER, .name = "Flash Status Register", .min = 0, - .max = 100, + .max = 255, .step = 1, .def = 0, .flags = 0, @@ -824,22 +824,15 @@ static void *lm3554_platform_data_func(struct i2c_client *client) { static struct lm3554_platform_data platform_data; - if (ACPI_COMPANION(&client->dev)) { - platform_data.gpio_reset = - desc_to_gpio(gpiod_get_index(&(client->dev), + platform_data.gpio_reset = + desc_to_gpio(gpiod_get_index(&client->dev, NULL, 2, GPIOD_OUT_LOW)); - platform_data.gpio_strobe = - desc_to_gpio(gpiod_get_index(&(client->dev), + platform_data.gpio_strobe = + desc_to_gpio(gpiod_get_index(&client->dev, NULL, 0, GPIOD_OUT_LOW)); - platform_data.gpio_torch = - desc_to_gpio(gpiod_get_index(&(client->dev), + platform_data.gpio_torch = + desc_to_gpio(gpiod_get_index(&client->dev, NULL, 1, GPIOD_OUT_LOW)); - } else { - platform_data.gpio_reset = -1; - platform_data.gpio_strobe = -1; - platform_data.gpio_torch = -1; - } - dev_info(&client->dev, "camera pdata: lm3554: reset: %d strobe %d torch %d\n", platform_data.gpio_reset, platform_data.gpio_strobe, platform_data.gpio_torch); @@ -868,10 +861,7 @@ static int lm3554_probe(struct i2c_client *client) if (!flash) return -ENOMEM; - flash->pdata = client->dev.platform_data; - - if (!flash->pdata || ACPI_COMPANION(&client->dev)) - flash->pdata = lm3554_platform_data_func(client); + flash->pdata = lm3554_platform_data_func(client); v4l2_i2c_subdev_init(&flash->sd, client, &lm3554_ops); flash->sd.internal_ops = &lm3554_internal_ops; @@ -914,9 +904,7 @@ static int lm3554_probe(struct i2c_client *client) dev_err(&client->dev, "gpio request/direction_output fail"); goto fail2; } - if (ACPI_HANDLE(&client->dev)) - err = atomisp_register_i2c_module(&flash->sd, NULL, LED_FLASH); - return 0; + return atomisp_register_i2c_module(&flash->sd, NULL, LED_FLASH); fail2: media_entity_cleanup(&flash->sd.entity); v4l2_ctrl_handler_free(&flash->ctrl_handler); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 55882bea2049..df253a557c76 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -1844,11 +1844,9 @@ static int mt9m114_probe(struct i2c_client *client) return -ENOMEM; v4l2_i2c_subdev_init(&dev->sd, client, &mt9m114_ops); - pdata = client->dev.platform_data; - if (ACPI_COMPANION(&client->dev)) - pdata = gmin_camera_platform_data(&dev->sd, - ATOMISP_INPUT_FORMAT_RAW_10, - atomisp_bayer_order_grbg); + pdata = gmin_camera_platform_data(&dev->sd, + ATOMISP_INPUT_FORMAT_RAW_10, + atomisp_bayer_order_grbg); if (pdata) ret = mt9m114_s_config(&dev->sd, client->irq, pdata); if (!pdata || ret) { diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c index cd67d38f183a..84f8d33ce2d1 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c @@ -1447,13 +1447,9 @@ static int ov2680_probe(struct i2c_client *client) dev->fmt_idx = 0; v4l2_i2c_subdev_init(&(dev->sd), client, &ov2680_ops); - if (ACPI_COMPANION(&client->dev)) - pdata = gmin_camera_platform_data(&dev->sd, - ATOMISP_INPUT_FORMAT_RAW_10, - atomisp_bayer_order_bggr); - else - pdata = client->dev.platform_data; - + pdata = gmin_camera_platform_data(&dev->sd, + ATOMISP_INPUT_FORMAT_RAW_10, + atomisp_bayer_order_bggr); if (!pdata) { ret = -EINVAL; goto out_free; diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index 4df7eba8d375..2b6ae0faf972 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -1259,7 +1259,6 @@ static int ov2722_probe(struct i2c_client *client) struct ov2722_device *dev; void *ovpdev; int ret; - struct acpi_device *adev; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) @@ -1270,14 +1269,9 @@ static int ov2722_probe(struct i2c_client *client) dev->fmt_idx = 0; v4l2_i2c_subdev_init(&(dev->sd), client, &ov2722_ops); - ovpdev = client->dev.platform_data; - adev = ACPI_COMPANION(&client->dev); - if (adev) { - adev->power.flags.power_resources = 0; - ovpdev = gmin_camera_platform_data(&dev->sd, - ATOMISP_INPUT_FORMAT_RAW_10, - atomisp_bayer_order_grbg); - } + ovpdev = gmin_camera_platform_data(&dev->sd, + ATOMISP_INPUT_FORMAT_RAW_10, + atomisp_bayer_order_grbg); ret = ov2722_s_config(&dev->sd, client->irq, ovpdev); if (ret) @@ -1296,10 +1290,7 @@ static int ov2722_probe(struct i2c_client *client) if (ret) ov2722_remove(client); - if (ACPI_HANDLE(&client->dev)) - ret = atomisp_register_i2c_module(&dev->sd, ovpdev, RAW_CAMERA); - - return ret; + return atomisp_register_i2c_module(&dev->sd, ovpdev, RAW_CAMERA); out_ctrl_handler_free: v4l2_ctrl_handler_free(&dev->ctrl_handler); diff --git a/drivers/staging/media/atomisp/i2c/ov2680.h b/drivers/staging/media/atomisp/i2c/ov2680.h index bf4897347df7..03f75dd80f87 100644 --- a/drivers/staging/media/atomisp/i2c/ov2680.h +++ b/drivers/staging/media/atomisp/i2c/ov2680.h @@ -174,7 +174,6 @@ struct ov2680_format { struct mutex input_lock; struct v4l2_ctrl_handler ctrl_handler; struct camera_sensor_platform_data *platform_data; - struct timespec timestamp_t_focus_abs; int vt_pix_clk_freq_mhz; int fmt_idx; int run_mode; diff --git a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c index 3e7c3851280f..40d01bf4bf28 100644 --- a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c +++ b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c @@ -82,6 +82,7 @@ static int ad5823_i2c_write(struct i2c_client *client, u8 reg, u8 val) { struct i2c_msg msg; u8 buf[2]; + buf[0] = reg; buf[1] = val; msg.addr = AD5823_VCM_ADDR; @@ -98,6 +99,7 @@ static int ad5823_i2c_read(struct i2c_client *client, u8 reg, u8 *val) { struct i2c_msg msg[2]; u8 buf[2]; + buf[0] = reg; buf[1] = 0; @@ -211,7 +213,8 @@ static int vcm_dw_i2c_write(struct i2c_client *client, u16 data) return ret == num_msg ? 0 : -EIO; } -/* Theory: per datasheet, the two VCMs both allow for a 2-byte read. +/* + * Theory: per datasheet, the two VCMs both allow for a 2-byte read. * The DW9714 doesn't actually specify what this does (it has a * two-byte write-only protocol, but specifies the read sequence as * legal), but it returns the same data (zeroes) always, after an @@ -222,12 +225,14 @@ static int vcm_dw_i2c_write(struct i2c_client *client, u16 data) * these) in AD5823 are not pairwise repetitions of the same 16 bit * word. So all we have to do is sequentially read two bytes at a * time and see if we detect a difference in any of the first four - * pairs. */ + * pairs. + */ static int vcm_detect(struct i2c_client *client) { int i, ret; struct i2c_msg msg; u16 data0 = 0, data; + for (i = 0; i < 4; i++) { msg.addr = VCM_ADDR; msg.flags = I2C_M_RD; @@ -235,8 +240,10 @@ static int vcm_detect(struct i2c_client *client) msg.buf = (u8 *)&data; ret = i2c_transfer(client->adapter, &msg, 1); - /* DW9714 always fails the first read and returns - * zeroes for subsequent ones */ + /* + * DW9714 always fails the first read and returns + * zeroes for subsequent ones + */ if (i == 0 && ret == -EREMOTEIO) { data0 = 0; continue; @@ -530,9 +537,11 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg, hts = ov5693_res[dev->fmt_idx].pixels_per_line; vts = ov5693_res[dev->fmt_idx].lines_per_frame; - /*If coarse_itg is larger than 1<<15, can not write to reg directly. - The way is to write coarse_itg/2 to the reg, meanwhile write 2*hts - to the reg. */ + /* + * If coarse_itg is larger than 1<<15, can not write to reg directly. + * The way is to write coarse_itg/2 to the reg, meanwhile write 2*hts + * to the reg. + */ if (coarse_itg > (1 << 15)) { hts = hts * 2; coarse_itg = (int)coarse_itg / 2; @@ -690,6 +699,7 @@ static long ov5693_s_exposure(struct v4l2_subdev *sd, /* we should not accept the invalid value below */ if (analog_gain == 0) { struct i2c_client *client = v4l2_get_subdevdata(sd); + v4l2_err(client, "%s: invalid value\n", __func__); return -EINVAL; } @@ -722,6 +732,7 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf) int ret; int i; u8 *b = buf; + dev->otp_size = 0; for (i = 1; i < OV5693_OTP_BANK_MAX; i++) { /*set bank NO and OTP read mode. */ @@ -753,7 +764,7 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf) //pr_debug("BANK[%2d] %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", i, *b, *(b+1), *(b+2), *(b+3), *(b+4), *(b+5), *(b+6), *(b+7), *(b+8), *(b+9), *(b+10), *(b+11), *(b+12), *(b+13), *(b+14), *(b+15)); //Intel OTP map, try to read 320byts first. - if (21 == i) { + if (i == 21) { if ((*b) == 0) { dev->otp_size = 320; break; @@ -761,15 +772,15 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf) b = buf; continue; } - } else if (24 == i) { //if the first 320bytes data doesn't not exist, try to read the next 32bytes data. + } else if (i == 24) { //if the first 320bytes data doesn't not exist, try to read the next 32bytes data. if ((*b) == 0) { dev->otp_size = 32; break; - } else { + } else { b = buf; continue; } - } else if (27 == i) { //if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again. + } else if (i == 27) { //if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again. if ((*b) == 0) { dev->otp_size = 32; break; @@ -875,8 +886,10 @@ static long ov5693_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) return 0; } -/* This returns the exposure time being used. This should only be used - for filling in EXIF data, not for actual image processing. */ +/* + * This returns the exposure time being used. This should only be used + * for filling in EXIF data, not for actual image processing. + */ static int ov5693_q_exposure(struct v4l2_subdev *sd, s32 *value) { struct i2c_client *client = v4l2_get_subdevdata(sd); @@ -973,7 +986,7 @@ static int ov5693_t_focus_abs(struct v4l2_subdev *sd, s32 value) if (ret == 0) { dev->number_of_steps = value - dev->focus; dev->focus = value; - getnstimeofday(&(dev->timestamp_t_focus_abs)); + dev->timestamp_t_focus_abs = ktime_get(); } else dev_err(&client->dev, "%s: i2c failed. ret %d\n", __func__, ret); @@ -984,6 +997,7 @@ static int ov5693_t_focus_abs(struct v4l2_subdev *sd, s32 value) static int ov5693_t_focus_rel(struct v4l2_subdev *sd, s32 value) { struct ov5693_device *dev = to_ov5693_sensor(sd); + return ov5693_t_focus_abs(sd, dev->focus + value); } @@ -993,16 +1007,13 @@ static int ov5693_q_focus_status(struct v4l2_subdev *sd, s32 *value) { u32 status = 0; struct ov5693_device *dev = to_ov5693_sensor(sd); - struct timespec temptime; - const struct timespec timedelay = { - 0, - min((u32)abs(dev->number_of_steps) * DELAY_PER_STEP_NS, - (u32)DELAY_MAX_PER_STEP_NS), - }; - - getnstimeofday(&temptime); - temptime = timespec_sub(temptime, (dev->timestamp_t_focus_abs)); - if (timespec_compare(&temptime, &timedelay) <= 0) { + ktime_t temptime; + ktime_t timedelay = ns_to_ktime(min_t(u32, + abs(dev->number_of_steps) * DELAY_PER_STEP_NS, + DELAY_MAX_PER_STEP_NS)); + + temptime = ktime_sub(ktime_get(), (dev->timestamp_t_focus_abs)); + if (ktime_compare(temptime, timedelay) <= 0) { status |= ATOMISP_FOCUS_STATUS_MOVING; status |= ATOMISP_FOCUS_HP_IN_PROGRESS; } else { @@ -1033,6 +1044,7 @@ static int ov5693_q_focus_abs(struct v4l2_subdev *sd, s32 *value) static int ov5693_t_vcm_slew(struct v4l2_subdev *sd, s32 value) { struct ov5693_device *dev = to_ov5693_sensor(sd); + dev->number_of_steps = value; dev->vcm_update = true; return 0; @@ -1041,6 +1053,7 @@ static int ov5693_t_vcm_slew(struct v4l2_subdev *sd, s32 value) static int ov5693_t_vcm_timing(struct v4l2_subdev *sd, s32 value) { struct ov5693_device *dev = to_ov5693_sensor(sd); + dev->number_of_steps = value; dev->vcm_update = true; return 0; @@ -1293,11 +1306,13 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag) if (!dev || !dev->platform_data) return -ENODEV; - /* This driver assumes "internal DVDD, PWDNB tied to DOVDD". + /* + * This driver assumes "internal DVDD, PWDNB tied to DOVDD". * In this set up only gpio0 (XSHUTDN) should be available * but in some products (for example ECS) gpio1 (PWDNB) is * also available. If gpio1 is available we emulate it being - * tied to DOVDD here. */ + * tied to DOVDD here. + */ if (flag) { ret = dev->platform_data->v2p8_ctrl(sd, 1); dev->platform_data->gpio1_ctrl(sd, 1); @@ -1333,7 +1348,7 @@ static int __power_up(struct v4l2_subdev *sd) struct i2c_client *client = v4l2_get_subdevdata(sd); int ret; - if (NULL == dev->platform_data) { + if (!dev->platform_data) { dev_err(&client->dev, "no camera_sensor_platform_data"); return -ENODEV; @@ -1381,7 +1396,7 @@ static int power_down(struct v4l2_subdev *sd) int ret = 0; dev->focus = OV5693_INVALID_CONFIG; - if (NULL == dev->platform_data) { + if (!dev->platform_data) { dev_err(&client->dev, "no camera_sensor_platform_data"); return -ENODEV; @@ -1563,6 +1578,7 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd, struct camera_mipi_info *ov5693_info = NULL; int ret = 0; int idx; + if (format->pad) return -EINVAL; if (!fmt) @@ -1599,6 +1615,7 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd, ret = startup(sd); if (ret) { int i = 0; + dev_err(&client->dev, "ov5693 startup err, retry to power up\n"); for (i = 0; i < OV5693_POWER_UP_RETRY_NUM; i++) { dev_err(&client->dev, @@ -1655,6 +1672,7 @@ static int ov5693_get_fmt(struct v4l2_subdev *sd, { struct v4l2_mbus_framefmt *fmt = &format->format; struct ov5693_device *dev = to_ov5693_sensor(sd); + if (format->pad) return -EINVAL; @@ -1818,6 +1836,7 @@ static int ov5693_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *param) { struct ov5693_device *dev = to_ov5693_sensor(sd); + dev->run_mode = param->parm.capture.capturemode; mutex_lock(&dev->input_lock); @@ -1907,6 +1926,7 @@ static int ov5693_remove(struct i2c_client *client) { struct v4l2_subdev *sd = i2c_get_clientdata(client); struct ov5693_device *dev = to_ov5693_sensor(sd); + dev_dbg(&client->dev, "ov5693_remove...\n"); dev->platform_data->csi_cfg(sd, 0); @@ -1928,13 +1948,14 @@ static int ov5693_probe(struct i2c_client *client) int i2c; int ret = 0; void *pdata = client->dev.platform_data; - struct acpi_device *adev; unsigned int i; - /* Firmware workaround: Some modules use a "secondary default" + /* + * Firmware workaround: Some modules use a "secondary default" * address of 0x10 which doesn't appear on schematics, and * some BIOS versions haven't gotten the memo. Work around - * via config. */ + * via config. + */ i2c = gmin_get_var_int(&client->dev, "I2CAddr", -1); if (i2c != -1) { dev_info(&client->dev, @@ -1952,14 +1973,9 @@ static int ov5693_probe(struct i2c_client *client) dev->fmt_idx = 0; v4l2_i2c_subdev_init(&(dev->sd), client, &ov5693_ops); - adev = ACPI_COMPANION(&client->dev); - if (adev) { - adev->power.flags.power_resources = 0; - pdata = gmin_camera_platform_data(&dev->sd, - ATOMISP_INPUT_FORMAT_RAW_10, - atomisp_bayer_order_bggr); - } - + pdata = gmin_camera_platform_data(&dev->sd, + ATOMISP_INPUT_FORMAT_RAW_10, + atomisp_bayer_order_bggr); if (!pdata) goto out_free; diff --git a/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h b/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h index 2ea63807c56d..68cfcb4a6c3c 100644 --- a/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h +++ b/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h @@ -221,7 +221,7 @@ struct ov5693_device { struct v4l2_ctrl_handler ctrl_handler; struct camera_sensor_platform_data *platform_data; - struct timespec timestamp_t_focus_abs; + ktime_t timestamp_t_focus_abs; int vt_pix_clk_freq_mhz; int fmt_idx; int run_mode; diff --git a/drivers/staging/media/atomisp/i2c/ov8858.c b/drivers/staging/media/atomisp/i2c/ov8858.c index ba147ac2e36f..3cf8c710ac65 100644 --- a/drivers/staging/media/atomisp/i2c/ov8858.c +++ b/drivers/staging/media/atomisp/i2c/ov8858.c @@ -2077,29 +2077,28 @@ static int ov8858_probe(struct i2c_client *client) v4l2_i2c_subdev_init(&(dev->sd), client, &ov8858_ops); - if (ACPI_COMPANION(&client->dev)) { - pdata = gmin_camera_platform_data(&dev->sd, - ATOMISP_INPUT_FORMAT_RAW_10, - atomisp_bayer_order_bggr); - if (!pdata) { - dev_err(&client->dev, - "%s: failed to get acpi platform data\n", - __func__); - goto out_free; - } - ret = ov8858_s_config(&dev->sd, client->irq, pdata); - if (ret) { - dev_err(&client->dev, - "%s: failed to set config\n", __func__); - goto out_free; - } - ret = atomisp_register_i2c_module(&dev->sd, pdata, RAW_CAMERA); - if (ret) { - dev_err(&client->dev, - "%s: failed to register subdev\n", __func__); - goto out_free; - } + pdata = gmin_camera_platform_data(&dev->sd, + ATOMISP_INPUT_FORMAT_RAW_10, + atomisp_bayer_order_bggr); + if (!pdata) { + dev_err(&client->dev, + "%s: failed to get acpi platform data\n", + __func__); + goto out_free; + } + ret = ov8858_s_config(&dev->sd, client->irq, pdata); + if (ret) { + dev_err(&client->dev, + "%s: failed to set config\n", __func__); + goto out_free; } + ret = atomisp_register_i2c_module(&dev->sd, pdata, RAW_CAMERA); + if (ret) { + dev_err(&client->dev, + "%s: failed to register subdev\n", __func__); + goto out_free; + } + /* * sd->name is updated with sensor driver name by the v4l2. * change it to sensor name in this case. |