Lines Matching +full:3 +full:- +full:axis
1 // SPDX-License-Identifier: GPL-2.0-only
3 * IIO driver for the MiraMEMS DA217 and DA280 3-axis accelerometer and
4 * IIO driver for the MiraMEMS DA226 2-axis accelerometer
27 * a value of + or -4096 corresponds to + or - 1G
33 #define DA280_CHANNEL(reg, axis) { \ argument
37 .channel2 = IIO_MOD_##axis, \
73 ret = i2c_smbus_read_word_data(data->client, chan->address); in da280_read_raw()
87 return -EINVAL; in da280_read_raw()
109 return (ret < 0) ? ret : -ENODEV; in da280_probe()
113 dev_err(&client->dev, "Error match-data not set\n"); in da280_probe()
114 return -EINVAL; in da280_probe()
117 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); in da280_probe()
119 return -ENOMEM; in da280_probe()
122 data->client = client; in da280_probe()
124 indio_dev->info = &da280_info; in da280_probe()
125 indio_dev->modes = INDIO_DIRECT_MODE; in da280_probe()
126 indio_dev->channels = da280_channels; in da280_probe()
127 indio_dev->num_channels = match_data->num_channels; in da280_probe()
128 indio_dev->name = match_data->name; in da280_probe()
134 ret = devm_add_action_or_reset(&client->dev, da280_disable, client); in da280_probe()
138 return devm_iio_device_register(&client->dev, indio_dev); in da280_probe()
153 static const struct da280_match_data da217_match_data = { "da217", 3 };
155 static const struct da280_match_data da280_match_data = { "da280", 3 };
185 MODULE_DESCRIPTION("MiraMEMS DA280 3-Axis Accelerometer driver");