Commit f50559f0 authored by Deepak R Varma's avatar Deepak R Varma Committed by Mauro Carvalho Chehab
Browse files

media: staging: media: atomisp: reformat code comment blocks



Reformat code comment blocks according to the coding style guidelines.
This resolves different checkpatch script WARNINGs around block comments.

[hverkuil: fixed up one missed '/* text' comment as reported by Fabio]

Suggested-by: default avatarFabio Aiuto <fabioaiuto83@gmail.com>
Signed-off-by: default avatarDeepak R Varma <drv@mailo.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 21837c2c
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -427,7 +427,8 @@ static long gc2235_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
	return 0;
}

/* This returns the exposure time being used. This should only be used
/*
 * This returns the exposure time being used. This should only be used
 * for filling in EXIF data, not for actual image processing.
 */
static int gc2235_q_exposure(struct v4l2_subdev *sd, s32 *value)
@@ -746,7 +747,8 @@ static int startup(struct v4l2_subdev *sd)
	int ret = 0;

	if (is_init == 0) {
		/* force gc2235 to do a reset in res change, otherwise it
		/*
		 * force gc2235 to do a reset in res change, otherwise it
		 * can not output normal after switching res. and it is not
		 * necessary for first time run up after power on, for the sack
		 * of performance
@@ -904,7 +906,8 @@ static int gc2235_s_config(struct v4l2_subdev *sd,
	    (struct camera_sensor_platform_data *)platform_data;

	mutex_lock(&dev->input_lock);
	/* power off the module, then power on it in future
	/*
	 * power off the module, then power on it in future
	 * as first power on by board may not fulfill the
	 * power on sequqence needed by the module
	 */
+4 −2
Original line number Diff line number Diff line
@@ -50,14 +50,16 @@ struct tbd_data_record_header {
static int set_msr_configuration(struct i2c_client *client, uint8_t *bufptr,
				 unsigned int size)
{
	/* The configuration data contains any number of sequences where
	/*
	 * The configuration data contains any number of sequences where
	 * the first byte (that is, uint8_t) that marks the number of bytes
	 * in the sequence to follow, is indeed followed by the indicated
	 * number of bytes of actual data to be written to sensor.
	 * By convention, the first two bytes of actual data should be
	 * understood as an address in the sensor address space (hibyte
	 * followed by lobyte) where the remaining data in the sequence
	 * will be written. */
	 * will be written.
	 */

	u8 *ptr = bufptr;

+30 −19
Original line number Diff line number Diff line
@@ -475,10 +475,12 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
	if (!dev || !dev->platform_data)
		return -ENODEV;

	/* Note: current modules wire only one GPIO signal (RESET#),
	/*
	 * Note: current modules wire only one GPIO signal (RESET#),
	 * but the schematic wires up two to the connector.  BIOS
	 * versions have been unfortunately inconsistent with which
	 * ACPI index RESET# is on, so hit both */
	 * ACPI index RESET# is on, so hit both
	 */

	if (flag) {
		ret = dev->platform_data->gpio0_ctrl(sd, 0);
@@ -1008,8 +1010,10 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
		exposure->gain[1]);

	coarse_integration = exposure->integration_time[0];
	/* fine_integration = ExposureTime.FineIntegrationTime; */
	/* FrameLengthLines = ExposureTime.FrameLengthLines; */
	/*
	 * fine_integration = ExposureTime.FineIntegrationTime;
	 * FrameLengthLines = ExposureTime.FrameLengthLines;
	 */
	FLines = mt9m114_res[dev->res].lines_per_frame;
	AnalogGain = exposure->gain[0];
	DigitalGain = exposure->gain[1];
@@ -1019,8 +1023,8 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
		dev->first_gain = AnalogGain;
		dev->first_diggain = DigitalGain;
	}
	/* DigitalGain = 0x400 * (((u16) DigitalGain) >> 8) +
	((unsigned int)(0x400 * (((u16) DigitalGain) & 0xFF)) >>8); */
	/* DigitalGain = 0x400 * (((u16) DigitalGain) >> 8) +		*/
	/* ((unsigned int)(0x400 * (((u16) DigitalGain) & 0xFF)) >>8);	*/

	/* set frame length */
	if (FLines < coarse_integration + 6)
@@ -1034,8 +1038,10 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
	}

	/* set coarse integration */
	/* 3A provide real exposure time.
		should not translate to any value here. */
	/*
	 * 3A provide real exposure time.
	 * should not translate to any value here.
	 */
	ret = mt9m114_write_reg(client, MISENSOR_16BIT,
				REG_EXPO_COARSE, (u16)(coarse_integration));
	if (ret) {
@@ -1044,7 +1050,7 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
	}

	/*
	// set analog/digital gain
	 * set analog/digital gain
	switch(AnalogGain)
	{
	case 0:
@@ -1069,8 +1075,9 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
	*/
	if (DigitalGain >= 16 || DigitalGain <= 1)
		DigitalGain = 1;
	/* AnalogGainToWrite =
		(u16)((DigitalGain << 12) | AnalogGainToWrite); */
	/*
	 * AnalogGainToWrite = (u16)((DigitalGain << 12) | AnalogGainToWrite);
	 */
	AnalogGainToWrite = (u16)((DigitalGain << 12) | (u16)AnalogGain);
	ret = mt9m114_write_reg(client, MISENSOR_16BIT,
				REG_GAIN, AnalogGainToWrite);
@@ -1095,8 +1102,10 @@ static long mt9m114_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 mt9m114_g_exposure(struct v4l2_subdev *sd, s32 *value)
{
	struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -1247,7 +1256,8 @@ static int mt9m114_s_ev(struct v4l2_subdev *sd, s32 val)
	s32 luma = 0x37;
	int err;

	/* EV value only support -2 to 2
	/*
	 * EV value only support -2 to 2
	 * 0: 0x37, 1:0x47, 2:0x57, -1:0x27, -2:0x17
	 */
	if (val < -2 || val > 2)
@@ -1295,7 +1305,8 @@ static int mt9m114_g_ev(struct v4l2_subdev *sd, s32 *val)
	return 0;
}

/* Fake interface
/*
 * Fake interface
 * mt9m114 now can not support 3a_lock
 */
static int mt9m114_s_3a_lock(struct v4l2_subdev *sd, s32 val)
+13 −7
Original line number Diff line number Diff line
@@ -399,7 +399,8 @@ static long ov2680_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
	return 0;
}

