Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343883
b: refs/heads/master
c: 1e9240b
h: refs/heads/master
i:
  343881: 2226dfd
  343879: e121b0f
v: v3
  • Loading branch information
Sakari Ailus authored and Mauro Carvalho Chehab committed Oct 29, 2012
1 parent 83e2e45 commit 58ba8dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6de1b143a45d3c4b8ad277b484e0d14df0d30d63
refs/heads/master: 1e9240b35264fa0280abc4487b47b28eecf10b52
24 changes: 12 additions & 12 deletions trunk/drivers/media/i2c/smiapp/smiapp-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ static int smiapp_pll_update(struct smiapp_sensor *sensor)
struct smiapp_pll *pll = &sensor->pll;
int rval;

memset(&sensor->pll, 0, sizeof(sensor->pll));

pll->lanes = sensor->platform_data->lanes;
pll->ext_clk_freq_hz = sensor->platform_data->ext_clk;

if (sensor->minfo.smiapp_profile == SMIAPP_PROFILE_0) {
/*
* Fill in operational clock divisors limits from the
Expand All @@ -296,20 +291,13 @@ static int smiapp_pll_update(struct smiapp_sensor *sensor)
lim.max_op_sys_clk_freq_hz = lim.max_vt_sys_clk_freq_hz;
lim.min_op_pix_clk_freq_hz = lim.min_vt_pix_clk_freq_hz;
lim.max_op_pix_clk_freq_hz = lim.max_vt_pix_clk_freq_hz;
/* Profile 0 sensors have no separate OP clock branch. */
pll->flags |= SMIAPP_PLL_FLAG_NO_OP_CLOCKS;
}

if (smiapp_needs_quirk(sensor,
SMIAPP_QUIRK_FLAG_OP_PIX_CLOCK_PER_LANE))
pll->flags |= SMIAPP_PLL_FLAG_OP_PIX_CLOCK_PER_LANE;

pll->binning_horizontal = sensor->binning_horizontal;
pll->binning_vertical = sensor->binning_vertical;
pll->link_freq =
sensor->link_freq->qmenu_int[sensor->link_freq->val];
pll->scale_m = sensor->scale_m;
pll->scale_n = sensor->limits[SMIAPP_LIMIT_SCALER_N_MIN];
pll->bits_per_pixel = sensor->csi_format->compressed;

rval = smiapp_pll_calculate(&client->dev, &lim, pll);
Expand Down Expand Up @@ -2369,6 +2357,7 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
{
struct smiapp_sensor *sensor = to_smiapp_sensor(subdev);
struct i2c_client *client = v4l2_get_subdevdata(subdev);
struct smiapp_pll *pll = &sensor->pll;
struct smiapp_subdev *last = NULL;
u32 tmp;
unsigned int i;
Expand Down Expand Up @@ -2635,6 +2624,17 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
if (rval < 0)
goto out_nvm_release;

/* prepare PLL configuration input values */
pll->lanes = sensor->platform_data->lanes;
pll->ext_clk_freq_hz = sensor->platform_data->ext_clk;
/* Profile 0 sensors have no separate OP clock branch. */
if (sensor->minfo.smiapp_profile == SMIAPP_PROFILE_0)
pll->flags |= SMIAPP_PLL_FLAG_NO_OP_CLOCKS;
if (smiapp_needs_quirk(sensor,
SMIAPP_QUIRK_FLAG_OP_PIX_CLOCK_PER_LANE))
pll->flags |= SMIAPP_PLL_FLAG_OP_PIX_CLOCK_PER_LANE;
pll->scale_n = sensor->limits[SMIAPP_LIMIT_SCALER_N_MIN];

rval = smiapp_update_mode(sensor);
if (rval) {
dev_err(&client->dev, "update mode failed\n");
Expand Down

0 comments on commit 58ba8dc

Please sign in to comment.