Commit 5262d8fd authored by Peter Meerwald's avatar Peter Meerwald Committed by Jonathan Cameron
Browse files

staging:iio:accel:sca3000: Fix format of comments

parent e6869759
Loading
Loading
Loading
Loading
+29 −23
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ enum sca3000_variant {
	e05,
};

/* Note where option modes are not defined, the chip simply does not
/*
 * Note where option modes are not defined, the chip simply does not
 * support any.
 * Other chips in the sca3000 series use i2c and are not included here.
 *
@@ -191,7 +192,6 @@ error_ret:
	return ret;
}

/* Crucial that lock is called before calling this */
/**
 * sca3000_read_ctrl_reg() read from lock protected control register.
 *
@@ -402,7 +402,8 @@ error_ret:
}


/* Not even vaguely standard attributes so defined here rather than
/*
 * Not even vaguely standard attributes so defined here rather than
 * in the relevant IIO core headers
 */
static IIO_DEVICE_ATTR(measurement_mode_available, S_IRUGO,
@@ -662,7 +663,8 @@ error_free_lock:
	return ret ? ret : len;
}

/* Should only really be registered if ring buffer support is compiled in.
/*
 * Should only really be registered if ring buffer support is compiled in.
 * Does no harm however and doing it right would add a fair bit of complexity
 */
static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(sca3000_read_av_freq);
@@ -802,12 +804,12 @@ static const struct attribute_group sca3000_attribute_group_with_temp = {
	.attrs = sca3000_attributes_with_temp,
};

/* RING RELATED interrupt handler */
/* depending on event, push to the ring buffer event chrdev or the event one */

/**
 * sca3000_event_handler() - handling ring and non ring events
 *
 * Ring related interrupt handler. Depending on event, push to
 * the ring buffer event chrdev or the event one.
 *
 * This function is complicated by the fact that the devices can signify ring
 * and non ring events via the same interrupt line and they can only
 * be distinguished via a read of the relevant status register.
@@ -819,7 +821,8 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)
	int ret, val;
	s64 last_timestamp = iio_get_time_ns();

	/* Could lead if badly timed to an extra read of status reg,
	/*
	 * Could lead if badly timed to an extra read of status reg,
	 * but ensures no interrupt is missed.
	 */
	mutex_lock(&st->lock);
@@ -934,7 +937,6 @@ static ssize_t sca3000_query_free_fall_mode(struct device *dev,
 * the device falls more than 25cm.  This has not been tested due
 * to fragile wiring.
 **/

static ssize_t sca3000_set_free_fall_mode(struct device *dev,
					  struct device_attribute *attr,
					  const char *buf,
@@ -991,13 +993,15 @@ static int sca3000_write_event_config(struct iio_dev *indio_dev,
	int num = chan->channel2;

	mutex_lock(&st->lock);
	/* First read the motion detector config to find out if
	 * this axis is on*/
	/*
	 * First read the motion detector config to find out if
	 * this axis is on
	 */
	ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_MD_CTRL);
	if (ret < 0)
		goto exit_point;
	ctrlval = ret;
	/* Off and should be on */
	/* if off and should be on */
	if (state && !(ctrlval & sca3000_addresses[num][2])) {
		ret = sca3000_write_ctrl_reg(st,
					     SCA3000_REG_CTRL_SEL_MD_CTRL,
@@ -1106,9 +1110,11 @@ static int sca3000_clean_setup(struct sca3000_state *st)
				| SCA3000_INT_MASK_ACTIVE_LOW);
	if (ret)
		goto error_ret;
	/* Select normal measurement mode, free fall off, ring off */
	/* Ring in 12 bit mode - it is fine to overwrite reserved bits 3,5
	 * as that occurs in one of the example on the datasheet */
	/*
	 * Select normal measurement mode, free fall off, ring off
	 * Ring in 12 bit mode - it is fine to overwrite reserved bits 3,5
	 * as that occurs in one of the example on the datasheet
	 */
	ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_MODE, 1);
	if (ret)
		goto error_ret;