Lines Matching +full:3 +full:- +full:axis
1 // SPDX-License-Identifier: GPL-2.0-only
3 * IIO driver for the MiraMEMS DA280 3-axis accelerometer and
4 * IIO driver for the MiraMEMS DA226 2-axis accelerometer
29 * a value of + or -4096 corresponds to + or - 1G
35 #define DA280_CHANNEL(reg, axis) { \ argument
39 .channel2 = IIO_MOD_##axis, \
70 ret = i2c_smbus_read_word_data(data->client, chan->address); in da280_read_raw()
84 return -EINVAL; in da280_read_raw()
96 id = acpi_match_device(dev->driver->acpi_match_table, dev); in da280_match_acpi_device()
98 return -EINVAL; in da280_match_acpi_device()
100 return (enum da280_chipset) id->driver_data; in da280_match_acpi_device()
118 return (ret < 0) ? ret : -ENODEV; in da280_probe()
120 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); in da280_probe()
122 return -ENOMEM; in da280_probe()
125 data->client = client; in da280_probe()
127 indio_dev->info = &da280_info; in da280_probe()
128 indio_dev->modes = INDIO_DIRECT_MODE; in da280_probe()
129 indio_dev->channels = da280_channels; in da280_probe()
131 if (ACPI_HANDLE(&client->dev)) { in da280_probe()
132 chip = da280_match_acpi_device(&client->dev); in da280_probe()
134 chip = id->driver_data; in da280_probe()
138 indio_dev->name = "da226"; in da280_probe()
139 indio_dev->num_channels = 2; in da280_probe()
141 indio_dev->name = "da280"; in da280_probe()
142 indio_dev->num_channels = 3; in da280_probe()
149 ret = devm_add_action_or_reset(&client->dev, da280_disable, client); in da280_probe()
153 return devm_iio_device_register(&client->dev, indio_dev); in da280_probe()
194 MODULE_DESCRIPTION("MiraMEMS DA280 3-Axis Accelerometer driver");