浏览代码

staging: iio: tsl2583: fixed ordering of comments

in taos_defaults()

The comments in taos_defaults() appear after the line of code
that they apply to. This patch moves the comments so that they appear
before the code. Some of the comments were updated to be more
informative.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Brian Masney 8 年之前
父节点
当前提交
4a0f36144c
共有 1 个文件被更改,包括 13 次插入6 次删除
  1. 13 6
      drivers/staging/iio/light/tsl2583.c

+ 13 - 6
drivers/staging/iio/light/tsl2583.c

@@ -143,16 +143,23 @@ static const struct gainadj gainadj[] = {
  */
  */
 static void taos_defaults(struct tsl2583_chip *chip)
 static void taos_defaults(struct tsl2583_chip *chip)
 {
 {
-	/* Operational parameters */
+	/*
+	 * The integration time must be a multiple of 50ms and within the
+	 * range [50, 600] ms.
+	 */
 	chip->taos_settings.als_time = 100;
 	chip->taos_settings.als_time = 100;
-	/* must be a multiple of 50mS */
+
+	/*
+	 * This is an index into the gainadj table. Assume clear glass as the
+	 * default.
+	 */
 	chip->taos_settings.als_gain = 0;
 	chip->taos_settings.als_gain = 0;
-	/* this is actually an index into the gain table */
-	/* assume clear glass as default */
+
+	/* Default gain trim to account for aperture effects */
 	chip->taos_settings.als_gain_trim = 1000;
 	chip->taos_settings.als_gain_trim = 1000;
-	/* default gain trim to account for aperture effects */
-	chip->taos_settings.als_cal_target = 130;
+
 	/* Known external ALS reading used for calibration */
 	/* Known external ALS reading used for calibration */
+	chip->taos_settings.als_cal_target = 130;
 }
 }
 
 
 /*
 /*