Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ad4030: Use BIT macro to improve code readability

Use BIT macro to make the list of average modes more readable.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Marcelo Schmitt and committed by
Jonathan Cameron
a10f6dd4 34773346

+9 -3
+9 -3
drivers/iio/adc/ad4030.c
··· 232 232 .num_ext_scan_type = ARRAY_SIZE(_scan_type), \ 233 233 } 234 234 235 + /* 236 + * AD4030 can average over 2^N samples, where N = 1, 2, 3, ..., 16. 237 + * We use N = 0 to mean no sample averaging. 238 + */ 235 239 static const int ad4030_average_modes[] = { 236 - 1, 2, 4, 8, 16, 32, 64, 128, 237 - 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 238 - 65536, 240 + BIT(0), /* No sampling average */ 241 + BIT(1), BIT(2), BIT(3), BIT(4), 242 + BIT(5), BIT(6), BIT(7), BIT(8), 243 + BIT(9), BIT(10), BIT(11), BIT(12), 244 + BIT(13), BIT(14), BIT(15), BIT(16), 239 245 }; 240 246 241 247 static int ad4030_enter_config_mode(struct ad4030_state *st)