/* This returns the exposure time being used. This should only be used
/*
 * This returns the exposure time being used. This should only be used
 * for filling in EXIF data, not for actual image processing.
 */
static int ov2680_q_exposure(struct v4l2_subdev *sd, s32 *value)
@@ -727,11 +728,13 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
	if (!dev || !dev->platform_data)
		return -ENODEV;

	/* The OV2680 documents only one GPIO input (#XSHUTDN), but
	/*
	 * The OV2680 documents only one GPIO input (#XSHUTDN), but
	 * existing integrations often wire two (reset/power_down)
	 * because that is the way other sensors work.  There is no
	 * way to tell how it is wired internally, so existing
	 * firmwares expose both and we drive them symmetrically. */
	 * firmwares expose both and we drive them symmetrically.
	 */
	if (flag) {
		ret = dev->platform_data->gpio0_ctrl(sd, 1);
		usleep_range(10000, 15000);
@@ -977,7 +980,8 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
		goto err;
	}

	/*recall flip functions to avoid flip registers
	/*
	 * recall flip functions to avoid flip registers
	 * were overridden by default setting
	 */
	if (h_flag)
@@ -987,7 +991,8 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,

	v4l2_info(client, "\n%s idx %d\n", __func__, dev->fmt_idx);

	/*ret = startup(sd);
	/*
	 * ret = startup(sd);
	 * if (ret)
	 * dev_err(&client->dev, "ov2680 startup err\n");
	 */
@@ -1096,7 +1101,8 @@ static int ov2680_s_config(struct v4l2_subdev *sd,
	    (struct camera_sensor_platform_data *)platform_data;

	mutex_lock(&dev->input_lock);
	/* power off the module, then power on it in future
	/*
	 * power off the module, then power on it in future
	 * as first power on by board may not fulfill the
	 * power on sequqence needed by the module
	 */
+4 −2
Original line number Diff line number Diff line
@@ -764,8 +764,10 @@ static struct misensor_reg const mt9m114_common[] = {
	{MISENSOR_8BIT, 0xC85C, 0x03},    /* cam_crop_cropmode = 3 */
	{MISENSOR_16BIT, 0xC868, 0x0280}, /* cam_output_width = 952 */
	{MISENSOR_16BIT, 0xC86A, 0x01E0}, /* cam_output_height = 538 */
	/* LOAD = Step3-Recommended
	 * Patch,Errata and Sensor optimization Setting */
	/*
	 * LOAD = Step3-Recommended
	 * Patch, Errata and Sensor optimization Setting
	 */
	{MISENSOR_16BIT, 0x316A, 0x8270}, /* DAC_TXLO_ROW */
	{MISENSOR_16BIT, 0x316C, 0x8270}, /* DAC_TXLO */
	{MISENSOR_16BIT, 0x3ED0, 0x2305}, /* DAC_LD_4_5 */
+5 −5

File changed.

Contains only whitespace changes.

Loading