if (ret < 0)
return ret;
- /* keep the same range when integration time changes */
+ /* Keep the same range when integration time changes */
int_time = chip->int_time;
for (i = 0; i < ARRAY_SIZE(isl29018_scales[int_time]); ++i) {
if (chip->scale.scale == isl29018_scales[int_time][i].scale &&
return len;
}
-/* proximity scheme */
static ssize_t show_prox_infrared_suppression(struct device *dev,
struct device_attribute *attr,
char *buf)
struct isl29018_chip *chip = iio_priv(indio_dev);
/*
- * return the "proximity scheme" i.e. if the chip does on chip
+ * Return the "proximity scheme" i.e. if the chip does on chip
* infrared suppression (1 means perform on chip suppression)
*/
return sprintf(buf, "%d\n", chip->prox_scheme);
return -EINVAL;
/*
- * get the "proximity scheme" i.e. if the chip does on chip
+ * Get the "proximity scheme" i.e. if the chip does on chip
* infrared suppression (1 means perform on chip suppression)
*/
mutex_lock(&chip->lock);
return count;
}
-/* Channel IO */
static int isl29018_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val,
if (id != ISL29035_DEVICE_ID)
return -ENODEV;
- /* clear out brownout bit */
+ /* Clear brownout bit */
return regmap_update_bits(chip->regmap, ISL29035_REG_DEVICE_ID,
ISL29035_BOUT_MASK, 0);
}
* conversions, clear the test registers, and then rewrite all
* registers to the desired values.
* ...
- * FOR ISL29011, ISL29018, ISL29021, ISL29023
+ * For ISL29011, ISL29018, ISL29021, ISL29023
* 1. Write 0x00 to register 0x08 (TEST)
* 2. Write 0x00 to register 0x00 (CMD1)
* 3. Rewrite all registers to the desired values
usleep_range(1000, 2000); /* per data sheet, page 10 */
- /* set defaults */
+ /* Set defaults */
status = isl29018_set_scale(chip, chip->scale.scale,
chip->scale.uscale);
if (status < 0) {
}
}
-/*
- * isl29018_regmap_config: regmap configuration.
- * Use RBTREE mechanism for caching.
- */
static const struct regmap_config isl29018_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.cache_type = REGCACHE_RBTREE,
};
-/* isl29035_regmap_config: regmap configuration for ISL29035 */
static const struct regmap_config isl29035_regmap_config = {
.reg_bits = 8,
.val_bits = 8,