staging:iio:adxrs450: Move header file contents to main file
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 31 Jan 2013 14:27:00 +0000 (14:27 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 2 Feb 2013 09:24:18 +0000 (09:24 +0000)
The contents of the adxrs450 header file is not used outside the main drivers
file, so just move the contents from the header file into the drivers main file.
Also rename the adxrs450 driver file from adxrs450_core.c to adxrs450.c.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/gyro/Makefile
drivers/staging/iio/gyro/adxrs450.c [moved from drivers/staging/iio/gyro/adxrs450_core.c with 86% similarity]
drivers/staging/iio/gyro/adxrs450.h [deleted file]

index ef33161..6b4e60a 100644 (file)
@@ -11,5 +11,4 @@ obj-$(CONFIG_ADIS16130) += adis16130.o
 adis16260-y             := adis16260_core.o
 obj-$(CONFIG_ADIS16260) += adis16260.o
 
-adxrs450-y             := adxrs450_core.o
 obj-$(CONFIG_ADXRS450) += adxrs450.o
similarity index 86%
rename from drivers/staging/iio/gyro/adxrs450_core.c
rename to drivers/staging/iio/gyro/adxrs450.c
index 714e323..d9d4383 100644 (file)
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
-#include "adxrs450.h"
+#define ADXRS450_STARTUP_DELAY 50 /* ms */
+
+/* The MSB for the spi commands */
+#define ADXRS450_SENSOR_DATA    (0x20 << 24)
+#define ADXRS450_WRITE_DATA    (0x40 << 24)
+#define ADXRS450_READ_DATA     (0x80 << 24)
+
+#define ADXRS450_RATE1 0x00    /* Rate Registers */
+#define ADXRS450_TEMP1 0x02    /* Temperature Registers */
+#define ADXRS450_LOCST1        0x04    /* Low CST Memory Registers */
+#define ADXRS450_HICST1        0x06    /* High CST Memory Registers */
+#define ADXRS450_QUAD1 0x08    /* Quad Memory Registers */
+#define ADXRS450_FAULT1        0x0A    /* Fault Registers */
+#define ADXRS450_PID1  0x0C    /* Part ID Register 1 */
+#define ADXRS450_SNH   0x0E    /* Serial Number Registers, 4 bytes */
+#define ADXRS450_SNL   0x10
+#define ADXRS450_DNC1  0x12    /* Dynamic Null Correction Registers */
+/* Check bits */
+#define ADXRS450_P     0x01
+#define ADXRS450_CHK   0x02
+#define ADXRS450_CST   0x04
+#define ADXRS450_PWR   0x08
+#define ADXRS450_POR   0x10
+#define ADXRS450_NVM   0x20
+#define ADXRS450_Q     0x40
+#define ADXRS450_PLL   0x80
+#define ADXRS450_UV    0x100
+#define ADXRS450_OV    0x200
+#define ADXRS450_AMP   0x400
+#define ADXRS450_FAIL  0x800
+
+#define ADXRS450_WRERR_MASK    (0x7 << 29)
+
+#define ADXRS450_MAX_RX 4
+#define ADXRS450_MAX_TX 4
+
+#define ADXRS450_GET_ST(a)     ((a >> 26) & 0x3)
+
+enum {
+       ID_ADXRS450,
+       ID_ADXRS453,
+};
+
+/**
+ * struct adxrs450_state - device instance specific data
+ * @us:                        actual spi_device
+ * @buf_lock:          mutex to protect tx and rx
+ * @tx:                        transmit buffer
+ * @rx:                        receive buffer
+ **/
+struct adxrs450_state {
+       struct spi_device       *us;
+       struct mutex            buf_lock;
+       __be32                  tx ____cacheline_aligned;
+       __be32                  rx;
+
+};
 
 /**
  * adxrs450_spi_read_reg_16() - read 2 bytes from a register pair
diff --git a/drivers/staging/iio/gyro/adxrs450.h b/drivers/staging/iio/gyro/adxrs450.h
deleted file mode 100644 (file)
index 97abea3..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef SPI_ADXRS450_H_
-#define SPI_ADXRS450_H_
-
-#define ADXRS450_STARTUP_DELAY 50 /* ms */
-
-/* The MSB for the spi commands */
-#define ADXRS450_SENSOR_DATA    (0x20 << 24)
-#define ADXRS450_WRITE_DATA    (0x40 << 24)
-#define ADXRS450_READ_DATA     (0x80 << 24)
-
-#define ADXRS450_RATE1 0x00    /* Rate Registers */
-#define ADXRS450_TEMP1 0x02    /* Temperature Registers */
-#define ADXRS450_LOCST1        0x04    /* Low CST Memory Registers */
-#define ADXRS450_HICST1        0x06    /* High CST Memory Registers */
-#define ADXRS450_QUAD1 0x08    /* Quad Memory Registers */
-#define ADXRS450_FAULT1        0x0A    /* Fault Registers */
-#define ADXRS450_PID1  0x0C    /* Part ID Register 1 */
-#define ADXRS450_SNH   0x0E    /* Serial Number Registers, 4 bytes */
-#define ADXRS450_SNL   0x10
-#define ADXRS450_DNC1  0x12    /* Dynamic Null Correction Registers */
-/* Check bits */
-#define ADXRS450_P     0x01
-#define ADXRS450_CHK   0x02
-#define ADXRS450_CST   0x04
-#define ADXRS450_PWR   0x08
-#define ADXRS450_POR   0x10
-#define ADXRS450_NVM   0x20
-#define ADXRS450_Q     0x40
-#define ADXRS450_PLL   0x80
-#define ADXRS450_UV    0x100
-#define ADXRS450_OV    0x200
-#define ADXRS450_AMP   0x400
-#define ADXRS450_FAIL  0x800
-
-#define ADXRS450_WRERR_MASK    (0x7 << 29)
-
-#define ADXRS450_MAX_RX 4
-#define ADXRS450_MAX_TX 4
-
-#define ADXRS450_GET_ST(a)     ((a >> 26) & 0x3)
-
-enum {
-       ID_ADXRS450,
-       ID_ADXRS453,
-};
-
-/**
- * struct adxrs450_state - device instance specific data
- * @us:                        actual spi_device
- * @buf_lock:          mutex to protect tx and rx
- * @tx:                        transmit buffer
- * @rx:                        receive buffer
- **/
-struct adxrs450_state {
-       struct spi_device       *us;
-       struct mutex            buf_lock;
-       __be32                  tx ____cacheline_aligned;
-       __be32                  rx;
-
-};
-
-#endif /* SPI_ADXRS450_H_ */