Commit 99b010b6 authored by Jacopo Mondi's avatar Jacopo Mondi Committed by Mauro Carvalho Chehab

media: tw9910: Re-organize in-code comments

A lot of comments that would fit a single line were spread on two or
more lines. Also fix capitalization and punctuation where appropriate.
Signed-off-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 6294513d
...@@ -388,7 +388,7 @@ static int tw9910_set_hsync(struct i2c_client *client) ...@@ -388,7 +388,7 @@ static int tw9910_set_hsync(struct i2c_client *client)
if (ret < 0) if (ret < 0)
return ret; return ret;
/* So far only revisions 0 and 1 have been seen */ /* So far only revisions 0 and 1 have been seen. */
/* bit 2 - 0 */ /* bit 2 - 0 */
if (priv->revision == 1) if (priv->revision == 1)
ret = tw9910_mask_set(client, HSLOWCTL, 0x77, ret = tw9910_mask_set(client, HSLOWCTL, 0x77,
...@@ -653,21 +653,15 @@ static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height) ...@@ -653,21 +653,15 @@ static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height)
int ret = -EINVAL; int ret = -EINVAL;
u8 val; u8 val;
/* /* Select suitable norm. */
* select suitable norm
*/
priv->scale = tw9910_select_norm(priv->norm, *width, *height); priv->scale = tw9910_select_norm(priv->norm, *width, *height);
if (!priv->scale) if (!priv->scale)
goto tw9910_set_fmt_error; goto tw9910_set_fmt_error;
/* /* Reset hardware. */
* reset hardware
*/
tw9910_reset(client); tw9910_reset(client);
/* /* Set bus width. */
* set bus width
*/
val = 0x00; val = 0x00;
if (priv->info->buswidth == 16) if (priv->info->buswidth == 16)
val = LEN; val = LEN;
...@@ -676,9 +670,7 @@ static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height) ...@@ -676,9 +670,7 @@ static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height)
if (ret < 0) if (ret < 0)
goto tw9910_set_fmt_error; goto tw9910_set_fmt_error;
/* /* Select MPOUT behavior. */
* select MPOUT behavior
*/
switch (priv->info->mpout) { switch (priv->info->mpout) {
case TW9910_MPO_VLOSS: case TW9910_MPO_VLOSS:
val = RTSEL_VLOSS; break; val = RTSEL_VLOSS; break;
...@@ -704,16 +696,12 @@ static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height) ...@@ -704,16 +696,12 @@ static int tw9910_set_frame(struct v4l2_subdev *sd, u32 *width, u32 *height)
if (ret < 0) if (ret < 0)
goto tw9910_set_fmt_error; goto tw9910_set_fmt_error;
/* /* Set scale. */
* set scale
*/
ret = tw9910_set_scale(client, priv->scale); ret = tw9910_set_scale(client, priv->scale);
if (ret < 0) if (ret < 0)
goto tw9910_set_fmt_error; goto tw9910_set_fmt_error;
/* /* Set hsync. */
* set hsync
*/
ret = tw9910_set_hsync(client); ret = tw9910_set_hsync(client);
if (ret < 0) if (ret < 0)
goto tw9910_set_fmt_error; goto tw9910_set_fmt_error;
...@@ -740,7 +728,7 @@ static int tw9910_get_selection(struct v4l2_subdev *sd, ...@@ -740,7 +728,7 @@ static int tw9910_get_selection(struct v4l2_subdev *sd,
if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE)
return -EINVAL; return -EINVAL;
/* Only CROP, CROP_DEFAULT and CROP_BOUNDS are supported */ /* Only CROP, CROP_DEFAULT and CROP_BOUNDS are supported. */
if (sel->target > V4L2_SEL_TGT_CROP_BOUNDS) if (sel->target > V4L2_SEL_TGT_CROP_BOUNDS)
return -EINVAL; return -EINVAL;
...@@ -791,9 +779,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd, ...@@ -791,9 +779,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd,
WARN_ON(mf->field != V4L2_FIELD_ANY && WARN_ON(mf->field != V4L2_FIELD_ANY &&
mf->field != V4L2_FIELD_INTERLACED_BT); mf->field != V4L2_FIELD_INTERLACED_BT);
/* /* Check color format. */
* check color format
*/
if (mf->code != MEDIA_BUS_FMT_UYVY8_2X8) if (mf->code != MEDIA_BUS_FMT_UYVY8_2X8)
return -EINVAL; return -EINVAL;
...@@ -829,9 +815,7 @@ static int tw9910_set_fmt(struct v4l2_subdev *sd, ...@@ -829,9 +815,7 @@ static int tw9910_set_fmt(struct v4l2_subdev *sd,
mf->code = MEDIA_BUS_FMT_UYVY8_2X8; mf->code = MEDIA_BUS_FMT_UYVY8_2X8;
mf->colorspace = V4L2_COLORSPACE_SMPTE170M; mf->colorspace = V4L2_COLORSPACE_SMPTE170M;
/* /* Select suitable norm. */
* select suitable norm
*/
scale = tw9910_select_norm(priv->norm, mf->width, mf->height); scale = tw9910_select_norm(priv->norm, mf->width, mf->height);
if (!scale) if (!scale)
return -EINVAL; return -EINVAL;
...@@ -851,9 +835,7 @@ static int tw9910_video_probe(struct i2c_client *client) ...@@ -851,9 +835,7 @@ static int tw9910_video_probe(struct i2c_client *client)
s32 id; s32 id;
int ret; int ret;
/* /* TW9910 only use 8 or 16 bit bus width. */
* tw9910 only use 8 or 16 bit bus width
*/
if (priv->info->buswidth != 16 && priv->info->buswidth != 8) { if (priv->info->buswidth != 16 && priv->info->buswidth != 8) {
dev_err(&client->dev, "bus width error\n"); dev_err(&client->dev, "bus width error\n");
return -ENODEV; return -ENODEV;
...@@ -864,8 +846,8 @@ static int tw9910_video_probe(struct i2c_client *client) ...@@ -864,8 +846,8 @@ static int tw9910_video_probe(struct i2c_client *client)
return ret; return ret;
/* /*
* check and show Product ID * Check and show Product ID.
* So far only revisions 0 and 1 have been seen * So far only revisions 0 and 1 have been seen.
*/ */
id = i2c_smbus_read_byte_data(client, ID); id = i2c_smbus_read_byte_data(client, ID);
priv->revision = GET_REV(id); priv->revision = GET_REV(id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment