Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363599
b: refs/heads/master
c: e1865aa
h: refs/heads/master
i:
  363597: 93a8871
  363595: c959319
  363591: 2ff6a01
  363583: 37c753e
v: v3
  • Loading branch information
Jonathan Cameron committed Mar 17, 2013
1 parent 7752995 commit 18dbd67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: 98bfb6e3727bd11089ca4c126248a4481bbe07c2
refs/heads/master: e1865aa17049f168bf566d6648be851d40588a87
13 changes: 5 additions & 8 deletions trunk/drivers/iio/gyro/itg3200_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,20 +248,15 @@ static int itg3200_initial_setup(struct iio_dev *indio_dev)
return ret;
}

#define ITG3200_TEMP_INFO_MASK (IIO_CHAN_INFO_OFFSET_SHARED_BIT | \
IIO_CHAN_INFO_SCALE_SHARED_BIT | \
IIO_CHAN_INFO_RAW_SEPARATE_BIT)
#define ITG3200_GYRO_INFO_MASK (IIO_CHAN_INFO_SCALE_SHARED_BIT | \
IIO_CHAN_INFO_RAW_SEPARATE_BIT)

#define ITG3200_ST \
{ .sign = 's', .realbits = 16, .storagebits = 16, .endianness = IIO_BE }

#define ITG3200_GYRO_CHAN(_mod) { \
.type = IIO_ANGL_VEL, \
.modified = 1, \
.channel2 = IIO_MOD_ ## _mod, \
.info_mask = ITG3200_GYRO_INFO_MASK, \
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \
.address = ITG3200_REG_GYRO_ ## _mod ## OUT_H, \
.scan_index = ITG3200_SCAN_GYRO_ ## _mod, \
.scan_type = ITG3200_ST, \
Expand All @@ -271,7 +266,9 @@ static const struct iio_chan_spec itg3200_channels[] = {
{
.type = IIO_TEMP,
.channel2 = IIO_NO_MOD,
.info_mask = ITG3200_TEMP_INFO_MASK,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
BIT(IIO_CHAN_INFO_SCALE),
.address = ITG3200_REG_TEMP_OUT_H,
.scan_index = ITG3200_SCAN_TEMP,
.scan_type = ITG3200_ST,
Expand Down

0 comments on commit 18dbd67

Please sign in to comment.