Commit 7f3829a3 authored by Eva Rachel Retuya's avatar Eva Rachel Retuya Committed by Greg Kroah-Hartman

staging: iio: light: fix block comments according to kernel coding style

Add the trailing */ accordingly to suit the preferred way of placing
block comments.
Signed-off-by: default avatarEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79783b31
...@@ -320,8 +320,10 @@ static ssize_t show_prox_infrared_suppression(struct device *dev, ...@@ -320,8 +320,10 @@ static ssize_t show_prox_infrared_suppression(struct device *dev,
struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct isl29018_chip *chip = iio_priv(indio_dev); struct isl29018_chip *chip = iio_priv(indio_dev);
/* return the "proximity scheme" i.e. if the chip does on chip /*
infrared suppression (1 means perform on chip suppression) */ * 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 sprintf(buf, "%d\n", chip->prox_scheme);
} }
...@@ -340,8 +342,10 @@ static ssize_t store_prox_infrared_suppression(struct device *dev, ...@@ -340,8 +342,10 @@ static ssize_t store_prox_infrared_suppression(struct device *dev,
return -EINVAL; return -EINVAL;
} }
/* get the "proximity scheme" i.e. if the chip does on chip /*
infrared suppression (1 means perform on chip suppression) */ * get the "proximity scheme" i.e. if the chip does on chip
* infrared suppression (1 means perform on chip suppression)
*/
mutex_lock(&chip->lock); mutex_lock(&chip->lock);
chip->prox_scheme = val; chip->prox_scheme = val;
mutex_unlock(&chip->lock); mutex_unlock(&chip->lock);
......
...@@ -240,8 +240,10 @@ static int taos_get_lux(struct iio_dev *indio_dev) ...@@ -240,8 +240,10 @@ static int taos_get_lux(struct iio_dev *indio_dev)
} }
} }
/* clear status, really interrupt status (interrupts are off), but /*
* we use the bit anyway - don't forget 0x80 - this is a command*/ * clear status, really interrupt status (interrupts are off), but
* we use the bit anyway - don't forget 0x80 - this is a command
*/
ret = i2c_smbus_write_byte(chip->client, ret = i2c_smbus_write_byte(chip->client,
(TSL258X_CMD_REG | TSL258X_CMD_SPL_FN | (TSL258X_CMD_REG | TSL258X_CMD_SPL_FN |
TSL258X_CMD_ALS_INT_CLR)); TSL258X_CMD_ALS_INT_CLR));
...@@ -429,8 +431,10 @@ static int taos_chip_on(struct iio_dev *indio_dev) ...@@ -429,8 +431,10 @@ static int taos_chip_on(struct iio_dev *indio_dev)
chip->als_saturation = als_count * 922; /* 90% of full scale */ chip->als_saturation = als_count * 922; /* 90% of full scale */
chip->als_time_scale = (als_time + 25) / 50; chip->als_time_scale = (als_time + 25) / 50;
/* TSL258x Specific power-on / adc enable sequence /*
* Power on the device 1st. */ * TSL258x Specific power-on / adc enable sequence
* Power on the device 1st.
*/
utmp = TSL258X_CNTL_PWR_ON; utmp = TSL258X_CNTL_PWR_ON;
ret = i2c_smbus_write_byte_data(chip->client, ret = i2c_smbus_write_byte_data(chip->client,
TSL258X_CMD_REG | TSL258X_CNTRL, utmp); TSL258X_CMD_REG | TSL258X_CNTRL, utmp);
...@@ -439,8 +443,10 @@ static int taos_chip_on(struct iio_dev *indio_dev) ...@@ -439,8 +443,10 @@ static int taos_chip_on(struct iio_dev *indio_dev)
return ret; return ret;
} }
/* Use the following shadow copy for our delay before enabling ADC. /*
* Write all the registers. */ * Use the following shadow copy for our delay before enabling ADC.
* Write all the registers.
*/
for (i = 0, uP = chip->taos_config; i < TSL258X_REG_MAX; i++) { for (i = 0, uP = chip->taos_config; i < TSL258X_REG_MAX; i++) {
ret = i2c_smbus_write_byte_data(chip->client, ret = i2c_smbus_write_byte_data(chip->client,
TSL258X_CMD_REG + i, TSL258X_CMD_REG + i,
...@@ -453,8 +459,10 @@ static int taos_chip_on(struct iio_dev *indio_dev) ...@@ -453,8 +459,10 @@ static int taos_chip_on(struct iio_dev *indio_dev)
} }
usleep_range(3000, 3500); usleep_range(3000, 3500);
/* NOW enable the ADC /*
* initialize the desired mode of operation */ * NOW enable the ADC
* initialize the desired mode of operation
*/
utmp = TSL258X_CNTL_PWR_ON | TSL258X_CNTL_ADC_ENBL; utmp = TSL258X_CNTL_PWR_ON | TSL258X_CNTL_ADC_ENBL;
ret = i2c_smbus_write_byte_data(chip->client, ret = i2c_smbus_write_byte_data(chip->client,
TSL258X_CMD_REG | TSL258X_CNTRL, TSL258X_CMD_REG | TSL258X_CNTRL,
...@@ -704,8 +712,10 @@ static ssize_t taos_luxtable_show(struct device *dev, ...@@ -704,8 +712,10 @@ static ssize_t taos_luxtable_show(struct device *dev,
taos_device_lux[i].ch0, taos_device_lux[i].ch0,
taos_device_lux[i].ch1); taos_device_lux[i].ch1);
if (taos_device_lux[i].ratio == 0) { if (taos_device_lux[i].ratio == 0) {
/* We just printed the first "0" entry. /*
* Now get rid of the extra "," and break. */ * We just printed the first "0" entry.
* Now get rid of the extra "," and break.
*/
offset--; offset--;
break; break;
} }
......
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