Commit 271bd2c6 authored by Brian Masney's avatar Brian Masney Committed by Jonathan Cameron

staging: iio: tsl2x7x: rename power defines to improve code readability

The LED power defines are named like TSL2X7X_mAXXX. Rename these values
to TSL2X7X_XXX_mA to improve code readability.
Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 18ce2d50
...@@ -114,10 +114,10 @@ ...@@ -114,10 +114,10 @@
#define TSL2X7X_DIODE_BOTH 0x30 #define TSL2X7X_DIODE_BOTH 0x30
/* LED Power */ /* LED Power */
#define TSL2X7X_mA100 0x00 #define TSL2X7X_100_mA 0x00
#define TSL2X7X_mA50 0x40 #define TSL2X7X_50_mA 0x40
#define TSL2X7X_mA25 0x80 #define TSL2X7X_25_mA 0x80
#define TSL2X7X_mA13 0xD0 #define TSL2X7X_13_mA 0xD0
#define TSL2X7X_MAX_TIMER_CNT 0xFF #define TSL2X7X_MAX_TIMER_CNT 0xFF
#define TSL2X7X_MIN_ITIME 3 #define TSL2X7X_MIN_ITIME 3
...@@ -636,7 +636,7 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev) ...@@ -636,7 +636,7 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev)
/* Set the gain based on tsl2x7x_settings struct */ /* Set the gain based on tsl2x7x_settings struct */
chip->tsl2x7x_config[TSL2X7X_GAIN] = chip->tsl2x7x_config[TSL2X7X_GAIN] =
chip->settings.als_gain | chip->settings.als_gain |
(TSL2X7X_mA100 | TSL2X7X_DIODE1) | (TSL2X7X_100_mA | TSL2X7X_DIODE1) |
(chip->settings.prox_gain << 2); (chip->settings.prox_gain << 2);
/* set chip struct re scaling and saturation */ /* set chip struct re scaling and saturation */
......
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