diff options
Diffstat (limited to 'drivers/staging/iio/magnetometer')
-rw-r--r-- | drivers/staging/iio/magnetometer/magnet.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/staging/iio/magnetometer/magnet.h b/drivers/staging/iio/magnetometer/magnet.h new file mode 100644 index 0000000..6f6c6ed --- /dev/null +++ b/drivers/staging/iio/magnetometer/magnet.h @@ -0,0 +1,31 @@ + +#include "../sysfs.h" + +/* Magnetometer types of attribute */ + +#define IIO_DEV_ATTR_MAGN_X_OFFSET(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(magn_x_offset, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_MAGN_Y_OFFSET(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(magn_y_offset, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_MAGN_Z_OFFSET(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(magn_z_offset, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_MAGN_X_GAIN(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(magn_x_gain, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_MAGN_Y_GAIN(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(magn_y_gain, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_MAGN_Z_GAIN(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(magn_z_gain, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_MAGN_X(_show, _addr) \ + IIO_DEVICE_ATTR(magn_x, S_IRUGO, _show, NULL, _addr) + +#define IIO_DEV_ATTR_MAGN_Y(_show, _addr) \ + IIO_DEVICE_ATTR(magn_y, S_IRUGO, _show, NULL, _addr) + +#define IIO_DEV_ATTR_MAGN_Z(_show, _addr) \ + IIO_DEVICE_ATTR(magn_z, S_IRUGO, _show, NULL, _addr) |