diff options
author | Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com> | 2015-03-03 11:17:56 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-03-14 14:35:59 -0400 |
commit | 0ba8da961bd868c67a8dae3dbbee145514515e9c (patch) | |
tree | a946661c1089a4e682a38c3fb6d8bd3573b725a3 | |
parent | 70dddeee8945a0e62525a278ae7b91778f82f765 (diff) |
iio: bmc150: change sampling frequency
Currently driver reports device bandwidth list as available
sampling frequency. But sampling frequency is actually twice
the device bandwidth. This patch fixes this issue.
Signed-off-by: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/accel/bmc150-accel.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/iio/accel/bmc150-accel.c b/drivers/iio/accel/bmc150-accel.c index 7d1383de3e85..75567fd457dc 100644 --- a/drivers/iio/accel/bmc150-accel.c +++ b/drivers/iio/accel/bmc150-accel.c | |||
@@ -168,14 +168,14 @@ static const struct { | |||
168 | int val; | 168 | int val; |
169 | int val2; | 169 | int val2; |
170 | u8 bw_bits; | 170 | u8 bw_bits; |
171 | } bmc150_accel_samp_freq_table[] = { {7, 810000, 0x08}, | 171 | } bmc150_accel_samp_freq_table[] = { {15, 620000, 0x08}, |
172 | {15, 630000, 0x09}, | 172 | {31, 260000, 0x09}, |
173 | {31, 250000, 0x0A}, | 173 | {62, 500000, 0x0A}, |
174 | {62, 500000, 0x0B}, | 174 | {125, 0, 0x0B}, |
175 | {125, 0, 0x0C}, | 175 | {250, 0, 0x0C}, |
176 | {250, 0, 0x0D}, | 176 | {500, 0, 0x0D}, |
177 | {500, 0, 0x0E}, | 177 | {1000, 0, 0x0E}, |
178 | {1000, 0, 0x0F} }; | 178 | {2000, 0, 0x0F} }; |
179 | 179 | ||
180 | static const struct { | 180 | static const struct { |
181 | int bw_bits; | 181 | int bw_bits; |
@@ -840,7 +840,7 @@ static int bmc150_accel_validate_trigger(struct iio_dev *indio_dev, | |||
840 | } | 840 | } |
841 | 841 | ||
842 | static IIO_CONST_ATTR_SAMP_FREQ_AVAIL( | 842 | static IIO_CONST_ATTR_SAMP_FREQ_AVAIL( |
843 | "7.810000 15.630000 31.250000 62.500000 125 250 500 1000"); | 843 | "15.620000 31.260000 62.50000 125 250 500 1000 2000"); |
844 | 844 | ||
845 | static struct attribute *bmc150_accel_attributes[] = { | 845 | static struct attribute *bmc150_accel_attributes[] = { |
846 | &iio_const_attr_sampling_frequency_available.dev_attr.attr, | 846 | &iio_const_attr_sampling_frequency_available.dev_attr.attr, |