Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354399
b: refs/heads/master
c: 53ac850
h: refs/heads/master
i:
  354397: cce1a4c
  354395: d4c0e98
  354391: b7601fc
  354383: 910636b
  354367: 9946f48
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Feb 2, 2013
1 parent 0abf64f commit 101ae50
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 65 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5e69c8350bbcf3c6058b0aceff32a2f2972485e
refs/heads/master: 53ac8500ba9badae82b0412d08e1db9f5b21b3d5
1 change: 0 additions & 1 deletion trunk/drivers/staging/iio/gyro/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,63 @@
#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
Expand Down
62 changes: 0 additions & 62 deletions trunk/drivers/staging/iio/gyro/adxrs450.h

This file was deleted.

0 comments on commit 101ae50

Please sign in to comment.