summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorBrian Masney <masneyb@onstation.org>2018-04-20 20:41:49 -0400
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-04-28 16:17:59 +0100
commit96c44e2e61d51fa9b4476d89d0e5703d3a2e4ac2 (patch)
tree29b583ef7065395c76b8097ac240d7762f2fafef /drivers/staging
parentdbc6cd1b0b31d714d90b2637b6596e867bb1439a (diff)
staging: iio: tsl2x7x: move power and diode settings into header file
The power and diode defines are needed for the platform data so this patch moves the defines out of the .c file and into the header file. A comment for the diode is also cleaned up while this code is touched. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/iio/light/tsl2x7x.c12
-rw-r--r--drivers/staging/iio/light/tsl2x7x.h12
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
index aaa83459befa..3c1461a05191 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -111,18 +111,6 @@
#define TSL2X7X_CNTL_PROXPON_ENBL 0x0F
#define TSL2X7X_CNTL_INTPROXPON_ENBL 0x2F
-/*Prox diode to use */
-#define TSL2X7X_DIODE0 0x01
-#define TSL2X7X_DIODE1 0x02
-#define TSL2X7X_DIODE_BOTH 0x03
-
-/* LED Power */
-#define TSL2X7X_100_mA 0x00
-#define TSL2X7X_50_mA 0x01
-#define TSL2X7X_25_mA 0x02
-#define TSL2X7X_13_mA 0x03
-#define TSL2X7X_MAX_TIMER_CNT 0xFF
-
#define TSL2X7X_MIN_ITIME 3
/* TAOS txx2x7x Device family members */
diff --git a/drivers/staging/iio/light/tsl2x7x.h b/drivers/staging/iio/light/tsl2x7x.h
index d382cdbb976e..dc80e17bfa9b 100644
--- a/drivers/staging/iio/light/tsl2x7x.h
+++ b/drivers/staging/iio/light/tsl2x7x.h
@@ -35,6 +35,18 @@ struct tsl2x7x_lux {
#define TSL2X7X_DEFAULT_TABLE_BYTES (sizeof(struct tsl2x7x_lux) * \
TSL2X7X_DEF_LUX_TABLE_SZ)
+/* Proximity diode to use */
+#define TSL2X7X_DIODE0 0x01
+#define TSL2X7X_DIODE1 0x02
+#define TSL2X7X_DIODE_BOTH 0x03
+
+/* LED Power */
+#define TSL2X7X_100_mA 0x00
+#define TSL2X7X_50_mA 0x01
+#define TSL2X7X_25_mA 0x02
+#define TSL2X7X_13_mA 0x03
+#define TSL2X7X_MAX_TIMER_CNT 0xFF
+
/**
* struct tsl2x7x_default_settings - power on defaults unless
* overridden by platform data.