Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304345
b: refs/heads/master
c: 691a4ca
h: refs/heads/master
i:
  304343: 9883c1d
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Apr 13, 2012
1 parent 7c37831 commit 7921ee2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 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: 3badbdac6c1294adc782c47d533254d014adca56
refs/heads/master: 691a4ca1b57ab268aaa9472c2f8f6ebc1aca31e9
26 changes: 20 additions & 6 deletions trunk/drivers/staging/iio/accel/sca3000_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,27 @@ static IIO_DEVICE_ATTR(revision, S_IRUGO, sca3000_show_rev, NULL, 0);
#define SCA3000_EVENT_MASK \
(IIO_EV_BIT(IIO_EV_TYPE_MAG, IIO_EV_DIR_RISING))

#define SCA3000_CHAN(index, mod) \
{ \
.type = IIO_ACCEL, \
.modified = 1, \
.channel2 = mod, \
.info_mask = SCA3000_INFO_MASK, \
.address = index, \
.scan_index = index, \
.scan_type = { \
.sign = 's', \
.realbits = 11, \
.storagebits = 16, \
.shift = 5, \
}, \
.event_mask = SCA3000_EVENT_MASK, \
}

static struct iio_chan_spec sca3000_channels[] = {
IIO_CHAN(IIO_ACCEL, 1, 0, 0, NULL, 0, IIO_MOD_X, SCA3000_INFO_MASK,
0, 0, IIO_ST('s', 11, 16, 5), SCA3000_EVENT_MASK),
IIO_CHAN(IIO_ACCEL, 1, 0, 0, NULL, 0, IIO_MOD_Y, SCA3000_INFO_MASK,
1, 1, IIO_ST('s', 11, 16, 5), SCA3000_EVENT_MASK),
IIO_CHAN(IIO_ACCEL, 1, 0, 0, NULL, 0, IIO_MOD_Z, SCA3000_INFO_MASK,
2, 2, IIO_ST('s', 11, 16, 5), SCA3000_EVENT_MASK),
SCA3000_CHAN(0, IIO_MOD_X),
SCA3000_CHAN(1, IIO_MOD_Y),
SCA3000_CHAN(2, IIO_MOD_Z),
};

static u8 sca3000_addresses[3][3] = {
Expand Down

0 comments on commit 7921ee2

Please sign in to comment.