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()
113 return (ret < 0) ? ret : -ENODEV; in da280_probe()
115 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); in da280_probe()
117 return -ENOMEM; in da280_probe()
120 data->client = client; in da280_probe()
123 indio_dev->info = &da280_info; in da280_probe()
124 indio_dev->modes = INDIO_DIRECT_MODE; in da280_probe()
125 indio_dev->channels = da280_channels; in da280_probe()
127 if (ACPI_HANDLE(&client->dev)) { in da280_probe()
128 chip = da280_match_acpi_device(&client->dev); in da280_probe()
130 chip = id->driver_data; in da280_probe()
134 indio_dev->name = "da226"; in da280_probe()
135 indio_dev->num_channels = 2; in da280_probe()
137 indio_dev->name = "da280"; in da280_probe()
138 indio_dev->num_channels = 3; in da280_probe()
147 dev_err(&client->dev, "device_register failed\n"); in da280_probe()
204 MODULE_DESCRIPTION("MiraMEMS DA280 3-Axis Accelerometer driver");