linux_dsm_epyc7002/drivers/iio
Linus Walleij 9049531c91 iio: accel: st_accel: inline per-sensor data
We have #defines for all the individual sensor registers and
value/mask pairs #defined at the top of the file and used at
exactly one spot.

This is usually good if the #defines give a meaning to the
opaque magic numbers.

However in this case, the semantic meaning is inherent in the
name of the C99-addressable fields, and that means duplication
of information, and only makes the code hard to maintain since
you every time have to add a new #define AND update the site
where it is to be used.

Get rid of the #defines and just open code the values into the
appropriate struct elements. Make sure to explicitly address
the .hz and .value fields in the st_sensor_odr_avl struct
so that the meaning of all values is clear.

This patch is purely syntactic should have no semantic effect.

Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-19 12:25:36 +00:00
..
accel iio: accel: st_accel: inline per-sensor data 2016-11-19 12:25:36 +00:00
adc iio: adc: Add support for STM32 ADC 2016-11-19 12:18:33 +00:00
amplifiers
buffer
chemical
common Third set of IIO new device support, features and cleanup for the 4.10 cycle. 2016-11-16 17:20:40 +01:00
counter
dac iio: dpot-dac: DAC driver based on a digital potentiometer 2016-11-13 13:07:15 +00:00
dummy
frequency
gyro iio: gyro: st_gyro: inline per-sensor data 2016-11-12 15:38:09 +00:00
health
humidity iio: si7020: Add devicetree support and trivial bindings 2016-11-01 18:49:53 +00:00
imu iio: imu: inv_mpu6050: inform the i2c mux core about how it is used 2016-11-12 14:44:45 +00:00
light staging: iio: tsl2583: move out of staging 2016-11-13 13:07:33 +00:00
magnetometer iio: magn: st_magn: inline per-sensor data 2016-11-12 15:45:37 +00:00
orientation iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver) 2016-11-05 17:47:47 +00:00
potentiometer iio: mcp4531: provide range of available raw values 2016-11-13 11:40:26 +00:00
potentiostat
pressure iio: pressure: st_pressure: inline per-sensor data 2016-11-12 15:50:10 +00:00
proximity
temperature iio: maxim_thermocouple: detect invalid storage size in read() 2016-11-13 10:08:32 +01:00
trigger
iio_core_trigger.h
iio_core.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c iio:core: add a callback to allow drivers to provide _available attributes 2016-11-13 11:40:25 +00:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c iio: inkern: add helpers to query available values from channels 2016-11-13 11:40:26 +00:00
Kconfig
Makefile