Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268186
b: refs/heads/master
c: fe55a17
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 5fcebdc commit db9b26b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: c3b7915df6356cee6412f24fbdcbf4f7ec107a5a
refs/heads/master: fe55a170399a0f30d1268848d2cb99dcf8fa413b
7 changes: 5 additions & 2 deletions trunk/drivers/staging/iio/adc/ad7152.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ static IIO_DEVICE_ATTR(in_capacitance0_calibscale_calibration,
static IIO_DEVICE_ATTR(in_capacitance1_calibscale_calibration,
S_IWUSR, NULL, ad7152_start_gain_calib, 1);

/* Values are Update Rate (Hz), Conversion Time (ms) */
/* Values are Update Rate (Hz), Conversion Time (ms) + 1*/
static const unsigned char ad7152_filter_rate_table[][2] = {
{200, 5}, {50, 20}, {20, 50}, {17, 60},
{200, 5 + 1}, {50, 20 + 1}, {20, 50 + 1}, {17, 60 + 1},
};

static ssize_t ad7152_show_filter_rate_setup(struct device *dev,
Expand Down Expand Up @@ -367,6 +367,9 @@ static int ad7152_read_raw(struct iio_dev *indio_dev,
goto out;
*val = swab16(ret);

if (chan->differential)
*val -= 0x8000;

ret = IIO_VAL_INT;
break;
case (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE):
Expand Down

0 comments on commit db9b26b

Please sign in to comment.