diff options
-rw-r--r-- | drivers/iio/accel/mma8452.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index 17aeea170566..2a5fa9a436e5 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c | |||
@@ -111,8 +111,14 @@ static const int mma8452_samp_freq[8][2] = { | |||
111 | {6, 250000}, {1, 560000} | 111 | {6, 250000}, {1, 560000} |
112 | }; | 112 | }; |
113 | 113 | ||
114 | /* | ||
115 | * Hardware has fullscale of -2G, -4G, -8G corresponding to raw value -2048 | ||
116 | * The userspace interface uses m/s^2 and we declare micro units | ||
117 | * So scale factor is given by: | ||
118 | * g * N * 1000000 / 2048 for N = 2, 4, 8 and g=9.80665 | ||
119 | */ | ||
114 | static const int mma8452_scales[3][2] = { | 120 | static const int mma8452_scales[3][2] = { |
115 | {0, 977}, {0, 1953}, {0, 3906} | 121 | {0, 9577}, {0, 19154}, {0, 38307} |
116 | }; | 122 | }; |
117 | 123 | ||
118 | static ssize_t mma8452_show_samp_freq_avail(struct device *dev, | 124 | static ssize_t mma8452_show_samp_freq_avail(struct device *dev, |